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.

Basic Data TypesCalendar Date and Time ValuesOne algorithm for performing this packing is to treat each ISO character as a 16-bit integer. Subtract 0x60 fromthe first character and multiply by 2^10 (0x400), subtract 0x60 from the second character and multiply by 2^5(0x20), subtract 0x60 from the third character, and add the three 16-bit values. This will result in a single 16-bitvalue with the three codes correctly packed into the 15 least significant bits and the most significant bit setto zero.Example: The ISO language code 'jpn' consists of the three hexadecimal values 0x6A, 0x70, 0x6E. Subtracting0x60 from each value yields the values 0xA, 0x10, 0xE, as shown in Table 5-2 (page 320).Table 5-25-bit values of UTF-8 charactersCharacterUTF-8 code5-bit valueShifted valuej0x6A0xA (01010)0x2800 (01010..........)p0x700x10 (10000)0x200 (.....10000.....)n0x6E0xE (01110)0xE (..........01110)The first value is shifted 10 bits to the left (multiplied by 0x400) and the second value is shifted 5 bits to theleft (multiplied by 0x20). This yields the values 0x2800, 0x200, 0xE. When added, this results in the 16-bit packedlanguage code value of 0x2A0E.Calendar Date and Time ValuesQuickTime movies store date and time information in Macintosh date format: a 32-bit value indicating thenumber of seconds that have passed since midnight January 1, 1904.This value does not specify a time zone. Common practice is to use local time for the time zone where thevalue is generated.It is strongly recommended that all calendar date and time values be stored using UTC time, so that all fileshave a time and date relative to the same time zone.MatricesQuickTime files use matrices to describe spatial information about many objects, such as tracks within a movie.<strong>2012</strong>-<strong>08</strong>-<strong>14</strong> | © 2004, <strong>2012</strong> Apple Inc. All Rights Reserved.320

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

Saved successfully!

Ooh no, something went wrong!