00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "avcodec.h"
00023 #include "dnxhddata.h"
00024
00025 static const uint8_t dnxhd_1235_luma_weight[] = {
00026 0, 32, 32, 32, 33, 35, 38, 39,
00027 32, 33, 32, 33, 36, 36, 39, 42,
00028 32, 32, 33, 36, 35, 37, 41, 43,
00029 31, 33, 34, 36, 36, 40, 42, 48,
00030 32, 34, 36, 37, 39, 42, 46, 51,
00031 36, 37, 37, 39, 41, 46, 51, 55,
00032 37, 39, 41, 41, 47, 50, 55, 56,
00033 41, 42, 41, 44, 50, 53, 60, 60
00034 };
00035
00036 static const uint8_t dnxhd_1235_chroma_weight[] = {
00037 0, 32, 33, 34, 39, 41, 54, 59,
00038 33, 34, 35, 38, 43, 49, 58, 84,
00039 34, 37, 39, 44, 46, 55, 74, 87,
00040 40, 42, 47, 48, 58, 70, 87, 86,
00041 43, 50, 56, 63, 72, 94, 91, 82,
00042 55, 63, 65, 75, 93, 89, 85, 73,
00043 61, 67, 82, 81, 83, 90, 79, 73,
00044 74, 84, 75, 78, 90, 85, 73, 73
00045 };
00046
00047 static const uint8_t dnxhd_1237_luma_weight[] = {
00048 0, 32, 33, 34, 34, 36, 37, 36,
00049 36, 37, 38, 38, 38, 39, 41, 44,
00050 43, 41, 40, 41, 46, 49, 47, 46,
00051 47, 49, 51, 54, 60, 62, 59, 55,
00052 54, 56, 58, 61, 65, 66, 64, 63,
00053 66, 73, 78, 79, 80, 79, 78, 78,
00054 82, 87, 89, 90, 93, 95, 96, 97,
00055 97, 100, 104, 102, 98, 98, 99, 99,
00056 };
00057
00058 static const uint8_t dnxhd_1237_chroma_weight[] = {
00059 0, 32, 36, 39, 39, 38, 39, 41,
00060 45, 51, 57, 58, 53, 48, 47, 51,
00061 55, 58, 66, 75, 81, 83, 82, 78,
00062 73, 72, 74, 77, 83, 85, 83, 82,
00063 89, 99, 96, 90, 94, 97, 99, 105,
00064 109, 105, 95, 89, 92, 95, 94, 93,
00065 92, 88, 89, 90, 93, 95, 96, 97,
00066 97, 100, 104, 102, 98, 98, 99, 99,
00067 };
00068
00069 static const uint8_t dnxhd_1238_luma_weight[] = {
00070 0, 32, 32, 33, 34, 33, 33, 33,
00071 33, 33, 33, 33, 33, 35, 37, 37,
00072 36, 36, 35, 36, 38, 38, 36, 35,
00073 36, 37, 38, 41, 42, 41, 39, 38,
00074 38, 38, 39, 41, 42, 41, 39, 39,
00075 40, 41, 43, 44, 44, 44, 44, 44,
00076 45, 47, 47, 47, 49, 50, 51, 51,
00077 51, 53, 55, 57, 58, 59, 57, 57,
00078 };
00079
00080 static const uint8_t dnxhd_1238_chroma_weight[] = {
00081 0, 32, 35, 35, 35, 34, 34, 35,
00082 39, 43, 45, 45, 41, 39, 40, 41,
00083 42, 44, 48, 55, 59, 63, 65, 59,
00084 53, 52, 52, 55, 61, 62, 58, 58,
00085 63, 66, 66, 65, 70, 74, 70, 66,
00086 65, 68, 75, 77, 74, 74, 77, 76,
00087 73, 73, 73, 73, 76, 80, 89, 90,
00088 82, 77, 80, 86, 84, 82, 82, 82,
00089 };
00090
00091 static const uint8_t dnxhd_1241_luma_weight[] = {
00092 0, 32, 33, 34, 34, 35, 36, 37,
00093 36, 37, 38, 38, 38, 39, 39, 40,
00094 40, 38, 38, 39, 38, 37, 39, 41,
00095 41, 42, 43, 45, 45, 46, 47, 46,
00096 45, 43, 39, 37, 37, 40, 44, 45,
00097 45, 46, 46, 46, 47, 47, 46, 44,
00098 42, 43, 45, 47, 48, 49, 50, 49,
00099 48, 46, 47, 48, 48, 49, 49, 49,
00100 };
00101
00102 static const uint8_t dnxhd_1241_chroma_weight[] = {
00103 0, 32, 36, 38, 37, 37, 40, 41,
00104 40, 40, 42, 42, 41, 41, 41, 41,
00105 42, 43, 44, 44, 45, 46, 46, 45,
00106 44, 45, 45, 45, 45, 46, 47, 46,
00107 45, 44, 42, 41, 43, 45, 45, 47,
00108 48, 48, 48, 46, 47, 47, 46, 47,
00109 46, 45, 45, 47, 48, 49, 50, 49,
00110 48, 46, 48, 49, 48, 49, 49, 49,
00111 };
00112
00113 static const uint8_t dnxhd_1242_luma_weight[] = {
00114 0, 32, 33, 33, 34, 35, 36, 35,
00115 33, 33, 35, 36, 37, 37, 38, 37,
00116 37, 37, 36, 37, 37, 37, 38, 39,
00117 37, 36, 37, 40, 42, 45, 46, 44,
00118 41, 42, 44, 45, 47, 49, 50, 48,
00119 46, 48, 49, 50, 52, 52, 50, 49,
00120 47, 48, 50, 50, 51, 51, 50, 49,
00121 49, 51, 52, 51, 49, 47, 47, 47,
00122 };
00123
00124 static const uint8_t dnxhd_1242_chroma_weight[] = {
00125 0, 32, 37, 42, 45, 45, 45, 44,
00126 38, 37, 40, 42, 44, 49, 51, 47,
00127 41, 40, 43, 44, 46, 48, 51, 54,
00128 51, 47, 47, 45, 47, 50, 51, 49,
00129 46, 47, 49, 47, 50, 55, 55, 51,
00130 48, 49, 51, 51, 52, 52, 54, 54,
00131 49, 49, 52, 53, 54, 54, 53, 53,
00132 55, 59, 63, 62, 60, 60, 60, 60,
00133 };
00134
00135 static const uint8_t dnxhd_1243_luma_weight[] = {
00136 0, 32, 32, 33, 33, 35, 35, 35,
00137 35, 35, 35, 35, 34, 35, 38, 40,
00138 39, 37, 37, 37, 36, 35, 36, 38,
00139 40, 41, 42, 44, 45, 44, 42, 41,
00140 40, 38, 36, 36, 37, 38, 40, 43,
00141 44, 45, 45, 45, 45, 45, 45, 41,
00142 39, 41, 45, 47, 47, 48, 48, 48,
00143 46, 44, 45, 47, 47, 48, 47, 47,
00144 };
00145
00146 static const uint8_t dnxhd_1243_chroma_weight[] = {
00147 0, 32, 36, 37, 36, 37, 39, 39,
00148 41, 43, 43, 42, 41, 41, 41, 42,
00149 43, 43, 43, 44, 44, 44, 46, 47,
00150 46, 45, 45, 45, 45, 46, 44, 44,
00151 45, 44, 42, 41, 43, 46, 45, 44,
00152 45, 45, 45, 46, 46, 46, 45, 44,
00153 45, 44, 45, 47, 47, 48, 49, 48,
00154 46, 45, 46, 47, 47, 48, 47, 47,
00155 };
00156
00157 static const uint8_t dnxhd_1250_luma_weight[] = {
00158 0, 32, 35, 35, 36, 36, 41, 43,
00159 32, 34, 35, 36, 37, 39, 43, 47,
00160 33, 34, 36, 38, 38, 42, 42, 50,
00161 34, 36, 38, 38, 41, 40, 47, 54,
00162 35, 38, 39, 40, 39, 45, 49, 58,
00163 38, 39, 40, 39, 46, 47, 54, 60,
00164 38, 39, 41, 46, 46, 48, 57, 62,
00165 40, 41, 44, 45, 49, 54, 63, 63
00166 };
00167
00168 static const uint8_t dnxhd_1250_chroma_weight[] = {
00169 0, 32, 35, 36, 40, 42, 51, 51,
00170 35, 36, 39, 39, 43, 51, 52, 55,
00171 36, 41, 41, 43, 51, 53, 54, 56,
00172 43, 44, 45, 50, 54, 54, 55, 57,
00173 45, 48, 50, 51, 55, 58, 59, 58,
00174 49, 52, 49, 57, 58, 62, 58, 60,
00175 51, 51, 56, 58, 62, 61, 59, 62,
00176 52, 52, 60, 61, 59, 59, 63, 63
00177 };
00178
00179 static const uint8_t dnxhd_1251_luma_weight[] = {
00180 0, 32, 32, 34, 34, 34, 34, 35,
00181 35, 35, 36, 37, 36, 36, 35, 36,
00182 38, 38, 38, 38, 38, 38, 38, 38,
00183 38, 38, 39, 41, 44, 43, 41, 40,
00184 40, 40, 40, 39, 40, 41, 40, 39,
00185 40, 43, 46, 46, 44, 44, 44, 42,
00186 41, 43, 46, 48, 50, 55, 58, 53,
00187 48, 50, 55, 58, 61, 62, 62, 62,
00188 };
00189
00190 static const uint8_t dnxhd_1251_chroma_weight[] = {
00191 0, 32, 35, 36, 36, 35, 36, 39,
00192 41, 43, 45, 44, 41, 39, 40, 42,
00193 43, 43, 45, 48, 48, 48, 50, 50,
00194 50, 51, 51, 51, 51, 52, 53, 54,
00195 51, 49, 51, 52, 52, 56, 57, 55,
00196 54, 54, 55, 56, 55, 58, 58, 58,
00197 60, 61, 62, 62, 59, 57, 58, 58,
00198 61, 59, 59, 59, 61, 62, 62, 62,
00199 };
00200
00201 static const uint8_t dnxhd_1252_luma_weight[] = {
00202 0, 32, 34, 35, 36, 36, 36, 37,
00203 36, 37, 39, 40, 41, 40, 40, 40,
00204 41, 41, 42, 41, 41, 43, 44, 44,
00205 45, 46, 48, 55, 60, 57, 52, 50,
00206 49, 49, 52, 52, 53, 55, 58, 62,
00207 65, 73, 82, 82, 80, 78, 73, 68,
00208 71, 82, 90, 90, 88, 87, 90, 95,
00209 100, 107, 103, 97, 95, 93, 99, 99,
00210 };
00211 static const uint8_t dnxhd_1252_chroma_weight[] = {
00212 0, 32, 35, 36, 37, 37, 38, 40,
00213 42, 46, 49, 50, 50, 49, 49, 53,
00214 56, 56, 57, 58, 60, 62, 64, 65,
00215 63, 64, 64, 65, 66, 65, 67, 71,
00216 72, 74, 74, 74, 74, 77, 81, 78,
00217 72, 73, 82, 85, 89, 88, 84, 80,
00218 90, 100, 90, 90, 88, 87, 90, 95,
00219 114, 128, 125, 129, 134, 125, 116, 116,
00220 };
00221
00222 static const uint8_t dnxhd_1237_dc_codes[12] = {
00223 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63,
00224 };
00225
00226 static const uint8_t dnxhd_1237_dc_bits[12] = {
00227 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6,
00228 };
00229
00230 static const uint16_t dnxhd_1237_ac_codes[257] = {
00231 0, 1, 4, 5, 12, 26, 27, 56,
00232 57, 58, 59, 120, 121, 244, 245, 246,
00233 247, 248, 498, 499, 500, 501, 502, 1006,
00234 1007, 1008, 1009, 1010, 1011, 2024, 2025, 2026,
00235 2027, 2028, 2029, 2030, 2031, 4064, 4065, 4066,
00236 4067, 4068, 4069, 4070, 4071, 4072, 4073, 8148,
00237 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156,
00238 8157, 8158, 16318, 16319, 16320, 16321, 16322, 16323,
00239 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331,
00240 16332, 16333, 32668, 32669, 32670, 32671, 32672, 32673,
00241 32674, 32675, 32676, 32677, 32678, 32679, 32680, 32681,
00242 32682, 32683, 32684, 65370, 65371, 65372, 65373, 65374,
00243 65375, 65376, 65377, 65378, 65379, 65380, 65381, 65382,
00244 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390,
00245 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398,
00246 65399, 65400, 65401, 65402, 65403, 65404, 65405, 65406,
00247 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414,
00248 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422,
00249 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430,
00250 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
00251 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
00252 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
00253 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
00254 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
00255 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
00256 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
00257 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
00258 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
00259 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
00260 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
00261 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
00262 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
00263 65535,
00264 };
00265
00266 static const uint8_t dnxhd_1237_ac_bits[257] = {
00267 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8,
00268 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11,
00269 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13,
00270 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14,
00271 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15,
00272 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16,
00273 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00274 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00275 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00276 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00277 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00278 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00279 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00280 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00281 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00282 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00283 16,
00284 };
00285
00286 static const uint8_t dnxhd_1237_ac_level[257] = {
00287 3, 3, 5, 0, 7, 9, 5, 11, 13, 15, 7, 17, 19, 21, 23, 25,
00288 9, 11, 27, 29, 31, 33, 13, 35, 37, 39, 41, 43, 15, 45, 47, 49,
00289 51, 53, 55, 17, 19, 57, 59, 61, 63, 65, 67, 69, 21, 23, 25, 71,
00290 73, 75, 77, 79, 81, 83, 27, 29, 31, 33, 85, 87, 89, 91, 93, 95,
00291 97, 99,101,103,105, 35, 37, 39, 41, 43,107,109,111,113,115,117,
00292 119,121,123,129, 3, 45, 47, 49, 51, 53, 55,125,127, 5, 7, 9,
00293 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41,
00294 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73,
00295 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,
00296 107,109,111,113,115,117,119,121,123,125,127,129, 57, 59, 61, 63,
00297 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00298 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00299 129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
00300 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
00301 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00302 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00303 129,
00304 };
00305
00306 static const uint8_t dnxhd_1237_ac_flags[257] = {
00307 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0,
00308 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0,
00309 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0,
00310 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
00311 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0,
00312 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1,
00313 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00314 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00315 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
00317 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00318 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00319 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00320 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00321 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00322 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00323 3,
00324 };
00325
00326 static const uint16_t dnxhd_1237_run_codes[62] = {
00327 0, 4, 10, 11, 24, 25, 26, 54,
00328 55, 56, 57, 58, 118, 119, 240, 482,
00329 483, 484, 485, 486, 487, 488, 489, 490,
00330 491, 492, 493, 494, 990, 991, 992, 993,
00331 994, 995, 996, 997, 998, 999, 1000, 1001,
00332 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
00333 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
00334 1018, 1019, 1020, 1021, 1022, 1023,
00335 };
00336
00337 static const uint8_t dnxhd_1237_run_bits[62] = {
00338 1, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 9,
00339 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
00340 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00341 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00342 };
00343
00344 static const uint8_t dnxhd_1237_run[62] = {
00345 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
00346 17, 18, 19, 20, 21, 53, 57, 58, 59, 60, 61, 62, 22, 23, 24, 25,
00347 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
00348 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56,
00349 };
00350
00351 static const uint8_t dnxhd_1238_dc_codes[12] = {
00352 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63,
00353 };
00354
00355 static const uint8_t dnxhd_1238_dc_bits[12] = {
00356 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6,
00357 };
00358
00359 static const uint16_t dnxhd_1238_ac_codes[257] = {
00360 0, 1, 4, 10, 11, 24, 25, 26,
00361 54, 55, 56, 57, 116, 117, 118, 119,
00362 240, 241, 242, 243, 244, 245, 492, 493,
00363 494, 495, 496, 497, 498, 499, 1000, 1001,
00364 1002, 1003, 1004, 1005, 1006, 1007, 1008, 2018,
00365 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026,
00366 2027, 4056, 4057, 4058, 4059, 4060, 4061, 4062,
00367 4063, 4064, 4065, 4066, 4067, 4068, 4069, 8140,
00368 8141, 8142, 8143, 8144, 8145, 8146, 8147, 8148,
00369 8149, 8150, 8151, 8152, 8153, 8154, 8155, 8156,
00370 16314, 16315, 16316, 16317, 16318, 16319, 16320, 16321,
00371 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329,
00372 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337,
00373 16338, 32678, 32679, 32680, 32681, 32682, 32683, 32684,
00374 32685, 32686, 32687, 32688, 32689, 32690, 32691, 32692,
00375 32693, 32694, 32695, 32696, 32697, 32698, 32699, 32700,
00376 32701, 32702, 32703, 32704, 32705, 65412, 65413, 65414,
00377 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422,
00378 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430,
00379 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
00380 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
00381 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
00382 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
00383 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
00384 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
00385 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
00386 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
00387 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
00388 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
00389 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
00390 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
00391 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
00392 65535,
00393 };
00394
00395 static const uint8_t dnxhd_1238_ac_bits[257] = {
00396 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
00397 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10,
00398 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11,
00399 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13,
00400 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
00401 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00402 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15,
00403 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00404 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00405 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00406 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00407 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00408 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00409 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00410 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00411 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00412 16,
00413 };
00414
00415 static const uint8_t dnxhd_1238_ac_level[257] = {
00416 3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
00417 25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 45, 13, 15, 47, 49,
00418 51, 53, 55, 57, 59, 17, 19, 61, 63, 65, 67, 69, 71, 73, 75, 21,
00419 23, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 25, 27, 29, 99,
00420 101,103,105,107,109,111,113,115,117,119,121,123, 31, 33, 35, 37,
00421 125,127,129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27,
00422 29, 31, 33, 39, 41, 43, 45, 47, 49, 35, 37, 39, 41, 43, 45, 47,
00423 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 81, 51,
00424 53, 55, 57, 59, 61, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99,
00425 101,103,105,107,109,111,113,115,117,119,121,123,125,127,129, 63,
00426 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00427 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00428 129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
00429 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
00430 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00431 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00432 129,
00433 };
00434
00435 static const uint8_t dnxhd_1238_ac_flags[257] = {
00436 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
00437 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0,
00438 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2,
00439 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0,
00440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2,
00441 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00442 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
00443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
00444 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
00446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00448 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00449 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00450 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00451 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00452 3,
00453 };
00454
00455 static const uint8_t dnxhd_1238_ac_index_flag[257] = {
00456 };
00457
00458 static const uint16_t dnxhd_1235_1238_1241_run_codes[62] = {
00459 0, 4, 10, 11, 24, 25, 26, 27,
00460 56, 57, 58, 59, 120, 242, 486, 487,
00461 488, 489, 980, 981, 982, 983, 984, 985,
00462 986, 987, 988, 989, 990, 991, 992, 993,
00463 994, 995, 996, 997, 998, 999, 1000, 1001,
00464 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
00465 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
00466 1018, 1019, 1020, 1021, 1022, 1023,
00467 };
00468
00469 static const uint8_t dnxhd_1235_1238_1241_run_bits[62] = {
00470 1, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 8, 9, 9,
00471 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00472 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00473 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00474 };
00475
00476 static const uint8_t dnxhd_1238_run[62] = {
00477 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
00478 20, 21, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00479 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
00480 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
00481 };
00482
00483 static const uint8_t dnxhd_1235_1241_dc_codes[14] = {
00484 10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127,
00485 };
00486
00487 static const uint8_t dnxhd_1235_1241_dc_bits[14] = {
00488 4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7,
00489 };
00490
00491 static const uint16_t dnxhd_1235_1241_ac_codes[257] = {
00492 0, 1, 4, 10, 11, 24, 25, 26,
00493 54, 55, 56, 57, 116, 117, 118, 119,
00494 240, 241, 242, 243, 244, 245, 492, 493,
00495 494, 495, 496, 497, 498, 998, 999, 1000,
00496 1001, 1002, 1003, 1004, 1005, 1006, 1007, 2016,
00497 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024,
00498 2025, 2026, 4054, 4055, 4056, 4057, 4058, 4059,
00499 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067,
00500 4068, 4069, 8140, 8141, 8142, 8143, 8144, 8145,
00501 8146, 8147, 8148, 8149, 8150, 8151, 8152, 8153,
00502 8154, 8155, 8156, 8157, 16316, 16317, 16318, 16319,
00503 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327,
00504 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335,
00505 16336, 16337, 32676, 32677, 32678, 32679, 32680, 32681,
00506 32682, 32683, 32684, 32685, 32686, 32687, 32688, 32689,
00507 32690, 32691, 32692, 32693, 32694, 32695, 32696, 32697,
00508 32698, 32699, 32700, 32701, 32702, 32703, 32704, 32705,
00509 32706, 32707, 32708, 65418, 65419, 65420, 65421, 65422,
00510 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430,
00511 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
00512 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
00513 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
00514 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
00515 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
00516 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
00517 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
00518 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
00519 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
00520 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
00521 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
00522 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
00523 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
00524 65535,
00525 };
00526
00527 static const uint8_t dnxhd_1235_1241_ac_bits[257] = {
00528 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
00529 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10,
00530 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11,
00531 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
00532 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
00533 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00534 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15,
00535 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00536 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16,
00537 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00538 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00539 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00540 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00541 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00542 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00543 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00544 16,
00545 };
00546
00547 static const uint8_t dnxhd_1235_1241_ac_level[257] = {
00548 3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
00549 25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 13, 15, 45, 47, 49,
00550 51, 53, 55, 57, 59, 17, 19, 61, 63, 65, 67, 69, 71, 73, 75, 77,
00551 21, 23, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101, 25, 27,
00552 29, 31,103,105,107,109,111,113,115,117,119,121,123,125,127, 3,
00553 33, 35, 37, 39,129, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,
00554 27, 29, 31, 33, 35, 41, 43, 45, 47, 49, 37, 39, 41, 43, 45, 47,
00555 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,
00556 81, 83, 85, 51, 53, 55, 57, 59, 61, 63, 65, 87, 89, 91, 93, 95,
00557 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00558 129, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00559 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00560 129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
00561 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
00562 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00563 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00564 129,
00565 };
00566
00567 static const uint8_t dnxhd_1235_1241_ac_flags[257] = {
00568 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
00569 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0,
00570 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00571 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2,
00572 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
00573 2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00574 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
00575 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00576 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
00577 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00578 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00580 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00581 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00582 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00583 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00584 3,
00585 };
00586
00587 static const uint8_t dnxhd_1235_1241_run[62] = {
00588 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
00589 18, 20, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00590 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
00591 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
00592 };
00593
00594 static const uint8_t dnxhd_1250_dc_codes[14] = {
00595 10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127
00596 };
00597 static const uint8_t dnxhd_1250_dc_bits[14] = {
00598 4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7
00599 };
00600 static const uint16_t dnxhd_1250_ac_codes[257] = {
00601 0, 1, 4, 10, 11, 24, 25, 26,
00602 54, 55, 56, 57, 116, 117, 118, 119,
00603 240, 241, 242, 243, 244, 245, 492, 493,
00604 494, 495, 496, 497, 498, 998, 999, 1000,
00605 1001, 1002, 1003, 1004, 1005, 1006, 2014, 2015,
00606 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
00607 2024, 2025, 4052, 4053, 4054, 4055, 4056, 4057,
00608 4058, 4059, 4060, 4061, 4062, 4063, 4064, 4065,
00609 4066, 4067, 8136, 8137, 8138, 8139, 8140, 8141,
00610 8142, 8143, 8144, 8145, 8146, 8147, 8148, 8149,
00611 8150, 8151, 8152, 8153, 8154, 8155, 8156, 16314,
00612 16315, 16316, 16317, 16318, 16319, 16320, 16321, 16322,
00613 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330,
00614 16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338,
00615 32678, 32679, 32680, 32681, 32682, 32683, 32684, 32685,
00616 32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693,
00617 32694, 32695, 32696, 32697, 32698, 32699, 32700, 32701,
00618 32702, 32703, 32704, 32705, 32706, 32707, 32708, 32709,
00619 32710, 32711, 32712, 65426, 65427, 65428, 65429, 65430,
00620 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
00621 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
00622 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
00623 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
00624 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
00625 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
00626 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
00627 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
00628 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
00629 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
00630 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
00631 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
00632 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
00633 65535
00634 };
00635 static const uint8_t dnxhd_1250_ac_bits[257] = {
00636 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
00637 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10,
00638 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
00639 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
00640 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
00641 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00642 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00643 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00644 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00645 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00646 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00647 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00648 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00649 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00650 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00651 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00652 16
00653 };
00654 static const uint8_t dnxhd_1250_ac_level[257] = {
00655 3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
00656 25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 45, 13, 47, 49, 51,
00657 53, 55, 57, 59, 15, 17, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,
00658 19, 21, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105, 23,
00659 25, 27,107,109,111,113,115,117,119,121,123,125,127,129, 3, 5,
00660 7, 9, 11, 29, 31, 33, 35, 13, 15, 17, 19, 21, 23, 25, 27, 29,
00661 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 37, 39, 41, 43,
00662 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85,
00663 87, 89, 91, 93, 95, 97, 99,101,103,105,107,111,113, 45, 47, 49,
00664 51, 53, 55,109,115,117,119,121,123,125,127,129, 57, 59, 61, 63,
00665 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00666 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00667 129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
00668 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
00669 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00670 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00671 129
00672 };
00673 static const uint8_t dnxhd_1250_ac_flags[257] = {
00674 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
00675 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
00676 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00677 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
00678 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
00679 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00680 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
00681 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00682 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
00683 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
00684 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00685 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00686 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00687 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00688 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00689 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00690 3,
00691 };
00692 static const uint16_t dnxhd_1250_run_codes[62] = {
00693 0, 4, 5, 12, 26, 27, 28, 58,
00694 118, 119, 120, 242, 486, 487, 976, 977,
00695 978, 979, 980, 981, 982, 983, 984, 985,
00696 986, 987, 988, 989, 990, 991, 992, 993,
00697 994, 995, 996, 997, 998, 999, 1000, 1001,
00698 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
00699 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
00700 1018, 1019, 1020, 1021, 1022, 1023
00701 };
00702 static const uint8_t dnxhd_1250_run_bits[62] = {
00703 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 10, 10,
00704 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00705 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00706 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
00707 };
00708 static const uint8_t dnxhd_1250_run[62] = {
00709 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
00710 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00711 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
00712 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62
00713 };
00714
00715 static const uint8_t dnxhd_1251_dc_codes[12] = {
00716 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63,
00717 };
00718
00719 static const uint8_t dnxhd_1251_dc_bits[12] = {
00720 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6,
00721 };
00722
00723 static const uint16_t dnxhd_1251_ac_codes[257] = {
00724 0, 1, 4, 10, 11, 24, 25, 26,
00725 54, 55, 56, 57, 116, 117, 118, 119,
00726 240, 241, 242, 243, 244, 245, 492, 493,
00727 494, 495, 496, 497, 996, 997, 998, 999,
00728 1000, 1001, 1002, 1003, 1004, 1005, 2012, 2013,
00729 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
00730 2022, 2023, 2024, 2025, 4052, 4053, 4054, 4055,
00731 4056, 4057, 4058, 4059, 4060, 4061, 4062, 4063,
00732 4064, 4065, 4066, 8134, 8135, 8136, 8137, 8138,
00733 8139, 8140, 8141, 8142, 8143, 8144, 8145, 8146,
00734 8147, 8148, 8149, 8150, 8151, 8152, 8153, 8154,
00735 8155, 8156, 16314, 16315, 16316, 16317, 16318, 16319,
00736 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327,
00737 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335,
00738 16336, 16337, 16338, 16339, 32680, 32681, 32682, 32683,
00739 32684, 32685, 32686, 32687, 32688, 32689, 32690, 32691,
00740 32692, 32693, 32694, 32695, 32696, 32697, 32698, 32699,
00741 32700, 32701, 32702, 32703, 32704, 32705, 32706, 32707,
00742 32708, 32709, 32710, 32711, 32712, 32713, 32714, 65430,
00743 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
00744 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
00745 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
00746 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
00747 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
00748 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
00749 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
00750 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
00751 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
00752 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
00753 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
00754 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
00755 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
00756 65535,
00757 };
00758
00759 static const uint8_t dnxhd_1251_ac_bits[257] = {
00760 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
00761 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
00762 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
00763 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
00764 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
00765 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14,
00766 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00767 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00768 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
00769 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00770 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00771 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00772 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00773 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00774 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00775 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00776 16,
00777 };
00778
00779 static const uint8_t dnxhd_1251_ac_level[257] = {
00780 3, 3, 5, 7, 0, 9, 11, 5, 13, 15, 17, 7, 19, 21, 23, 9,
00781 25, 27, 29, 31, 33, 11, 35, 37, 39, 41, 43, 13, 45, 47, 49, 51,
00782 53, 55, 57, 59, 15, 17, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79,
00783 81, 19, 21, 23, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,
00784 25, 27, 29,107,109,111,113,115,117,119,121,123,125,127,129, 3,
00785 5, 7, 9, 11, 13, 15, 17, 31, 33, 35, 19, 21, 23, 25, 27, 29,
00786 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 37,
00787 39, 41, 43, 45, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83,
00788 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,107,109,111,113,115,
00789 117, 47, 49, 51, 53, 55, 57,119,121,123,125,127,129, 59, 61, 63,
00790 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00791 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00792 129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
00793 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
00794 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00795 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00796 129,
00797 };
00798
00799 static const uint8_t dnxhd_1251_ac_flags[257] = {
00800 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2,
00801 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
00802 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00803 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00804 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
00805 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1,
00806 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
00807 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00808 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00809 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2,
00810 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00811 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00812 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00813 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00814 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00815 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00816 3,
00817 };
00818
00819 static const uint16_t dnxhd_1251_run_codes[62] = {
00820 0, 4, 5, 12, 26, 27, 28, 58,
00821 118, 119, 120, 242, 486, 487, 976, 977,
00822 978, 979, 980, 981, 982, 983, 984, 985,
00823 986, 987, 988, 989, 990, 991, 992, 993,
00824 994, 995, 996, 997, 998, 999, 1000, 1001,
00825 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
00826 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
00827 1018, 1019, 1020, 1021, 1022, 1023,
00828 };
00829
00830 static const uint8_t dnxhd_1251_run_bits[62] = {
00831 1, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 10, 10,
00832 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00833 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00834 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
00835 };
00836
00837 static const uint8_t dnxhd_1251_run[62] = {
00838 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
00839 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
00840 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
00841 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
00842 };
00843
00844 static const uint8_t dnxhd_1252_dc_codes[12] = {
00845 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63,
00846 };
00847
00848 static const uint8_t dnxhd_1252_dc_bits[12] = {
00849 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6,
00850 };
00851
00852 static const uint16_t dnxhd_1252_ac_codes[257] = {
00853 0, 1, 4, 10, 11, 12, 26, 27,
00854 56, 57, 58, 118, 119, 120, 242, 243,
00855 244, 245, 246, 247, 496, 497, 498, 499,
00856 500, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
00857 1009, 2020, 2021, 2022, 2023, 2024, 2025, 2026,
00858 2027, 2028, 2029, 4060, 4061, 4062, 4063, 4064,
00859 4065, 4066, 4067, 4068, 4069, 4070, 4071, 8144,
00860 8145, 8146, 8147, 8148, 8149, 8150, 8151, 8152,
00861 8153, 8154, 8155, 8156, 8157, 8158, 16318, 16319,
00862 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327,
00863 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335,
00864 32672, 32673, 32674, 32675, 32676, 32677, 32678, 32679,
00865 32680, 32681, 32682, 32683, 32684, 32685, 32686, 32687,
00866 32688, 32689, 32690, 32691, 32692, 32693, 32694, 65390,
00867 65391, 65392, 65393, 65394, 65395, 65396, 65397, 65398,
00868 65399, 65400, 65401, 65402, 65403, 65404, 65405, 65406,
00869 65407, 65408, 65409, 65410, 65411, 65412, 65413, 65414,
00870 65415, 65416, 65417, 65418, 65419, 65420, 65421, 65422,
00871 65423, 65424, 65425, 65426, 65427, 65428, 65429, 65430,
00872 65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
00873 65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
00874 65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
00875 65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
00876 65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
00877 65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
00878 65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
00879 65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
00880 65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
00881 65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
00882 65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
00883 65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
00884 65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
00885 65535,
00886 };
00887
00888 static const uint8_t dnxhd_1252_ac_bits[257] = {
00889 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8,
00890 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10,
00891 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12,
00892 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13,
00893 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
00894 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
00895 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16,
00896 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00897 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00898 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00899 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00900 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00901 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00902 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00903 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00904 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
00905 16,
00906 };
00907
00908 static const uint8_t dnxhd_1252_ac_level[257] = {
00909 3, 3, 5, 7, 5, 0, 9, 11, 13, 15, 7, 17, 19, 21, 23, 25,
00910 27, 29, 9, 11, 31, 33, 35, 37, 13, 39, 41, 43, 45, 47, 49, 15,
00911 17, 51, 53, 55, 57, 59, 61, 63, 65, 19, 21, 67, 69, 71, 73, 75,
00912 77, 79, 81, 83, 23, 25, 27, 85, 87, 89, 91, 93, 95, 97, 99,101,
00913 103,105,107, 29, 31, 33,109,111,113,115,117,119,121,123,125,127,
00914 129, 3, 5, 7, 35, 37, 39, 41, 9, 11, 13, 15, 17, 19, 21, 23,
00915 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 43, 45, 47, 49, 51, 45,
00916 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
00917 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99,101,103,105,107,109,
00918 111,113,115,117,119,121,123,125,127,129, 53, 55, 57, 59, 61, 63,
00919 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00920 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00921 129, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31,
00922 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63,
00923 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95,
00924 97, 99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,
00925 129,
00926 };
00927
00928 static const uint8_t dnxhd_1252_ac_flags[257] = {
00929 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
00930 0, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2,
00931 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0,
00932 0, 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00933 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
00934 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
00935 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1,
00936 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00937 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
00938 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
00939 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00940 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00941 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00942 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00943 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00944 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
00945 3,
00946 };
00947
00948 const CIDEntry ff_dnxhd_cid_table[] = {
00949 { 1235, 1920, 1080, 0, 917504, 917504, 6, 10, 4,
00950 dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight,
00951 dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
00952 dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
00953 dnxhd_1235_1241_ac_flags,
00954 dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
00955 { 175, 185, 365, 440 } },
00956 { 1237, 1920, 1080, 0, 606208, 606208, 4, 8, 3,
00957 dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
00958 dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
00959 dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
00960 dnxhd_1237_ac_flags,
00961 dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
00962 { 115, 120, 145, 240, 290 } },
00963 { 1238, 1920, 1080, 0, 917504, 917504, 4, 8, 4,
00964 dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight,
00965 dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
00966 dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
00967 dnxhd_1238_ac_flags,
00968 dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
00969 { 175, 185, 220, 365, 440 } },
00970 { 1241, 1920, 1080, 1, 917504, 458752, 6, 10, 4,
00971 dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight,
00972 dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
00973 dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
00974 dnxhd_1235_1241_ac_flags,
00975 dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
00976 { 185, 220 } },
00977 { 1242, 1920, 1080, 1, 606208, 303104, 4, 8, 3,
00978 dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight,
00979 dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
00980 dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
00981 dnxhd_1237_ac_flags,
00982 dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
00983 { 120, 145 } },
00984 { 1243, 1920, 1080, 1, 917504, 458752, 4, 8, 4,
00985 dnxhd_1243_luma_weight, dnxhd_1243_chroma_weight,
00986 dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
00987 dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
00988 dnxhd_1238_ac_flags,
00989 dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
00990 { 185, 220 } },
00991 { 1250, 1280, 720, 0, 458752, 458752, 6, 10, 4,
00992 dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight,
00993 dnxhd_1250_dc_codes, dnxhd_1250_dc_bits,
00994 dnxhd_1250_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_level,
00995 dnxhd_1250_ac_flags,
00996 dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run,
00997 { 90, 180, 220 } },
00998 { 1251, 1280, 720, 0, 458752, 458752, 4, 8, 4,
00999 dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight,
01000 dnxhd_1251_dc_codes, dnxhd_1251_dc_bits,
01001 dnxhd_1251_ac_codes, dnxhd_1251_ac_bits, dnxhd_1251_ac_level,
01002 dnxhd_1251_ac_flags,
01003 dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
01004 { 90, 110, 175, 220 } },
01005 { 1252, 1280, 720, 0, 303104, 303104, 4, 8, 5,
01006 dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight,
01007 dnxhd_1252_dc_codes, dnxhd_1252_dc_bits,
01008 dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_level,
01009 dnxhd_1252_ac_flags,
01010 dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
01011 { 60, 75, 115, 145 } },
01012 { 1253, 1920, 1080, 0, 188416, 188416, 4, 8, 3,
01013 dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
01014 dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
01015 dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level,
01016 dnxhd_1237_ac_flags,
01017 dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
01018 { 36, 45, 75, 90 } },
01019 };
01020
01021 int ff_dnxhd_get_cid_table(int cid)
01022 {
01023 int i;
01024 for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++)
01025 if (ff_dnxhd_cid_table[i].cid == cid)
01026 return i;
01027 return -1;
01028 }
01029
01030 int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
01031 {
01032 int i, j;
01033 int mbs = avctx->bit_rate/1000000;
01034 if (!mbs)
01035 return 0;
01036 for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) {
01037 const CIDEntry *cid = &ff_dnxhd_cid_table[i];
01038 if (cid->width == avctx->width && cid->height == avctx->height &&
01039 cid->interlaced == !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT) &&
01040 cid->bit_depth == bit_depth) {
01041 for (j = 0; j < sizeof(cid->bit_rates); j++) {
01042 if (cid->bit_rates[j] == mbs)
01043 return cid->cid;
01044 }
01045 }
01046 }
01047 return 0;
01048 }