Apple Intermediate Codec: Difference between revisions
No edit summary |
(band coding is still undiscovered) |
||
Line 30: | Line 30: | ||
Each tile has data coded as 4 bands (probably in YYUV order) and DCT is employed. | Each tile has data coded as 4 bands (probably in YYUV order) and DCT is employed. | ||
Bits are coded MSB in big-endian words. | |||
Each band | ==== Band coding ==== | ||
Each band is an array of 16-bit entries. | |||
Used codes: | |||
* unary code - <code>00...01</code> | |||
* Rice code - unary prefix and <code>N</code> bits of residue. | |||
* code2 - signed codes with unary prefix: <code>k = get_unary(); value = get_bits(k*2) - (1 << N); </code> | |||
* code3 - two unary prefixes '''TODO''' | |||
First 5 bits re used to select coding method: | |||
A = 1 bit | |||
B = 1 bit | |||
C = 3 bits (number of bits in code residue) | |||
if <code>A = 0, B = 0</code> then it's simple Rice codes with parameter <code>C</code> | |||
if <code>A = 0, B = 1</code> then it's simple code2 with parameter <code>C</code> | |||
otherwise, there are a lot of cases using a lot of similar techniques (Rice, code2, code3, zero-fill some data) '''TODO''' | |||
[[Category:Video Codecs]] | [[Category:Video Codecs]] | ||
[[Category:Undiscovered Video Codecs]] | [[Category:Undiscovered Video Codecs]] | ||
[[Category:Formats missing in MPlayer]] | [[Category:Formats missing in MPlayer]] |
Revision as of 10:59, 22 November 2009
- FOURCCs: icod
- Company: Apple
- Samples: http://samples.mplayerhq.hu/V-codecs/icod/
- Decoder: http://www.apple.com/support/downloads/appleintermediatecodec101.html
- Description: http://support.apple.com/kb/HT2704
Lossy codec used in Final Cut Express HD and iLife ’05
Apple Lists its Features as:
- Intra Only
- 4:2:0 color
- 8-bits per sample
More technical details
Each frame starts with 24-byte header:
6- 7 frame width 8- 9 frame height 10-11 frame width (or maybe tile width) 12-13 frame height(or maybe tile height)
16 high nibble is ?, low nibble is ? 18 high nibble is ?, low nibble is ? 19 high 2 bits are ?, next 2 bits are ?, low 3 bits are ?
It is followed by some tables consisting of 16-bit little-endian entries (Huffman weights?).
There are 4 versions of coded data which differ by coded colourspaces (the same YUV420 but 8/16 bits per component and linear/non-linear?).
Each tile has data coded as 4 bands (probably in YYUV order) and DCT is employed. Bits are coded MSB in big-endian words.
Band coding
Each band is an array of 16-bit entries.
Used codes:
- unary code -
00...01
- Rice code - unary prefix and
N
bits of residue. - code2 - signed codes with unary prefix:
k = get_unary(); value = get_bits(k*2) - (1 << N);
- code3 - two unary prefixes TODO
First 5 bits re used to select coding method:
A = 1 bit B = 1 bit C = 3 bits (number of bits in code residue)
if A = 0, B = 0
then it's simple Rice codes with parameter C
if A = 0, B = 1
then it's simple code2 with parameter C
otherwise, there are a lot of cases using a lot of similar techniques (Rice, code2, code3, zero-fill some data) TODO