00001
00024 #ifndef AVCODEC_VP6DATA_H
00025 #define AVCODEC_VP6DATA_H
00026
00027 #include "vp56data.h"
00028
00029 static const uint8_t vp6_def_fdv_vector_model[2][8] = {
00030 { 247, 210, 135, 68, 138, 220, 239, 246 },
00031 { 244, 184, 201, 44, 173, 221, 239, 253 },
00032 };
00033
00034 static const uint8_t vp6_def_pdv_vector_model[2][7] = {
00035 { 225, 146, 172, 147, 214, 39, 156 },
00036 { 204, 170, 119, 235, 140, 230, 228 },
00037 };
00038
00039 static const uint8_t vp6_def_coeff_reorder[] = {
00040 0, 0, 1, 1, 1, 2, 2, 2,
00041 2, 2, 2, 3, 3, 4, 4, 4,
00042 5, 5, 5, 5, 6, 6, 7, 7,
00043 7, 7, 7, 8, 8, 9, 9, 9,
00044 9, 9, 9, 10, 10, 11, 11, 11,
00045 11, 11, 11, 12, 12, 12, 12, 12,
00046 12, 13, 13, 13, 13, 13, 14, 14,
00047 14, 14, 15, 15, 15, 15, 15, 15,
00048 };
00049
00050 static const uint8_t vp6_def_runv_coeff_model[2][14] = {
00051 { 198, 197, 196, 146, 198, 204, 169, 142, 130, 136, 149, 149, 191, 249 },
00052 { 135, 201, 181, 154, 98, 117, 132, 126, 146, 169, 184, 240, 246, 254 },
00053 };
00054
00055 static const uint8_t vp6_sig_dct_pct[2][2] = {
00056 { 237, 246 },
00057 { 231, 243 },
00058 };
00059
00060 static const uint8_t vp6_pdv_pct[2][7] = {
00061 { 253, 253, 254, 254, 254, 254, 254 },
00062 { 245, 253, 254, 254, 254, 254, 254 },
00063 };
00064
00065 static const uint8_t vp6_fdv_pct[2][8] = {
00066 { 254, 254, 254, 254, 254, 250, 250, 252 },
00067 { 254, 254, 254, 254, 254, 251, 251, 254 },
00068 };
00069
00070 static const uint8_t vp6_dccv_pct[2][11] = {
00071 { 146, 255, 181, 207, 232, 243, 238, 251, 244, 250, 249 },
00072 { 179, 255, 214, 240, 250, 255, 244, 255, 255, 255, 255 },
00073 };
00074
00075 static const uint8_t vp6_coeff_reorder_pct[] = {
00076 255, 132, 132, 159, 153, 151, 161, 170,
00077 164, 162, 136, 110, 103, 114, 129, 118,
00078 124, 125, 132, 136, 114, 110, 142, 135,
00079 134, 123, 143, 126, 153, 183, 166, 161,
00080 171, 180, 179, 164, 203, 218, 225, 217,
00081 215, 206, 203, 217, 229, 241, 248, 243,
00082 253, 255, 253, 255, 255, 255, 255, 255,
00083 255, 255, 255, 255, 255, 255, 255, 255,
00084 };
00085
00086 static const uint8_t vp6_runv_pct[2][14] = {
00087 { 219, 246, 238, 249, 232, 239, 249, 255, 248, 253, 239, 244, 241, 248 },
00088 { 198, 232, 251, 253, 219, 241, 253, 255, 248, 249, 244, 238, 251, 255 },
00089 };
00090
00091 static const uint8_t vp6_ract_pct[3][2][6][11] = {
00092 { { { 227, 246, 230, 247, 244, 255, 255, 255, 255, 255, 255 },
00093 { 255, 255, 209, 231, 231, 249, 249, 253, 255, 255, 255 },
00094 { 255, 255, 225, 242, 241, 251, 253, 255, 255, 255, 255 },
00095 { 255, 255, 241, 253, 252, 255, 255, 255, 255, 255, 255 },
00096 { 255, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 },
00097 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } },
00098 { { 240, 255, 248, 255, 255, 255, 255, 255, 255, 255, 255 },
00099 { 255, 255, 240, 253, 255, 255, 255, 255, 255, 255, 255 },
00100 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00101 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00102 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00103 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } },
00104 { { { 206, 203, 227, 239, 247, 255, 253, 255, 255, 255, 255 },
00105 { 207, 199, 220, 236, 243, 252, 252, 255, 255, 255, 255 },
00106 { 212, 219, 230, 243, 244, 253, 252, 255, 255, 255, 255 },
00107 { 236, 237, 247, 252, 253, 255, 255, 255, 255, 255, 255 },
00108 { 240, 240, 248, 255, 255, 255, 255, 255, 255, 255, 255 },
00109 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } },
00110 { { 230, 233, 249, 255, 255, 255, 255, 255, 255, 255, 255 },
00111 { 238, 238, 250, 255, 255, 255, 255, 255, 255, 255, 255 },
00112 { 248, 251, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00113 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00114 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00115 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } },
00116 { { { 225, 239, 227, 231, 244, 253, 243, 255, 255, 253, 255 },
00117 { 232, 234, 224, 228, 242, 249, 242, 252, 251, 251, 255 },
00118 { 235, 249, 238, 240, 251, 255, 249, 255, 253, 253, 255 },
00119 { 249, 253, 251, 250, 255, 255, 255, 255, 255, 255, 255 },
00120 { 251, 250, 249, 255, 255, 255, 255, 255, 255, 255, 255 },
00121 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } },
00122 { { 243, 244, 250, 250, 255, 255, 255, 255, 255, 255, 255 },
00123 { 249, 248, 250, 253, 255, 255, 255, 255, 255, 255, 255 },
00124 { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00125 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00126 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
00127 { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 } } }
00128 };
00129
00130 static const int vp6_dccv_lc[3][5][2] = {
00131 { { 122, 133 }, { 0, 1 }, { 78, 171 }, { 139, 117 }, { 168, 79 } },
00132 { { 133, 51 }, { 0, 1 }, { 169, 71 }, { 214, 44 }, { 210, 38 } },
00133 { { 142, -16 }, { 0, 1 }, { 221, -30 }, { 246, -3 }, { 203, 17 } },
00134 };
00135
00136 static const uint8_t vp6_coeff_groups[] = {
00137 0, 0, 1, 1, 1, 2, 2, 2,
00138 2, 2, 2, 3, 3, 3, 3, 3,
00139 3, 3, 3, 3, 3, 3, 4, 4,
00140 4, 4, 4, 4, 4, 4, 4, 4,
00141 4, 4, 4, 4, 4, 5, 5, 5,
00142 5, 5, 5, 5, 5, 5, 5, 5,
00143 5, 5, 5, 5, 5, 5, 5, 5,
00144 5, 5, 5, 5, 5, 5, 5, 5,
00145 };
00146
00147 static const int16_t vp6_block_copy_filter[17][8][4] = {
00148 { { 0, 128, 0, 0 },
00149 { -3, 122, 9, 0 },
00150 { -4, 109, 24, -1 },
00151 { -5, 91, 45, -3 },
00152 { -4, 68, 68, -4 },
00153 { -3, 45, 91, -5 },
00154 { -1, 24, 109, -4 },
00155 { 0, 9, 122, -3 } },
00156 { { 0, 128, 0, 0 },
00157 { -4, 124, 9, -1 },
00158 { -5, 110, 25, -2 },
00159 { -6, 91, 46, -3 },
00160 { -5, 69, 69, -5 },
00161 { -3, 46, 91, -6 },
00162 { -2, 25, 110, -5 },
00163 { -1, 9, 124, -4 } },
00164 { { 0, 128, 0, 0 },
00165 { -4, 123, 10, -1 },
00166 { -6, 110, 26, -2 },
00167 { -7, 92, 47, -4 },
00168 { -6, 70, 70, -6 },
00169 { -4, 47, 92, -7 },
00170 { -2, 26, 110, -6 },
00171 { -1, 10, 123, -4 } },
00172 { { 0, 128, 0, 0 },
00173 { -5, 124, 10, -1 },
00174 { -7, 110, 27, -2 },
00175 { -7, 91, 48, -4 },
00176 { -6, 70, 70, -6 },
00177 { -4, 48, 92, -8 },
00178 { -2, 27, 110, -7 },
00179 { -1, 10, 124, -5 } },
00180 { { 0, 128, 0, 0 },
00181 { -6, 124, 11, -1 },
00182 { -8, 111, 28, -3 },
00183 { -8, 92, 49, -5 },
00184 { -7, 71, 71, -7 },
00185 { -5, 49, 92, -8 },
00186 { -3, 28, 111, -8 },
00187 { -1, 11, 124, -6 } },
00188 { { 0, 128, 0, 0 },
00189 { -6, 123, 12, -1 },
00190 { -9, 111, 29, -3 },
00191 { -9, 93, 50, -6 },
00192 { -8, 72, 72, -8 },
00193 { -6, 50, 93, -9 },
00194 { -3, 29, 111, -9 },
00195 { -1, 12, 123, -6 } },
00196 { { 0, 128, 0, 0 },
00197 { -7, 124, 12, -1 },
00198 { -10, 111, 30, -3 },
00199 { -10, 93, 51, -6 },
00200 { -9, 73, 73, -9 },
00201 { -6, 51, 93, -10 },
00202 { -3, 30, 111, -10 },
00203 { -1, 12, 124, -7 } },
00204 { { 0, 128, 0, 0 },
00205 { -7, 123, 13, -1 },
00206 { -11, 112, 31, -4 },
00207 { -11, 94, 52, -7 },
00208 { -10, 74, 74, -10 },
00209 { -7, 52, 94, -11 },
00210 { -4, 31, 112, -11 },
00211 { -1, 13, 123, -7 } },
00212 { { 0, 128, 0, 0 },
00213 { -8, 124, 13, -1 },
00214 { -12, 112, 32, -4 },
00215 { -12, 94, 53, -7 },
00216 { -10, 74, 74, -10 },
00217 { -7, 53, 94, -12 },
00218 { -4, 32, 112, -12 },
00219 { -1, 13, 124, -8 } },
00220 { { 0, 128, 0, 0 },
00221 { -9, 124, 14, -1 },
00222 { -13, 112, 33, -4 },
00223 { -13, 95, 54, -8 },
00224 { -11, 75, 75, -11 },
00225 { -8, 54, 95, -13 },
00226 { -4, 33, 112, -13 },
00227 { -1, 14, 124, -9 } },
00228 { { 0, 128, 0, 0 },
00229 { -9, 123, 15, -1 },
00230 { -14, 113, 34, -5 },
00231 { -14, 95, 55, -8 },
00232 { -12, 76, 76, -12 },
00233 { -8, 55, 95, -14 },
00234 { -5, 34, 112, -13 },
00235 { -1, 15, 123, -9 } },
00236 { { 0, 128, 0, 0 },
00237 { -10, 124, 15, -1 },
00238 { -14, 113, 34, -5 },
00239 { -15, 96, 56, -9 },
00240 { -13, 77, 77, -13 },
00241 { -9, 56, 96, -15 },
00242 { -5, 34, 113, -14 },
00243 { -1, 15, 124, -10 } },
00244 { { 0, 128, 0, 0 },
00245 { -10, 123, 16, -1 },
00246 { -15, 113, 35, -5 },
00247 { -16, 98, 56, -10 },
00248 { -14, 78, 78, -14 },
00249 { -10, 56, 98, -16 },
00250 { -5, 35, 113, -15 },
00251 { -1, 16, 123, -10 } },
00252 { { 0, 128, 0, 0 },
00253 { -11, 124, 17, -2 },
00254 { -16, 113, 36, -5 },
00255 { -17, 98, 57, -10 },
00256 { -14, 78, 78, -14 },
00257 { -10, 57, 98, -17 },
00258 { -5, 36, 113, -16 },
00259 { -2, 17, 124, -11 } },
00260 { { 0, 128, 0, 0 },
00261 { -12, 125, 17, -2 },
00262 { -17, 114, 37, -6 },
00263 { -18, 99, 58, -11 },
00264 { -15, 79, 79, -15 },
00265 { -11, 58, 99, -18 },
00266 { -6, 37, 114, -17 },
00267 { -2, 17, 125, -12 } },
00268 { { 0, 128, 0, 0 },
00269 { -12, 124, 18, -2 },
00270 { -18, 114, 38, -6 },
00271 { -19, 99, 59, -11 },
00272 { -16, 80, 80, -16 },
00273 { -11, 59, 99, -19 },
00274 { -6, 38, 114, -18 },
00275 { -2, 18, 124, -12 } },
00276 { { 0, 128, 0, 0 },
00277 { -4, 118, 16, -2 },
00278 { -7, 106, 34, -5 },
00279 { -8, 90, 53, -7 },
00280 { -8, 72, 72, -8 },
00281 { -7, 53, 90, -8 },
00282 { -5, 34, 106, -7 },
00283 { -2, 16, 118, -4 } },
00284 };
00285
00286 static const VP56Tree vp6_pcr_tree[] = {
00287 { 8, 0},
00288 { 4, 1},
00289 { 2, 2}, {-1}, {-2},
00290 { 2, 3}, {-3}, {-4},
00291 { 8, 4},
00292 { 4, 5},
00293 { 2, 6}, {-5}, {-6},
00294 { 2, 7}, {-7}, {-8},
00295 {-0},
00296 };
00297
00298 static const uint8_t vp6_coord_div[] = { 4, 4, 4, 4, 8, 8 };
00299
00300 static const uint8_t vp6_huff_coeff_map[] = {
00301 13, 14, 11, 0, 1, 15, 16, 18, 2, 17, 3, 4, 19, 20, 5, 6, 21, 22, 7, 8, 9, 10
00302 };
00303
00304 static const uint8_t vp6_huff_run_map[] = {
00305 10, 13, 11, 12, 0, 1, 2, 3, 14, 8, 15, 16, 4, 5, 6, 7
00306 };
00307
00308 #endif