]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dnxhddata.c
dds: Fix enum declaration
[ffmpeg] / libavcodec / dnxhddata.c
index 642b22fb5de3b0ba811948dd3702ca494d09b592..b23e337705aedf50db0988f6c0fc3bcde9148e8b 100644 (file)
 
 #include "avcodec.h"
 #include "dnxhddata.h"
+#include "libavutil/common.h"
+
+static const uint8_t dnxhd_1235_luma_weight[] = {
+     0, 32, 32, 32, 33, 35, 38, 39,
+    32, 33, 32, 33, 36, 36, 39, 42,
+    32, 32, 33, 36, 35, 37, 41, 43,
+    31, 33, 34, 36, 36, 40, 42, 48,
+    32, 34, 36, 37, 39, 42, 46, 51,
+    36, 37, 37, 39, 41, 46, 51, 55,
+    37, 39, 41, 41, 47, 50, 55, 56,
+    41, 42, 41, 44, 50, 53, 60, 60
+};
+
+static const uint8_t dnxhd_1235_chroma_weight[] = {
+     0, 32, 33, 34, 39, 41, 54, 59,
+    33, 34, 35, 38, 43, 49, 58, 84,
+    34, 37, 39, 44, 46, 55, 74, 87,
+    40, 42, 47, 48, 58, 70, 87, 86,
+    43, 50, 56, 63, 72, 94, 91, 82,
+    55, 63, 65, 75, 93, 89, 85, 73,
+    61, 67, 82, 81, 83, 90, 79, 73,
+    74, 84, 75, 78, 90, 85, 73, 73
+};
 
 static const uint8_t dnxhd_1237_luma_weight[] = {
      0,  32,  33,  34, 34, 36, 37, 36,
@@ -132,6 +155,28 @@ static const uint8_t dnxhd_1243_chroma_weight[] = {
     46, 45, 46, 47, 47, 48, 47, 47,
 };
 
+static const uint8_t dnxhd_1250_luma_weight[] = {
+     0, 32, 35, 35, 36, 36, 41, 43,
+    32, 34, 35, 36, 37, 39, 43, 47,
+    33, 34, 36, 38, 38, 42, 42, 50,
+    34, 36, 38, 38, 41, 40, 47, 54,
+    35, 38, 39, 40, 39, 45, 49, 58,
+    38, 39, 40, 39, 46, 47, 54, 60,
+    38, 39, 41, 46, 46, 48, 57, 62,
+    40, 41, 44, 45, 49, 54, 63, 63
+};
+
+static const uint8_t dnxhd_1250_chroma_weight[] = {
+     0, 32, 35, 36, 40, 42, 51, 51,
+    35, 36, 39, 39, 43, 51, 52, 55,
+    36, 41, 41, 43, 51, 53, 54, 56,
+    43, 44, 45, 50, 54, 54, 55, 57,
+    45, 48, 50, 51, 55, 58, 59, 58,
+    49, 52, 49, 57, 58, 62, 58, 60,
+    51, 51, 56, 58, 62, 61, 59, 62,
+    52, 52, 60, 61, 59, 59, 63, 63
+};
+
 static const uint8_t dnxhd_1251_luma_weight[] = {
      0, 32, 32, 34, 34, 34, 34, 35,
     35, 35, 36, 37, 36, 36, 35, 36,
@@ -175,6 +220,39 @@ static const uint8_t dnxhd_1252_chroma_weight[] = {
     114, 128, 125, 129, 134, 125, 116, 116,
 };
 
+static const uint8_t dnxhd_1256_chroma_weight[] = {
+     0, 32, 32, 32, 32, 32, 32, 33,
+    32, 32, 32, 32, 32, 32, 32, 34,
+    32, 32, 32, 32, 32, 32, 33, 37,
+    32, 32, 32, 32, 32, 32, 36, 39,
+    32, 32, 32, 32, 32, 34, 39, 44,
+    32, 37, 32, 32, 35, 40, 43, 49,
+    32, 33, 36, 36, 40, 43, 50, 60,
+    34, 37, 39, 44, 51, 56, 61, 70,
+};
+
+static const uint8_t dnxhd_1258_luma_weight[] = {
+     0, 32, 36, 36,  40,  40, 55, 60,
+    34, 36, 37, 40,  41,  48, 57, 82,
+    35, 36, 41, 41,  46,  52, 73, 82,
+    37, 40, 42, 45,  50,  65, 80, 87,
+    39, 41, 44, 49,  62,  78, 88, 90,
+    41, 44, 49, 58,  73,  90, 95, 95,
+    43, 52, 55, 68,  90, 100, 97, 93,
+    52, 53, 71, 82, 107, 103, 99, 99,
+};
+
+static const uint8_t dnxhd_1258_chroma_weight[] = {
+     0, 32, 37,  38,  49,  53,  65,  66,
+    35, 37, 40,  49,  56,  64,  65,  82,
+    36, 42, 50,  56,  64,  67,  73,  85,
+    46, 50, 57,  63,  71,  72,  89,  87,
+    49, 58, 65,  72,  78,  88,  88,  90,
+    60, 64, 74,  81,  84,  90,  95, 134,
+    62, 74, 77,  80,  90, 114, 129, 125,
+    74, 74, 90, 100, 128, 125, 116, 116,
+};
+
 static const uint8_t dnxhd_1237_dc_codes[12] = {
     0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63,
 };
@@ -448,7 +526,7 @@ static const uint8_t dnxhd_1238_ac_index_flag[257] = {
     1,
 };
 
-static const uint16_t dnxhd_1238_run_codes[62] = {
+static const uint16_t dnxhd_1235_1238_1241_run_codes[62] = {
        0,    4,   10,   11,   24,   25,   26,   27,
       56,   57,   58,   59,  120,  242,  486,  487,
      488,  489,  980,  981,  982,  983,  984,  985,
@@ -459,7 +537,7 @@ static const uint16_t dnxhd_1238_run_codes[62] = {
     1018, 1019, 1020, 1021, 1022, 1023,
 };
 
-static const uint8_t dnxhd_1238_run_bits[62] = {
+static const uint8_t dnxhd_1235_1238_1241_run_bits[62] = {
      1,  3,  4,  4,  5,  5,  5,  5,  6,  6,  6,  6,  7,  8,  9,  9,
      9,  9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
     10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
@@ -473,15 +551,15 @@ static const uint8_t dnxhd_1238_run[62] = {
     49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 };
 
-static const uint8_t dnxhd_1241_dc_codes[14] = {
+static const uint8_t dnxhd_1235_1241_dc_codes[14] = {
     10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127,
 };
 
-static const uint8_t dnxhd_1241_dc_bits[14] = {
+static const uint8_t dnxhd_1235_1241_dc_bits[14] = {
     4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7,
 };
 
-static const uint16_t dnxhd_1241_ac_codes[257] = {
+static const uint16_t dnxhd_1235_1241_ac_codes[257] = {
         0,     1,     4,    10,    11,    24,    25,    26,
        54,    55,    56,    57,   116,   117,   118,   119,
       240,   241,   242,   243,   244,   245,   492,   493,
@@ -517,7 +595,7 @@ static const uint16_t dnxhd_1241_ac_codes[257] = {
     65535,
 };
 
-static const uint8_t dnxhd_1241_ac_bits[257] = {
+static const uint8_t dnxhd_1235_1241_ac_bits[257] = {
      2,  2,  3,  4,  4,  5,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,
      8,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10,
     10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11,
@@ -537,7 +615,7 @@ static const uint8_t dnxhd_1241_ac_bits[257] = {
     16,
 };
 
-static const uint8_t dnxhd_1241_ac_level[257] = {
+static const uint8_t dnxhd_1235_1241_ac_level[257] = {
      1,  1,  2,  3,  0,  4,  5,  2,  6,  7,  8,  3,  9, 10, 11,  4,
     12, 13, 14, 15, 16,  5, 17, 18, 19, 20, 21,  6,  7, 22, 23, 24,
     25, 26, 27, 28, 29,  8,  9, 30, 31, 32, 33, 34, 35, 36, 37, 38,
@@ -557,7 +635,7 @@ static const uint8_t dnxhd_1241_ac_level[257] = {
     64,
 };
 
-static const uint8_t dnxhd_1241_ac_run_flag[257] = {
+static const uint8_t dnxhd_1235_1241_ac_run_flag[257] = {
     0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
     0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,
     0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -577,7 +655,7 @@ static const uint8_t dnxhd_1241_ac_run_flag[257] = {
     1,
 };
 
-static const uint8_t dnxhd_1241_ac_index_flag[257] = {
+static const uint8_t dnxhd_1235_1241_ac_index_flag[257] = {
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -597,13 +675,153 @@ static const uint8_t dnxhd_1241_ac_index_flag[257] = {
     1,
 };
 
-static const uint8_t dnxhd_1241_run[62] = {
+static const uint8_t dnxhd_1235_1241_run[62] = {
      1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
     18, 20, 17, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
     33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
     49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 };
 
+static const uint8_t dnxhd_1250_dc_codes[14] = {
+    10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127
+};
+static const uint8_t dnxhd_1250_dc_bits[14] = {
+    4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7
+};
+static const uint16_t dnxhd_1250_ac_codes[257] = {
+        0,     1,     4,    10,    11,    24,    25,    26,
+       54,    55,    56,    57,   116,   117,   118,   119,
+      240,   241,   242,   243,   244,   245,   492,   493,
+      494,   495,   496,   497,   498,   998,   999,  1000,
+     1001,  1002,  1003,  1004,  1005,  1006,  2014,  2015,
+     2016,  2017,  2018,  2019,  2020,  2021,  2022,  2023,
+     2024,  2025,  4052,  4053,  4054,  4055,  4056,  4057,
+     4058,  4059,  4060,  4061,  4062,  4063,  4064,  4065,
+     4066,  4067,  8136,  8137,  8138,  8139,  8140,  8141,
+     8142,  8143,  8144,  8145,  8146,  8147,  8148,  8149,
+     8150,  8151,  8152,  8153,  8154,  8155,  8156, 16314,
+    16315, 16316, 16317, 16318, 16319, 16320, 16321, 16322,
+    16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330,
+    16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338,
+    32678, 32679, 32680, 32681, 32682, 32683, 32684, 32685,
+    32686, 32687, 32688, 32689, 32690, 32691, 32692, 32693,
+    32694, 32695, 32696, 32697, 32698, 32699, 32700, 32701,
+    32702, 32703, 32704, 32705, 32706, 32707, 32708, 32709,
+    32710, 32711, 32712, 65426, 65427, 65428, 65429, 65430,
+    65431, 65432, 65433, 65434, 65435, 65436, 65437, 65438,
+    65439, 65440, 65441, 65442, 65443, 65444, 65445, 65446,
+    65447, 65448, 65449, 65450, 65451, 65452, 65453, 65454,
+    65455, 65456, 65457, 65458, 65459, 65460, 65461, 65462,
+    65463, 65464, 65465, 65466, 65467, 65468, 65469, 65470,
+    65471, 65472, 65473, 65474, 65475, 65476, 65477, 65478,
+    65479, 65480, 65481, 65482, 65483, 65484, 65485, 65486,
+    65487, 65488, 65489, 65490, 65491, 65492, 65493, 65494,
+    65495, 65496, 65497, 65498, 65499, 65500, 65501, 65502,
+    65503, 65504, 65505, 65506, 65507, 65508, 65509, 65510,
+    65511, 65512, 65513, 65514, 65515, 65516, 65517, 65518,
+    65519, 65520, 65521, 65522, 65523, 65524, 65525, 65526,
+    65527, 65528, 65529, 65530, 65531, 65532, 65533, 65534,
+    65535
+};
+static const uint8_t dnxhd_1250_ac_bits[257] = {
+     2,  2,  3,  4,  4,  5,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,
+     8,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10,
+    10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+    11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+    12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+    13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+    14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+    15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+    15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+    16
+};
+static const uint8_t dnxhd_1250_ac_level[257] = {
+     1,  1,  2,  3,  0,  4,  5,  2,  6,  7,  8,  3,  9, 10, 11,  4,
+    12, 13, 14, 15, 16,  5, 17, 18, 19, 20, 21, 22,  6, 23, 24, 25,
+    26, 27, 28, 29,  7,  8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+     9, 10, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 11,
+    12, 13, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,  1,  2,
+     3,  4,  5, 14, 15, 16, 17,  6,  7,  8,  9, 10, 11, 12, 13, 14,
+    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 18, 19, 20, 21,
+    27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+    43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 22, 23, 24,
+    25, 26, 27, 54, 57, 58, 59, 60, 61, 62, 63, 64, 28, 29, 30, 31,
+    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+    48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+    64,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
+    16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+    32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+    48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+    64
+};
+static const uint8_t dnxhd_1250_ac_run_flag[257] = {
+    0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1,
+    0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
+    0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
+    1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
+    1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1
+};
+static const uint8_t dnxhd_1250_ac_index_flag[257] = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
+    1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+    0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1
+};
+static const uint16_t dnxhd_1250_run_codes[62] = {
+       0,    4,    5,   12,   26,   27,   28,   58,
+     118,  119,  120,  242,  486,  487,  976,  977,
+     978,  979,  980,  981,  982,  983,  984,  985,
+     986,  987,  988,  989,  990,  991,  992,  993,
+     994,  995,  996,  997,  998,  999, 1000, 1001,
+    1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009,
+    1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
+    1018, 1019, 1020, 1021, 1022, 1023
+};
+static const uint8_t dnxhd_1250_run_bits[62] = {
+     1,  3,  3,  4,  5,  5,  5,  6,  7,  7,  7,  8,  9,  9, 10, 10,
+    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+    10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
+};
+static const uint8_t dnxhd_1250_run[62] = {
+     1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
+    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+    33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+    49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62
+};
+
 static const uint8_t dnxhd_1251_dc_codes[12] = {
     0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63,
 };
@@ -877,7 +1095,22 @@ static const uint8_t dnxhd_1252_ac_index_flag[257] = {
     1,
 };
 
+static const uint8_t dnxhd_1258_dc_codes[14] = {
+    0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, 0, 0,
+};
+
+static const uint8_t dnxhd_1258_dc_bits[14] = {
+    3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, 0, 0,
+};
+
 const CIDEntry ff_dnxhd_cid_table[] = {
+    { 1235, 1920, 1080, 0, 917504, 917504, 6, 10,
+      dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight,
+      dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
+      dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
+      dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag,
+      dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
+      { 175, 185, 365, 440 } },
     { 1237, 1920, 1080, 0, 606208, 606208, 4, 8,
       dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight,
       dnxhd_1237_dc_codes, dnxhd_1237_dc_bits,
@@ -890,14 +1123,14 @@ const CIDEntry ff_dnxhd_cid_table[] = {
       dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
       dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
       dnxhd_1238_ac_run_flag, dnxhd_1238_ac_index_flag,
-      dnxhd_1238_run_codes, dnxhd_1238_run_bits, dnxhd_1238_run,
+      dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
       { 175, 185, 220, 365, 440 } },
     { 1241, 1920, 1080, 1, 917504, 458752, 6, 10,
       dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight,
-      dnxhd_1241_dc_codes, dnxhd_1241_dc_bits,
-      dnxhd_1241_ac_codes, dnxhd_1241_ac_bits, dnxhd_1241_ac_level,
-      dnxhd_1241_ac_run_flag, dnxhd_1241_ac_index_flag,
-      dnxhd_1238_run_codes, dnxhd_1238_run_bits, dnxhd_1241_run,
+      dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
+      dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
+      dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag,
+      dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
       { 185, 220 } },
     { 1242, 1920, 1080, 1, 606208, 303104, 4, 8,
       dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight,
@@ -911,8 +1144,15 @@ const CIDEntry ff_dnxhd_cid_table[] = {
       dnxhd_1238_dc_codes, dnxhd_1238_dc_bits,
       dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_level,
       dnxhd_1238_ac_run_flag, dnxhd_1238_ac_index_flag,
-      dnxhd_1238_run_codes, dnxhd_1238_run_bits, dnxhd_1238_run,
+      dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1238_run,
       { 185, 220 } },
+    { 1250, 1280,  720, 0, 458752, 458752, 6, 10,
+      dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight,
+      dnxhd_1250_dc_codes, dnxhd_1250_dc_bits,
+      dnxhd_1250_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_level,
+      dnxhd_1250_ac_run_flag, dnxhd_1250_ac_index_flag,
+      dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run,
+      { 90, 180, 220 } },
     { 1251, 1280,  720, 0, 458752, 458752, 4, 8,
       dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight,
       dnxhd_1251_dc_codes, dnxhd_1251_dc_bits,
@@ -934,6 +1174,20 @@ const CIDEntry ff_dnxhd_cid_table[] = {
       dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag,
       dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run,
       { 36, 45, 75, 90 } },
+    { 1256, 1920, 1080, 0, 1835008, 1835008, 6, 10,
+      dnxhd_1235_luma_weight, dnxhd_1256_chroma_weight,
+      dnxhd_1235_1241_dc_codes, dnxhd_1235_1241_dc_bits,
+      dnxhd_1235_1241_ac_codes, dnxhd_1235_1241_ac_bits, dnxhd_1235_1241_ac_level,
+      dnxhd_1235_1241_ac_run_flag, dnxhd_1235_1241_ac_index_flag,
+      dnxhd_1235_1238_1241_run_codes, dnxhd_1235_1238_1241_run_bits, dnxhd_1235_1241_run,
+      { 350, 390, 440, 730, 880 } },
+    { 1258, 960, 720, 0, 212992, 212992, 4, 8,
+      dnxhd_1258_luma_weight, dnxhd_1258_chroma_weight,
+      dnxhd_1258_dc_codes, dnxhd_1258_dc_bits,
+      dnxhd_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_level,
+      dnxhd_1252_ac_run_flag, dnxhd_1252_ac_index_flag,
+      dnxhd_1251_run_codes, dnxhd_1251_run_bits, dnxhd_1251_run,
+      { 42, 60, 75, 115 } },
 };
 
 int ff_dnxhd_get_cid_table(int cid)
@@ -945,17 +1199,17 @@ int ff_dnxhd_get_cid_table(int cid)
     return -1;
 }
 
-int ff_dnxhd_find_cid(AVCodecContext *avctx)
+int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth)
 {
     int i, j;
-    int mbs = avctx->bit_rate/1000000;
+    int mbs = avctx->bit_rate / 1000000;
     if (!mbs)
         return 0;
     for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) {
         const CIDEntry *cid = &ff_dnxhd_cid_table[i];
         if (cid->width == avctx->width && cid->height == avctx->height &&
             cid->interlaced == !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT) &&
-            cid->bit_depth == 8) { // until 10 bit is supported
+            cid->bit_depth == bit_depth) {
             for (j = 0; j < sizeof(cid->bit_rates); j++) {
                 if (cid->bit_rates[j] == mbs)
                     return cid->cid;