13.07.2015 Views

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

Quicktime File Format (2012-08-14).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Overview of QTFFQT Atoms and Atom ContainersWhen the size field contains the actual size of the atom, the extended size field is not present. This meansthat when a QuickTime atom is modified by adding data, and its size crosses the 2^32 byte limit, there is noextended size field in which to record the new atom size. Consequently, it is not always possible to enlargean atom beyond 2^32 bytes without copying its contents to a new atom.To prevent this inconvenience, media data atoms are typically created with a 64-bit placeholder atomimmediately preceding them in the movie file. The placeholder atom has a type ofkWideAtomPlaceholderType ('wide').Much like a 'free' or 'skip' atom, the 'wide' atom is reserved space, but in this case the space is reservedfor a specific purpose. If a 'wide' atom immediately precedes a second atom, the second atom can be extendedfrom a 32-bit size to a 64-bit size simply by starting the atom header 8 bytes earlier (overwriting the 'wide'atom), setting the size field to 1, and adding an extended size field. This way the offsets for sample datado not need to be recalculated.The 'wide' atom is exactly 8 bytes in size, and consists solely of its size and type fields. It contains no otherdata.Note A common error is thinking that the 'wide' atom contains the extended size. The 'wide'atom is merely a placeholder that can be overwritten if necessary, by an atom header containing anextended size field.Figure 1-2Calculating atom sizesImpliedSizeTypeSize = 1TypeSize = 0TypeSizeExtended size( if size = 1)SizeSizeEndof fileQT Atoms and Atom ContainersQT atoms are an enhanced data structure that provide a more general-purpose storage format and removesome of the ambiguities that arise when using simple atoms. A QT atom has an expanded header; the size andtype fields are followed by fields for an atom ID and a count of child atoms.<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!