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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Movie AtomsSample AtomsSizeA 32-bit integer that specifies the number of bytes in the composition shift least greatest atom atom.TypeA 32-bit integer that identifies the atom type; this field must be set to ‘cslg’.VersionA 1-byte specification of the version of this atom.FlagsA 3-byte space reserved for flags. Set this field to 0.compositionOffsetToDisplayOffsetShiftA 32-bit unsigned integer that specifies the calculated value.leastDisplayOffsetA 32-bit signed integer that specifies the calculated value.greatestDisplayOffsetA 32-bit signed integer that specifies the calculated value.displayStartTimeA 32-bit signed integer that specifies the calculated value.displayEndTimeA 32-bit signed integer that specifies the calculated value.Using Composition Offset and Composition Shift Least Greatest AtomsWhen storing an out of order video stream’s sample table, the offset shift should be calculated.leastDisplayOffset = min { display offsets of all samples }greatestDisplayOffset = max { display offsets of all samples }if( leastDisplayOffset < 0 )compositionOffsetToDisplayOffsetShift = leastDisplayOffset;elsecompositionOffsetToDisplayOffsetShift = 0;These values are stored in a composition shift least greatest atom within the sample table atom.Then a composition offset table atom should be written that stores the display offsets, adjusting each offsetby subtracting compositionOffsetToDisplayOffsetShift:compositionOffset[n] = displayOffset[n] - compositionOffsetToDisplayOffsetShift;<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.106

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

Saved successfully!

Ooh no, something went wrong!