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