Mercurial > libavcodec.hg
comparison mpeg4data.h @ 1064:b32afefe7d33 libavcodec
* UINTX -> uintx_t INTX -> intx_t
| author | kabi |
|---|---|
| date | Tue, 11 Feb 2003 16:35:48 +0000 |
| parents | c237f5db1c22 |
| children | 1e39f273ecd6 |
comparison
equal
deleted
inserted
replaced
| 1063:fdeac9642346 | 1064:b32afefe7d33 |
|---|---|
| 32 #define GOP_STARTCODE 0x1B3 | 32 #define GOP_STARTCODE 0x1B3 |
| 33 #define VISUAL_OBJ_STARTCODE 0x1B5 | 33 #define VISUAL_OBJ_STARTCODE 0x1B5 |
| 34 #define VOP_STARTCODE 0x1B6 | 34 #define VOP_STARTCODE 0x1B6 |
| 35 | 35 |
| 36 /* dc encoding for mpeg4 */ | 36 /* dc encoding for mpeg4 */ |
| 37 const UINT8 DCtab_lum[13][2] = | 37 const uint8_t DCtab_lum[13][2] = |
| 38 { | 38 { |
| 39 {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, | 39 {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, |
| 40 {1,8}, {1,9}, {1,10}, {1,11}, | 40 {1,8}, {1,9}, {1,10}, {1,11}, |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 const UINT8 DCtab_chrom[13][2] = | 43 const uint8_t DCtab_chrom[13][2] = |
| 44 { | 44 { |
| 45 {3,2}, {2,2}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, {1,8}, | 45 {3,2}, {2,2}, {1,2}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7}, {1,8}, |
| 46 {1,9}, {1,10}, {1,11}, {1,12}, | 46 {1,9}, {1,10}, {1,11}, {1,12}, |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 const UINT16 intra_vlc[103][2] = { | 49 const uint16_t intra_vlc[103][2] = { |
| 50 { 0x2, 2 }, | 50 { 0x2, 2 }, |
| 51 { 0x6, 3 },{ 0xf, 4 },{ 0xd, 5 },{ 0xc, 5 }, | 51 { 0x6, 3 },{ 0xf, 4 },{ 0xd, 5 },{ 0xc, 5 }, |
| 52 { 0x15, 6 },{ 0x13, 6 },{ 0x12, 6 },{ 0x17, 7 }, | 52 { 0x15, 6 },{ 0x13, 6 },{ 0x12, 6 },{ 0x17, 7 }, |
| 53 { 0x1f, 8 },{ 0x1e, 8 },{ 0x1d, 8 },{ 0x25, 9 }, | 53 { 0x1f, 8 },{ 0x1e, 8 },{ 0x1d, 8 },{ 0x25, 9 }, |
| 54 { 0x24, 9 },{ 0x23, 9 },{ 0x21, 9 },{ 0x21, 10 }, | 54 { 0x24, 9 },{ 0x23, 9 },{ 0x21, 9 },{ 0x21, 10 }, |
| 74 { 0x13, 9 },{ 0x12, 9 },{ 0x11, 9 },{ 0x26, 11 }, | 74 { 0x13, 9 },{ 0x12, 9 },{ 0x11, 9 },{ 0x26, 11 }, |
| 75 { 0x27, 11 },{ 0x5c, 12 },{ 0x5d, 12 },{ 0x5e, 12 }, | 75 { 0x27, 11 },{ 0x5c, 12 },{ 0x5d, 12 },{ 0x5e, 12 }, |
| 76 { 0x5f, 12 },{ 0x3, 7 }, | 76 { 0x5f, 12 },{ 0x3, 7 }, |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 const INT8 intra_level[102] = { | 79 const int8_t intra_level[102] = { |
| 80 1, 2, 3, 4, 5, 6, 7, 8, | 80 1, 2, 3, 4, 5, 6, 7, 8, |
| 81 9, 10, 11, 12, 13, 14, 15, 16, | 81 9, 10, 11, 12, 13, 14, 15, 16, |
| 82 17, 18, 19, 20, 21, 22, 23, 24, | 82 17, 18, 19, 20, 21, 22, 23, 24, |
| 83 25, 26, 27, 1, 2, 3, 4, 5, | 83 25, 26, 27, 1, 2, 3, 4, 5, |
| 84 6, 7, 8, 9, 10, 1, 2, 3, | 84 6, 7, 8, 9, 10, 1, 2, 3, |
| 90 1, 2, 1, 2, 1, 2, 1, 2, | 90 1, 2, 1, 2, 1, 2, 1, 2, |
| 91 1, 1, 1, 1, 1, 1, 1, 1, | 91 1, 1, 1, 1, 1, 1, 1, 1, |
| 92 1, 1, 1, 1, 1, 1, | 92 1, 1, 1, 1, 1, 1, |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 const INT8 intra_run[102] = { | 95 const int8_t intra_run[102] = { |
| 96 0, 0, 0, 0, 0, 0, 0, 0, | 96 0, 0, 0, 0, 0, 0, 0, 0, |
| 97 0, 0, 0, 0, 0, 0, 0, 0, | 97 0, 0, 0, 0, 0, 0, 0, 0, |
| 98 0, 0, 0, 0, 0, 0, 0, 0, | 98 0, 0, 0, 0, 0, 0, 0, 0, |
| 99 0, 0, 0, 1, 1, 1, 1, 1, | 99 0, 0, 0, 1, 1, 1, 1, 1, |
| 100 1, 1, 1, 1, 1, 2, 2, 2, | 100 1, 1, 1, 1, 1, 2, 2, 2, |
| 114 intra_vlc, | 114 intra_vlc, |
| 115 intra_run, | 115 intra_run, |
| 116 intra_level, | 116 intra_level, |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 static const UINT16 sprite_trajectory_tab[15][2] = { | 119 static const uint16_t sprite_trajectory_tab[15][2] = { |
| 120 {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3}, | 120 {0x00, 2}, {0x02, 3}, {0x03, 3}, {0x04, 3}, {0x05, 3}, {0x06, 3}, |
| 121 {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8}, | 121 {0x0E, 4}, {0x1E, 5}, {0x3E, 6}, {0x7E, 7}, {0xFE, 8}, |
| 122 {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12}, | 122 {0x1FE, 9},{0x3FE, 10},{0x7FE, 11},{0xFFE, 12}, |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 static const UINT8 mb_type_b_tab[4][2] = { | 125 static const uint8_t mb_type_b_tab[4][2] = { |
| 126 {1, 1}, {1, 2}, {1, 3}, {1, 4}, | 126 {1, 1}, {1, 2}, {1, 3}, {1, 4}, |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 static const UINT16 pixel_aspect[16][2]={ | 129 static const uint16_t pixel_aspect[16][2]={ |
| 130 {0, 0}, | 130 {0, 0}, |
| 131 {1, 1}, | 131 {1, 1}, |
| 132 {12, 11}, | 132 {12, 11}, |
| 133 {10, 11}, | 133 {10, 11}, |
| 134 {16, 11}, | 134 {16, 11}, |
| 144 {0, 0}, | 144 {0, 0}, |
| 145 {0, 0}, | 145 {0, 0}, |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 /* these matrixes will be permuted for the idct */ | 148 /* these matrixes will be permuted for the idct */ |
| 149 const INT16 ff_mpeg4_default_intra_matrix[64] = { | 149 const int16_t ff_mpeg4_default_intra_matrix[64] = { |
| 150 8, 17, 18, 19, 21, 23, 25, 27, | 150 8, 17, 18, 19, 21, 23, 25, 27, |
| 151 17, 18, 19, 21, 23, 25, 27, 28, | 151 17, 18, 19, 21, 23, 25, 27, 28, |
| 152 20, 21, 22, 23, 24, 26, 28, 30, | 152 20, 21, 22, 23, 24, 26, 28, 30, |
| 153 21, 22, 23, 24, 26, 28, 30, 32, | 153 21, 22, 23, 24, 26, 28, 30, 32, |
| 154 22, 23, 24, 26, 28, 30, 32, 35, | 154 22, 23, 24, 26, 28, 30, 32, 35, |
| 155 23, 24, 26, 28, 30, 32, 35, 38, | 155 23, 24, 26, 28, 30, 32, 35, 38, |
| 156 25, 26, 28, 30, 32, 35, 38, 41, | 156 25, 26, 28, 30, 32, 35, 38, 41, |
| 157 27, 28, 30, 32, 35, 38, 41, 45, | 157 27, 28, 30, 32, 35, 38, 41, 45, |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 const INT16 ff_mpeg4_default_non_intra_matrix[64] = { | 160 const int16_t ff_mpeg4_default_non_intra_matrix[64] = { |
| 161 16, 17, 18, 19, 20, 21, 22, 23, | 161 16, 17, 18, 19, 20, 21, 22, 23, |
| 162 17, 18, 19, 20, 21, 22, 23, 24, | 162 17, 18, 19, 20, 21, 22, 23, 24, |
| 163 18, 19, 20, 21, 22, 23, 24, 25, | 163 18, 19, 20, 21, 22, 23, 24, 25, |
| 164 19, 20, 21, 22, 23, 24, 26, 27, | 164 19, 20, 21, 22, 23, 24, 26, 27, |
| 165 20, 21, 22, 23, 25, 26, 27, 28, | 165 20, 21, 22, 23, 25, 26, 27, 28, |
| 166 21, 22, 23, 24, 26, 27, 28, 30, | 166 21, 22, 23, 24, 26, 27, 28, 30, |
| 167 22, 23, 24, 26, 27, 28, 30, 31, | 167 22, 23, 24, 26, 27, 28, 30, 31, |
| 168 23, 24, 25, 27, 28, 30, 31, 33, | 168 23, 24, 25, 27, 28, 30, 31, 33, |
| 169 }; | 169 }; |
| 170 | 170 |
| 171 UINT8 ff_mpeg4_y_dc_scale_table[32]={ | 171 uint8_t ff_mpeg4_y_dc_scale_table[32]={ |
| 172 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 172 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
| 173 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46 | 173 0, 8, 8, 8, 8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,36,38,40,42,44,46 |
| 174 }; | 174 }; |
| 175 UINT8 ff_mpeg4_c_dc_scale_table[32]={ | 175 uint8_t ff_mpeg4_c_dc_scale_table[32]={ |
| 176 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 176 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
| 177 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25 | 177 0, 8, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,20,21,22,23,24,25 |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 const UINT16 ff_mpeg4_resync_prefix[8]={ | 180 const uint16_t ff_mpeg4_resync_prefix[8]={ |
| 181 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 | 181 0x7F00, 0x7E00, 0x7C00, 0x7800, 0x7000, 0x6000, 0x4000, 0x0000 |
| 182 }; | 182 }; |
