343 |
/* rest of coeffs for last = 1. indexing by [run-2] */ |
/* rest of coeffs for last = 1. indexing by [run-2] */ |
344 |
|
|
345 |
static VLC coeff_tab3[40][1] = { |
static VLC coeff_tab3[40][1] = { |
346 |
{0x0e, 6}, {0x0d, 6}, {0x0c, 6}, |
{{0x0e, 6}}, {{0x0d, 6}}, {{0x0c, 6}}, |
347 |
{0x13, 7}, {0x12, 7}, {0x11, 7}, {0x10, 7}, |
{{0x13, 7}}, {{0x12, 7}}, {{0x11, 7}}, {{0x10, 7}}, |
348 |
{0x1a, 8}, {0x19, 8}, {0x18, 8}, {0x17, 8}, |
{{0x1a, 8}}, {{0x19, 8}}, {{0x18, 8}}, {{0x17, 8}}, |
349 |
{0x16, 8}, {0x15, 8}, {0x14, 8}, {0x13, 8}, |
{{0x16, 8}}, {{0x15, 8}}, {{0x14, 8}}, {{0x13, 8}}, |
350 |
{0x18, 9}, {0x17, 9}, {0x16, 9}, {0x15, 9}, |
{{0x18, 9}}, {{0x17, 9}}, {{0x16, 9}}, {{0x15, 9}}, |
351 |
{0x14, 9}, {0x13, 9}, {0x12, 9}, {0x11, 9}, |
{{0x14, 9}}, {{0x13, 9}}, {{0x12, 9}}, {{0x11, 9}}, |
352 |
{0x07, 10}, {0x06, 10}, {0x05, 10}, {0x04, 10}, |
{{0x07, 10}}, {{0x06, 10}}, {{0x05, 10}}, {{0x04, 10}}, |
353 |
{0x24, 11}, {0x25, 11}, {0x26, 11}, {0x27, 11}, |
{{0x24, 11}}, {{0x25, 11}}, {{0x26, 11}}, {{0x27, 11}}, |
354 |
{0x58, 12}, {0x59, 12}, {0x5a, 12}, {0x5b, 12}, |
{{0x58, 12}}, {{0x59, 12}}, {{0x5a, 12}}, {{0x5b, 12}}, |
355 |
{0x5c, 12}, {0x5d, 12}, {0x5e, 12}, {0x5f, 12}, |
{{0x5c, 12}}, {{0x5d, 12}}, {{0x5e, 12}}, {{0x5f, 12}}, |
356 |
{0x00, 0} |
{{0x00, 0}} |
357 |
}; |
}; |
358 |
|
|
359 |
/* New tables for Intra luminance coefficients. Same codewords, |
/* New tables for Intra luminance coefficients. Same codewords, |
446 |
/* Coeffs for last = 0, run = 10 -> 14. Indexed by [run-10] */ |
/* Coeffs for last = 0, run = 10 -> 14. Indexed by [run-10] */ |
447 |
|
|
448 |
static VLC coeff_tab7[5][1] = { |
static VLC coeff_tab7[5][1] = { |
449 |
{0x17, 8}, {0x19, 9}, {0x18, 9}, {0x07, 10}, |
{{0x17, 8}}, {{0x19, 9}}, {{0x18, 9}}, {{0x07, 10}}, |
450 |
{0x58, 12} |
{{0x58, 12}} |
451 |
}; |
}; |
452 |
|
|
453 |
/* Coeffs for last = 1, run = 0. Indexed by [level-1] */ |
/* Coeffs for last = 1, run = 0. Indexed by [level-1] */ |
501 |
/* Coeffs for last = 1, run = 7 -> 20. Indexed by [run-7] */ |
/* Coeffs for last = 1, run = 7 -> 20. Indexed by [run-7] */ |
502 |
|
|
503 |
static VLC coeff_tab10[14][1] = { |
static VLC coeff_tab10[14][1] = { |
504 |
{0x14, 8}, {0x13, 8}, {0x1a, 8}, {0x15, 9}, |
{{0x14, 8}}, {{0x13, 8}}, {{0x1a, 8}}, {{0x15, 9}}, |
505 |
{0x14, 9}, {0x13, 9}, {0x12, 9}, {0x11, 9}, |
{{0x14, 9}}, {{0x13, 9}}, {{0x12, 9}}, {{0x11, 9}}, |
506 |
{0x26, 11}, {0x27, 11}, {0x5c, 12}, {0x5d, 12}, |
{{0x26, 11}}, {{0x27, 11}}, {{0x5c, 12}}, {{0x5d, 12}}, |
507 |
{0x5e, 12}, {0x5f, 12} |
{{0x5e, 12}}, {{0x5f, 12}} |
508 |
}; |
}; |
509 |
|
|
510 |
|
|
933 |
{0x10, 11}, {0x0e, 11}, {0x0c, 11}, {0x0a, 11}, |
{0x10, 11}, {0x0e, 11}, {0x0c, 11}, {0x0a, 11}, |
934 |
{0x08, 11}, {0x0e, 12}, {0x0c, 12}, {0x0a, 12}, |
{0x08, 11}, {0x0e, 12}, {0x0c, 12}, {0x0a, 12}, |
935 |
{0x08, 12}, {0x06, 12}, {0x04, 12}, {0x06, 13}, |
{0x08, 12}, {0x06, 12}, {0x04, 12}, {0x06, 13}, |
936 |
{0x04, 13}, |
{0x04, 13} |
937 |
}; |
}; |
938 |
|
|
939 |
|
|
954 |
{3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, |
{3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, |
955 |
{3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, |
{3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, |
956 |
{3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, |
{3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, |
957 |
{3, 1}, |
{3, 1} |
958 |
}; |
}; |
959 |
|
|
960 |
|
|
988 |
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, |
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, |
989 |
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, |
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, |
990 |
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, |
{1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, {1,3}, |
991 |
{1,3}, {1,3}, {1,3}, {0,1}, |
{1,3}, {1,3}, {1,3}, {0,1} |
992 |
}; |
}; |
993 |
|
|
994 |
static const VLC cbpy_table[64] = |
static const VLC cbpy_table[64] = |
1001 |
{11,4}, {11,4}, {11,4}, {11,4}, {7,4}, {7,4}, {7,4}, {7,4}, |
{11,4}, {11,4}, {11,4}, {11,4}, {7,4}, {7,4}, {7,4}, {7,4}, |
1002 |
{15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, |
{15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, |
1003 |
{15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, |
{15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, {15, 2}, |
1004 |
{15, 2}, {15, 2}, |
{15, 2}, {15, 2} |
1005 |
}; |
}; |
1006 |
|
|
1007 |
|
|
1062 |
{17,3}, {17,3}, {17,3}, {17,3}, {17,3}, {17,3}, |
{17,3}, {17,3}, {17,3}, {17,3}, {17,3}, {17,3}, |
1063 |
{33,4}, {33,4}, {33,4}, {33,4}, {33,4}, {33,4}, |
{33,4}, {33,4}, {33,4}, {33,4}, {33,4}, {33,4}, |
1064 |
{33,4}, {33,4}, {2,4}, {2,4},{2,4},{2,4}, |
{33,4}, {33,4}, {2,4}, {2,4},{2,4},{2,4}, |
1065 |
{2,4}, {2,4},{2,4},{2,4}, |
{2,4}, {2,4},{2,4},{2,4} |
1066 |
}; |
}; |
1067 |
|
|
1068 |
|
|
1082 |
{4241,8}, {4241,8}, {4241,8}, {4241,8}, {225,8}, {225,8}, |
{4241,8}, {4241,8}, {4241,8}, {4241,8}, {225,8}, {225,8}, |
1083 |
{225,8}, {225,8}, {209,8}, {209,8}, {209,8}, {209,8}, |
{225,8}, {225,8}, {209,8}, {209,8}, {209,8}, {209,8}, |
1084 |
{34,8}, {34,8}, {34,8}, {34,8}, {19,8}, {19,8}, |
{34,8}, {34,8}, {34,8}, {34,8}, {19,8}, {19,8}, |
1085 |
{19,8}, {19,8}, {5,8}, {5,8}, {5,8}, {5,8}, |
{19,8}, {19,8}, {5,8}, {5,8}, {5,8}, {5,8} |
1086 |
}; |
}; |
1087 |
|
|
1088 |
VLC DCT3Dtab2[] = { |
VLC DCT3Dtab2[] = { |
1106 |
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, |
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, |
1107 |
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, |
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, |
1108 |
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, |
{7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, {7167,7}, |
1109 |
{7167,7}, }; |
{7167,7} |
1110 |
|
}; |
1111 |
|
|
1112 |
|
|
1113 |
/* New tables for Intra luminance blocks */ |
/* New tables for Intra luminance blocks */ |
1140 |
{0x00101, 4}, {0x00101, 4}, {0x00101, 4}, {0x00101, 4}, |
{0x00101, 4}, {0x00101, 4}, {0x00101, 4}, {0x00101, 4}, |
1141 |
{0x00101, 4}, {0x00101, 4}, {0x00101, 4}, {0x00101, 4}, |
{0x00101, 4}, {0x00101, 4}, {0x00101, 4}, {0x00101, 4}, |
1142 |
{0x00003, 4}, {0x00003, 4}, {0x00003, 4}, {0x00003, 4}, |
{0x00003, 4}, {0x00003, 4}, {0x00003, 4}, {0x00003, 4}, |
1143 |
{0x00003, 4}, {0x00003, 4}, {0x00003, 4}, {0x00003, 4}, |
{0x00003, 4}, {0x00003, 4}, {0x00003, 4}, {0x00003, 4} |
1144 |
}; |
}; |
1145 |
|
|
1146 |
|
|
1168 |
{0x00104, 8}, {0x00104, 8}, {0x00104, 8}, {0x00104, 8}, |
{0x00104, 8}, {0x00104, 8}, {0x00104, 8}, {0x00104, 8}, |
1169 |
{0x0000c, 8}, {0x0000c, 8}, {0x0000c, 8}, {0x0000c, 8}, |
{0x0000c, 8}, {0x0000c, 8}, {0x0000c, 8}, {0x0000c, 8}, |
1170 |
{0x0000b, 8}, {0x0000b, 8}, {0x0000b, 8}, {0x0000b, 8}, |
{0x0000b, 8}, {0x0000b, 8}, {0x0000b, 8}, {0x0000b, 8}, |
1171 |
{0x0000a, 8}, {0x0000a, 8}, {0x0000a, 8}, {0x0000a, 8}, |
{0x0000a, 8}, {0x0000a, 8}, {0x0000a, 8}, {0x0000a, 8} |
1172 |
}; |
}; |
1173 |
|
|
1174 |
VLC DCT3Dtab5[] = { |
VLC DCT3Dtab5[] = { |
1201 |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
1202 |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
1203 |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
1204 |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, |
{0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7}, {0x01bff, 7} |
1205 |
}; |
}; |
1206 |
|
|
1207 |
VLC ERRtab[] = { |
VLC ERRtab[] = { |
1209 |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
1210 |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
1211 |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
1212 |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0}, |
{VLC_ERROR, 0}, {VLC_ERROR, 0}, {VLC_ERROR, 0} |
1213 |
}; |
}; |
1214 |
|
|
1215 |
static const VLC dc_lum_tab[] = { |
static const VLC dc_lum_tab[] = { |