Mercurial > libavcodec.hg
comparison mpeg12data.h @ 1325:1cbc2380d172 libavcodec
CONFIG_ENCODERS cleanup
| author | michaelni |
|---|---|
| date | Sun, 22 Jun 2003 11:08:22 +0000 |
| parents | 4c2339f3863a |
| children | dd544554ed42 |
comparison
equal
deleted
inserted
replaced
| 1324:7d328fd9d8a5 | 1325:1cbc2380d172 |
|---|---|
| 23 16, 16, 16, 16, 16, 16, 16, 16, | 23 16, 16, 16, 16, 16, 16, 16, 16, |
| 24 16, 16, 16, 16, 16, 16, 16, 16, | 24 16, 16, 16, 16, 16, 16, 16, 16, |
| 25 16, 16, 16, 16, 16, 16, 16, 16, | 25 16, 16, 16, 16, 16, 16, 16, 16, |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 const unsigned char vlc_dc_table[256] = { | 28 static const unsigned char vlc_dc_table[256] = { |
| 29 0, 1, 2, 2, | 29 0, 1, 2, 2, |
| 30 3, 3, 3, 3, | 30 3, 3, 3, 3, |
| 31 4, 4, 4, 4, 4, 4, 4, 4, | 31 4, 4, 4, 4, 4, 4, 4, 4, |
| 32 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, | 32 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
| 33 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, | 33 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
| 46 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | 46 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
| 47 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | 47 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
| 48 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | 48 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 const uint16_t vlc_dc_lum_code[12] = { | 51 static const uint16_t vlc_dc_lum_code[12] = { |
| 52 0x4, 0x0, 0x1, 0x5, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x1ff, | 52 0x4, 0x0, 0x1, 0x5, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x1ff, |
| 53 }; | 53 }; |
| 54 const unsigned char vlc_dc_lum_bits[12] = { | 54 static const unsigned char vlc_dc_lum_bits[12] = { |
| 55 3, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 9, | 55 3, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 9, |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 const uint16_t vlc_dc_chroma_code[12] = { | 58 const uint16_t vlc_dc_chroma_code[12] = { |
| 59 0x0, 0x1, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x3fe, 0x3ff, | 59 0x0, 0x1, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x1fe, 0x3fe, 0x3ff, |
| 60 }; | 60 }; |
| 61 const unsigned char vlc_dc_chroma_bits[12] = { | 61 const unsigned char vlc_dc_chroma_bits[12] = { |
| 62 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, | 62 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, |
| 63 }; | 63 }; |
| 64 | |
| 65 /* simple include everything table for dc, first byte is bits number next 3 are code*/ | |
| 66 static uint32_t mpeg1_lum_dc_uni[512]; | |
| 67 static uint32_t mpeg1_chr_dc_uni[512]; | |
| 68 | 64 |
| 69 static const uint16_t mpeg1_vlc[113][2] = { | 65 static const uint16_t mpeg1_vlc[113][2] = { |
| 70 { 0x3, 2 }, { 0x4, 4 }, { 0x5, 5 }, { 0x6, 7 }, | 66 { 0x3, 2 }, { 0x4, 4 }, { 0x5, 5 }, { 0x6, 7 }, |
| 71 { 0x26, 8 }, { 0x21, 8 }, { 0xa, 10 }, { 0x1d, 12 }, | 67 { 0x26, 8 }, { 0x21, 8 }, { 0xa, 10 }, { 0x1d, 12 }, |
| 72 { 0x18, 12 }, { 0x13, 12 }, { 0x10, 12 }, { 0x1a, 13 }, | 68 { 0x18, 12 }, { 0x13, 12 }, { 0x10, 12 }, { 0x1a, 13 }, |
| 163 9, 9, 10, 10, 11, 11, 12, 12, | 159 9, 9, 10, 10, 11, 11, 12, 12, |
| 164 13, 13, 14, 14, 15, 15, 16, 16, | 160 13, 13, 14, 14, 15, 15, 16, 16, |
| 165 17, 18, 19, 20, 21, 22, 23, 24, | 161 17, 18, 19, 20, 21, 22, 23, 24, |
| 166 25, 26, 27, 28, 29, 30, 31, | 162 25, 26, 27, 28, 29, 30, 31, |
| 167 }; | 163 }; |
| 168 | |
| 169 static uint8_t mpeg1_index_run[2][64]; | |
| 170 static int8_t mpeg1_max_level[2][64]; | |
| 171 | 164 |
| 172 static RLTable rl_mpeg1 = { | 165 static RLTable rl_mpeg1 = { |
| 173 111, | 166 111, |
| 174 111, | 167 111, |
| 175 mpeg1_vlc, | 168 mpeg1_vlc, |
