Mercurial > libavcodec.hg
comparison svq1_vlc.h @ 5233:eca08bfad00f libavcodec
split SVQ1 decoder and encoder in their own files
author | aurel |
---|---|
date | Fri, 06 Jul 2007 15:19:35 +0000 |
parents | 4394344397d8 |
children | 1d83e9c34641 |
comparison
equal
deleted
inserted
replaced
5232:238b95c5ffe2 | 5233:eca08bfad00f |
---|---|
22 #define SVQ1_VLC_H | 22 #define SVQ1_VLC_H |
23 | 23 |
24 #include <stdint.h> | 24 #include <stdint.h> |
25 | 25 |
26 /* values in this table range from 0..3; adjust retrieved value by +0 */ | 26 /* values in this table range from 0..3; adjust retrieved value by +0 */ |
27 static const uint8_t svq1_block_type_vlc[4][2] = { | 27 const uint8_t ff_svq1_block_type_vlc[4][2] = { |
28 /* { code, length } */ | 28 /* { code, length } */ |
29 { 0x1, 1 }, { 0x1, 2 }, { 0x1, 3 }, { 0x0, 3 } | 29 { 0x1, 1 }, { 0x1, 2 }, { 0x1, 3 }, { 0x0, 3 } |
30 | 30 |
31 }; | 31 }; |
32 | 32 |
33 /* values in this table range from -1..6; adjust retrieved value by -1 */ | 33 /* values in this table range from -1..6; adjust retrieved value by -1 */ |
34 static const uint8_t svq1_intra_multistage_vlc[6][8][2] = { | 34 const uint8_t ff_svq1_intra_multistage_vlc[6][8][2] = { |
35 /* { code, length } */ | 35 /* { code, length } */ |
36 { | 36 { |
37 { 0x1, 5 }, { 0x1, 1 }, { 0x3, 3 }, { 0x2, 3 }, | 37 { 0x1, 5 }, { 0x1, 1 }, { 0x3, 3 }, { 0x2, 3 }, |
38 { 0x3, 4 }, { 0x2, 4 }, { 0x0, 5 }, { 0x1, 4 } | 38 { 0x3, 4 }, { 0x2, 4 }, { 0x0, 5 }, { 0x1, 4 } |
39 },{ | 39 },{ |
53 { 0x1, 4 }, { 0x1, 6 }, { 0x0, 7 }, { 0x1, 5 } | 53 { 0x1, 4 }, { 0x1, 6 }, { 0x0, 7 }, { 0x1, 5 } |
54 } | 54 } |
55 }; | 55 }; |
56 | 56 |
57 /* values in this table range from -1..6; adjust retrieved value by -1 */ | 57 /* values in this table range from -1..6; adjust retrieved value by -1 */ |
58 static const uint8_t svq1_inter_multistage_vlc[6][8][2] = { | 58 const uint8_t ff_svq1_inter_multistage_vlc[6][8][2] = { |
59 /* { code, length } */ | 59 /* { code, length } */ |
60 { | 60 { |
61 { 0x3, 2 }, { 0x5, 3 }, { 0x4, 3 }, { 0x3, 3 }, | 61 { 0x3, 2 }, { 0x5, 3 }, { 0x4, 3 }, { 0x3, 3 }, |
62 { 0x2, 3 }, { 0x1, 3 }, { 0x1, 4 }, { 0x0, 4 } | 62 { 0x2, 3 }, { 0x1, 3 }, { 0x1, 4 }, { 0x0, 4 } |
63 },{ | 63 },{ |
77 { 0x2, 5 }, { 0x1, 5 }, { 0x1, 6 }, { 0x0, 6 } | 77 { 0x2, 5 }, { 0x1, 5 }, { 0x1, 6 }, { 0x0, 6 } |
78 } | 78 } |
79 }; | 79 }; |
80 | 80 |
81 /* values in this table range from 0..255; adjust retrieved value by +0 */ | 81 /* values in this table range from 0..255; adjust retrieved value by +0 */ |
82 static const uint16_t svq1_intra_mean_vlc[256][2] = { | 82 const uint16_t ff_svq1_intra_mean_vlc[256][2] = { |
83 /* { code, length } */ | 83 /* { code, length } */ |
84 { 0x37, 6 }, { 0x56, 7 }, { 0x1, 17 }, { 0x1, 20 }, | 84 { 0x37, 6 }, { 0x56, 7 }, { 0x1, 17 }, { 0x1, 20 }, |
85 { 0x2, 20 }, { 0x3, 20 }, { 0x0, 20 }, { 0x4, 20 }, | 85 { 0x2, 20 }, { 0x3, 20 }, { 0x0, 20 }, { 0x4, 20 }, |
86 { 0x5, 20 }, { 0x3, 19 }, { 0x15, 11 }, { 0x42, 9 }, | 86 { 0x5, 20 }, { 0x3, 19 }, { 0x15, 11 }, { 0x42, 9 }, |
87 { 0x14, 11 }, { 0x3, 14 }, { 0x2, 14 }, { 0x1, 15 }, | 87 { 0x14, 11 }, { 0x3, 14 }, { 0x2, 14 }, { 0x1, 15 }, |
146 { 0xD, 11 }, { 0xE, 11 }, { 0xF, 11 }, { 0x10, 11 }, | 146 { 0xD, 11 }, { 0xE, 11 }, { 0xF, 11 }, { 0x10, 11 }, |
147 { 0x11, 11 }, { 0x12, 11 }, { 0x13, 11 }, { 0x1, 14 } | 147 { 0x11, 11 }, { 0x12, 11 }, { 0x13, 11 }, { 0x1, 14 } |
148 }; | 148 }; |
149 | 149 |
150 /* values in this table range from -256..255; adjust retrieved value by -256 */ | 150 /* values in this table range from -256..255; adjust retrieved value by -256 */ |
151 static const uint16_t svq1_inter_mean_vlc[512][2] = { | 151 const uint16_t ff_svq1_inter_mean_vlc[512][2] = { |
152 /* { code, length } */ | 152 /* { code, length } */ |
153 { 0x5A, 22 }, { 0xD4, 22 }, { 0xD5, 22 }, { 0xD6, 22 }, | 153 { 0x5A, 22 }, { 0xD4, 22 }, { 0xD5, 22 }, { 0xD6, 22 }, |
154 { 0xD7, 22 }, { 0xD8, 22 }, { 0xD9, 22 }, { 0xDA, 22 }, | 154 { 0xD7, 22 }, { 0xD8, 22 }, { 0xD9, 22 }, { 0xDA, 22 }, |
155 { 0xDB, 22 }, { 0xDC, 22 }, { 0xDD, 22 }, { 0xDE, 22 }, | 155 { 0xDB, 22 }, { 0xDC, 22 }, { 0xDD, 22 }, { 0xDE, 22 }, |
156 { 0xDF, 22 }, { 0xE0, 22 }, { 0xE1, 22 }, { 0xE2, 22 }, | 156 { 0xDF, 22 }, { 0xE0, 22 }, { 0xE1, 22 }, { 0xE2, 22 }, |