comparison cavsdata.h @ 5249:dc2579bede07 libavcodec

prepare splitting decoder-only parts into own file: make commonly used tables global
author stefang
date Sun, 08 Jul 2007 07:13:25 +0000
parents deb5b8213d4e
children 2a3d31a8c66f
comparison
equal deleted inserted replaced
5248:d138b2abf3d5 5249:dc2579bede07
22 #ifndef AVCODEC_CAVSDATA_H 22 #ifndef AVCODEC_CAVSDATA_H
23 #define AVCODEC_CAVSDATA_H 23 #define AVCODEC_CAVSDATA_H
24 24
25 #include "cavs.h" 25 #include "cavs.h"
26 26
27 static const uint8_t partition_flags[30] = { 27 const uint8_t ff_cavs_partition_flags[30] = {
28 0, //I_8X8 28 0, //I_8X8
29 0, //P_SKIP 29 0, //P_SKIP
30 0, //P_16X16 30 0, //P_16X16
31 SPLITH, //P_16X8 31 SPLITH, //P_16X8
32 SPLITV, //P_8X16 32 SPLITV, //P_8X16
55 FWD0|FWD1|SYM0|SYM1|SPLITH, 55 FWD0|FWD1|SYM0|SYM1|SPLITH,
56 FWD0|FWD1|SYM0|SYM1 |SPLITV, 56 FWD0|FWD1|SYM0|SYM1 |SPLITV,
57 SPLITH|SPLITV, //B_8X8 = 29 57 SPLITH|SPLITV, //B_8X8 = 29
58 }; 58 };
59 59
60 static const uint8_t scan3x3[4] = {4,5,7,8}; 60 const uint8_t ff_cavs_scan3x3[4] = {4,5,7,8};
61 61
62 static const uint8_t mv_scan[4] = { 62 static const uint8_t mv_scan[4] = {
63 MV_FWD_X0,MV_FWD_X1, 63 MV_FWD_X0,MV_FWD_X1,
64 MV_FWD_X2,MV_FWD_X3 64 MV_FWD_X2,MV_FWD_X3
65 }; 65 };
73 {42,24},{26,53},{44,17},{32,37},{58,39},{24,45},{20,58},{17,43}, 73 {42,24},{26,53},{44,17},{32,37},{58,39},{24,45},{20,58},{17,43},
74 {18,42},{48,46},{22,36},{33,33},{25,34},{49,40},{40,52},{36,49}, 74 {18,42},{48,46},{22,36},{33,33},{25,34},{49,40},{40,52},{36,49},
75 {34,50},{50,56},{52,25},{54,22},{41,54},{56,57},{38,41},{57,38} 75 {34,50},{50,56},{52,25},{54,22},{41,54},{56,57},{38,41},{57,38}
76 }; 76 };
77 77
78 static const uint8_t chroma_qp[64] = { 78 const uint8_t ff_cavs_chroma_qp[64] = {
79 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 79 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,
80 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, 80 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
81 32,33,34,35,36,37,38,39,40,41,42,42,43,43,44,44, 81 32,33,34,35,36,37,38,39,40,41,42,42,43,43,44,44,
82 45,45,46,46,47,47,48,48,48,49,49,49,50,50,50,51 82 45,45,46,46,47,47,48,48,48,49,49,49,50,50,50,51
83 }; 83 };
84 84
85 static const uint8_t dequant_shift[64] = { 85 const uint8_t ff_cavs_dequant_shift[64] = {
86 14,14,14,14,14,14,14,14, 86 14,14,14,14,14,14,14,14,
87 13,13,13,13,13,13,13,13, 87 13,13,13,13,13,13,13,13,
88 13,12,12,12,12,12,12,12, 88 13,12,12,12,12,12,12,12,
89 11,11,11,11,11,11,11,11, 89 11,11,11,11,11,11,11,11,
90 11,10,10,10,10,10,10,10, 90 11,10,10,10,10,10,10,10,
91 10, 9, 9, 9, 9, 9, 9, 9, 91 10, 9, 9, 9, 9, 9, 9, 9,
92 9, 8, 8, 8, 8, 8, 8, 8, 92 9, 8, 8, 8, 8, 8, 8, 8,
93 7, 7, 7, 7, 7, 7, 7, 7 93 7, 7, 7, 7, 7, 7, 7, 7
94 }; 94 };
95 95
96 static const uint16_t dequant_mul[64] = { 96 const uint16_t ff_cavs_dequant_mul[64] = {
97 32768,36061,38968,42495,46341,50535,55437,60424, 97 32768,36061,38968,42495,46341,50535,55437,60424,
98 32932,35734,38968,42495,46177,50535,55109,59933, 98 32932,35734,38968,42495,46177,50535,55109,59933,
99 65535,35734,38968,42577,46341,50617,55027,60097, 99 65535,35734,38968,42577,46341,50617,55027,60097,
100 32809,35734,38968,42454,46382,50576,55109,60056, 100 32809,35734,38968,42454,46382,50576,55109,60056,
101 65535,35734,38968,42495,46320,50515,55109,60076, 101 65535,35734,38968,42495,46320,50515,55109,60076,
115 /** marks block as using intra prediction */ 115 /** marks block as using intra prediction */
116 const vector_t ff_cavs_intra_mv = {0,0,1,REF_INTRA}; 116 const vector_t ff_cavs_intra_mv = {0,0,1,REF_INTRA};
117 117
118 #define EOB 0,0,0 118 #define EOB 0,0,0
119 119
120 static const dec_2dvlc_t intra_dec[7] = { 120 const dec_2dvlc_t ff_cavs_intra_dec[7] = {
121 { 121 {
122 { //level / run / table_inc 122 { //level / run / table_inc
123 { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1}, 123 { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
124 { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1}, 124 { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1},
125 { 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1}, 125 { 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1},
252 INT_MAX, //inc_limit 252 INT_MAX, //inc_limit
253 2, //max_run 253 2, //max_run
254 } 254 }
255 }; 255 };
256 256
257 static const dec_2dvlc_t inter_dec[7] = { 257 const dec_2dvlc_t ff_cavs_inter_dec[7] = {
258 { 258 {
259 { //level / run 259 { //level / run
260 { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1}, 260 { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
261 { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1}, 261 { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1},
262 { 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1}, 262 { 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1},
389 INT_MAX, //inc_limit 389 INT_MAX, //inc_limit
390 4 //max_run 390 4 //max_run
391 } 391 }
392 }; 392 };
393 393
394 static const dec_2dvlc_t chroma_dec[5] = { 394 const dec_2dvlc_t ff_cavs_chroma_dec[5] = {
395 { 395 {
396 { //level / run 396 { //level / run
397 { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1}, 397 { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
398 { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1}, 398 { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1},
399 { 1, 7, 1},{ -1, 7, 1},{ 2, 1, 2},{ -2, 1, 2},{ 1, 8, 1},{ -1, 8, 1}, 399 { 1, 7, 1},{ -1, 7, 1},{ 2, 1, 2},{ -2, 1, 2},{ 1, 8, 1},{ -1, 8, 1},