diff options
Diffstat (limited to 'libavcodec/dnxhddata.c')
-rw-r--r-- | libavcodec/dnxhddata.c | 861 |
1 files changed, 408 insertions, 453 deletions
diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index 55272e9cf3..4462df3c2a 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -2,20 +2,20 @@ * VC3/DNxHD data. * Copyright (c) 2007 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier at smartjog dot com> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -25,7 +25,7 @@ /* The quantization tables below are in zigzag order! */ -/* Used in CID 1235, 1256 */ +/* Used in CID 1235, 1256, 1270 */ static const uint8_t dnxhd_1235_luma_weight[] = { 0, 32, 32, 32, 33, 32, 32, 32, 32, 31, 32, 33, 33, 33, 33, 35, @@ -49,7 +49,7 @@ static const uint8_t dnxhd_1235_chroma_weight[] = { 90, 90, 85, 79, 73, 73, 73, 73, }; -/* Used in CID 1237, 1253, 1259 */ +/* Used in CID 1237, 1253, 1259, 1273, 1274 */ static const uint8_t dnxhd_1237_luma_weight[] = { 0, 32, 33, 34, 34, 36, 37, 36, 36, 37, 38, 38, 38, 39, 41, 44, @@ -61,7 +61,7 @@ static const uint8_t dnxhd_1237_luma_weight[] = { 97, 100, 104, 102, 98, 98, 99, 99, }; -/* Used in CID 1237, 1253, 1259 */ +/* Used in CID 1237, 1253, 1259, 1273, 1274 */ static const uint8_t dnxhd_1237_chroma_weight[] = { 0, 32, 36, 39, 39, 38, 39, 41, 45, 51, 57, 58, 53, 48, 47, 51, @@ -73,6 +73,7 @@ static const uint8_t dnxhd_1237_chroma_weight[] = { 97, 100, 104, 102, 98, 98, 99, 99, }; +/* Used in CID 1238, 1272 */ static const uint8_t dnxhd_1238_luma_weight[] = { 0, 32, 32, 33, 34, 33, 33, 33, 33, 33, 33, 33, 33, 35, 37, 37, @@ -84,6 +85,7 @@ static const uint8_t dnxhd_1238_luma_weight[] = { 51, 53, 55, 57, 58, 59, 57, 57, }; +/* Used in CID 1238, 1272 */ static const uint8_t dnxhd_1238_chroma_weight[] = { 0, 32, 35, 35, 35, 34, 34, 35, 39, 43, 45, 45, 41, 39, 40, 41, @@ -95,6 +97,7 @@ static const uint8_t dnxhd_1238_chroma_weight[] = { 82, 77, 80, 86, 84, 82, 82, 82, }; +/* Used in CID 1241, 1271 */ static const uint8_t dnxhd_1241_luma_weight[] = { 0, 32, 33, 34, 34, 35, 36, 37, 36, 37, 38, 38, 38, 39, 39, 40, @@ -106,6 +109,7 @@ static const uint8_t dnxhd_1241_luma_weight[] = { 48, 46, 47, 48, 48, 49, 49, 49, }; +/* Used in CID 1241, 1271 */ static const uint8_t dnxhd_1241_chroma_weight[] = { 0, 32, 36, 38, 37, 37, 40, 41, 40, 40, 42, 42, 41, 41, 41, 41, @@ -229,6 +233,7 @@ static const uint8_t dnxhd_1252_chroma_weight[] = { 114, 128, 125, 129, 134, 125, 116, 116, }; +/* Used in CID 1244, 1260 */ static const uint8_t dnxhd_1260_luma_weight[] = { 0, 32, 33, 34, 36, 37, 37, 36, 34, 33, 34, 35, 37, 38, 40, 41, @@ -240,6 +245,7 @@ static const uint8_t dnxhd_1260_luma_weight[] = { 52, 53, 53, 50, 50, 54, 54, 54, }; +/* Used in CID 1244, 1260 */ static const uint8_t dnxhd_1260_chroma_weight[] = { 0, 32, 34, 38, 42, 40, 38, 36, 35, 35, 38, 42, 43, 43, 42, 40, @@ -251,27 +257,27 @@ static const uint8_t dnxhd_1260_chroma_weight[] = { 56, 56, 53, 53, 53, 54, 58, 58, }; -/* Used in CID 1235, 1241, 1250, 1256 */ +/* Used in CID 1235, 1236, 1241, 1250, 1256, 1257, 1270, 1271 */ static const uint8_t dnxhd_1235_dc_codes[14] = { 10, 62, 11, 12, 13, 0, 1, 2, 3, 4, 14, 30, 126, 127, }; -/* Used in CID 1235, 1241, 1250, 1256 */ +/* Used in CID 1235, 1236, 1241, 1250, 1256, 1257, 1270, 1271 */ static const uint8_t dnxhd_1235_dc_bits[14] = { 4, 6, 4, 4, 4, 3, 3, 3, 3, 3, 4, 5, 7, 7, }; -/* Used in CID 1237, 1238, 1242, 1243, 1251, 1252, 1253, 1258, 1259, 1260 */ +/* Used in CID 1237, 1238, 1242, 1243, 1251, 1252, 1253, 1258, 1259, 1260, 1272, 1273, 1274 */ static const uint8_t dnxhd_1237_dc_codes[12] = { 0, 12, 13, 1, 2, 3, 4, 5, 14, 30, 62, 63, }; -/* Used in CID 1237, 1238, 1242, 1243, 1251, 1252, 1253, 1258, 1259, 1260 */ +/* Used in CID 1237, 1238, 1242, 1243, 1251, 1252, 1253, 1258, 1259, 1260, 1272, 1273, 1274 */ static const uint8_t dnxhd_1237_dc_bits[12] = { 3, 4, 4, 3, 3, 3, 3, 3, 4, 5, 6, 6, }; -/* Used in CID 1237, 1242, 1253, 1259, 1260 */ +/* Used in CID 1237, 1242, 1253, 1259, 1260, 1273, 1274 */ static const uint16_t dnxhd_1237_ac_codes[257] = { 0, 1, 4, 5, 12, 26, 27, 56, 57, 58, 59, 120, 121, 244, 245, 246, @@ -308,7 +314,7 @@ static const uint16_t dnxhd_1237_ac_codes[257] = { 65535, }; -/* Used in CID 1237, 1242, 1253, 1259, 1260 */ +/* Used in CID 1237, 1242, 1253, 1259, 1260, 1273, 1274 */ static const uint8_t dnxhd_1237_ac_bits[257] = { 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, @@ -329,70 +335,44 @@ static const uint8_t dnxhd_1237_ac_bits[257] = { 16, }; -/* Used in CID 1237, 1242, 1253, 1259, 1260 */ -static const uint8_t dnxhd_1237_ac_level[257] = { - 1, 1, 2, 0, 3, 4, 2, 5, 6, 7, 3, 8, 9, 10, 11, 12, - 4, 5, 13, 14, 15, 16, 6, 17, 18, 19, 20, 21, 7, 22, 23, 24, - 25, 26, 27, 8, 9, 28, 29, 30, 31, 32, 33, 34, 10, 11, 12, 35, - 36, 37, 38, 39, 40, 41, 13, 14, 15, 16, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 17, 18, 19, 20, 21, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 64, 1, 22, 23, 24, 25, 26, 27, 62, 63, 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, 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, -}; - -/* Used in CID 1237, 1242, 1253, 1259, 1260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 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, 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, 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, -}; - -/* Used in CID 1238, 1243 */ +/* Used in CID 1237, 1242, 1253, 1259, 1260, 1273, 1274 */ +static const uint8_t dnxhd_1237_ac_info[2*257] = { + 3, 0, 3, 2, 5, 0, 0, 0, 7, 0, 9, 0, 5, 2, 11, 0, + 13, 0, 15, 0, 7, 2, 17, 0, 19, 0, 21, 0, 23, 0, 25, 0, + 9, 2, 11, 2, 27, 0, 29, 0, 31, 0, 33, 0, 13, 2, 35, 0, + 37, 0, 39, 0, 41, 0, 43, 0, 15, 2, 45, 0, 47, 0, 49, 0, + 51, 0, 53, 0, 55, 0, 17, 2, 19, 2, 57, 0, 59, 0, 61, 0, + 63, 0, 65, 0, 67, 0, 69, 0, 21, 2, 23, 2, 25, 2, 71, 0, + 73, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 27, 2, 29, 2, + 31, 2, 33, 2, 85, 0, 87, 0, 89, 0, 91, 0, 93, 0, 95, 0, + 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 35, 2, 37, 2, 39, 2, + 41, 2, 43, 2, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, + 119, 0, 121, 0, 123, 0, 129, 0, 3, 1, 45, 2, 47, 2, 49, 2, + 51, 2, 53, 2, 55, 2, 125, 0, 127, 0, 5, 1, 7, 1, 9, 1, + 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, + 27, 1, 29, 1, 31, 1, 33, 1, 35, 1, 37, 1, 39, 1, 41, 1, + 43, 1, 45, 1, 47, 1, 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, + 59, 1, 61, 1, 63, 1, 65, 1, 67, 1, 69, 1, 71, 1, 73, 1, + 75, 1, 77, 1, 79, 1, 81, 1, 83, 1, 85, 1, 87, 1, 89, 1, + 91, 1, 93, 1, 95, 1, 97, 1, 99, 1, 101, 1, 103, 1, 105, 1, + 107, 1, 109, 1, 111, 1, 113, 1, 115, 1, 117, 1, 119, 1, 121, 1, + 123, 1, 125, 1, 127, 1, 129, 1, 57, 2, 59, 2, 61, 2, 63, 2, + 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, + 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, + 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, + 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 2, + 129, 2, 3, 3, 5, 3, 7, 3, 9, 3, 11, 3, 13, 3, 15, 3, + 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, + 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, + 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, + 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, + 81, 3, 83, 3, 85, 3, 87, 3, 89, 3, 91, 3, 93, 3, 95, 3, + 97, 3, 99, 3, 101, 3, 103, 3, 105, 3, 107, 3, 109, 3, 111, 3, + 113, 3, 115, 3, 117, 3, 119, 3, 121, 3, 123, 3, 125, 3, 127, 3, + 129, 3, +}; + +/* Used in CID 1238, 1240, 1243, 1272 */ static const uint16_t dnxhd_1238_ac_codes[257] = { 0, 1, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 116, 117, 118, 119, @@ -429,7 +409,7 @@ static const uint16_t dnxhd_1238_ac_codes[257] = { 65535, }; -/* Used in CID 1238, 1243 */ +/* Used in CID 1238, 1240, 1243, 1272 */ static const uint8_t dnxhd_1238_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, 9, 10, 10, @@ -450,70 +430,44 @@ static const uint8_t dnxhd_1238_ac_bits[257] = { 16, }; -/* Used in CID 1238, 1243 */ -static const uint8_t dnxhd_1238_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, 7, 23, 24, - 25, 26, 27, 28, 29, 8, 9, 30, 31, 32, 33, 34, 35, 36, 37, 10, - 11, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 12, 13, 14, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 15, 16, 17, 18, - 62, 63, 64, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 19, 20, 21, 22, 23, 24, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 25, - 26, 27, 28, 29, 30, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 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, +/* Used in CID 1238, 1240, 1243, 1272 */ +static const uint8_t dnxhd_1238_ac_info[2*257] = { + 3, 0, 3, 2, 5, 0, 7, 0, 0, 0, 9, 0, 11, 0, 5, 2, + 13, 0, 15, 0, 17, 0, 7, 2, 19, 0, 21, 0, 23, 0, 9, 2, + 25, 0, 27, 0, 29, 0, 31, 0, 33, 0, 11, 2, 35, 0, 37, 0, + 39, 0, 41, 0, 43, 0, 45, 0, 13, 2, 15, 2, 47, 0, 49, 0, + 51, 0, 53, 0, 55, 0, 57, 0, 59, 0, 17, 2, 19, 2, 61, 0, + 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 73, 0, 75, 0, 21, 2, + 23, 2, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, 87, 0, 89, 0, + 91, 0, 93, 0, 95, 0, 97, 0, 25, 2, 27, 2, 29, 2, 99, 0, + 101, 0, 103, 0, 105, 0, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, + 117, 0, 119, 0, 121, 0, 123, 0, 31, 2, 33, 2, 35, 2, 37, 2, + 125, 0, 127, 0, 129, 0, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, + 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, 27, 1, + 29, 1, 31, 1, 33, 1, 39, 2, 41, 2, 43, 2, 45, 2, 47, 2, + 49, 2, 35, 1, 37, 1, 39, 1, 41, 1, 43, 1, 45, 1, 47, 1, + 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, 59, 1, 61, 1, 63, 1, + 65, 1, 67, 1, 69, 1, 71, 1, 73, 1, 75, 1, 81, 1, 51, 2, + 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 77, 1, 79, 1, 83, 1, + 85, 1, 87, 1, 89, 1, 91, 1, 93, 1, 95, 1, 97, 1, 99, 1, + 101, 1, 103, 1, 105, 1, 107, 1, 109, 1, 111, 1, 113, 1, 115, 1, + 117, 1, 119, 1, 121, 1, 123, 1, 125, 1, 127, 1, 129, 1, 63, 2, + 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, + 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, + 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, + 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 2, + 129, 2, 3, 3, 5, 3, 7, 3, 9, 3, 11, 3, 13, 3, 15, 3, + 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, + 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, + 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, + 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, + 81, 3, 83, 3, 85, 3, 87, 3, 89, 3, 91, 3, 93, 3, 95, 3, + 97, 3, 99, 3, 101, 3, 103, 3, 105, 3, 107, 3, 109, 3, 111, 3, + 113, 3, 115, 3, 117, 3, 119, 3, 121, 3, 123, 3, 125, 3, 127, 3, + 129, 3, }; /* 0 is EOB */ -/* Used in CID 1238, 1243 */ -static const uint8_t dnxhd_1238_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, 1, 0, 0, - 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, 0, 0, 1, 1, 1, 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, 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, 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, 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, -}; - -/* Used in CID 1238, 1243 */ -static const uint8_t dnxhd_1238_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, 0, 0, - 0, 0, 0, 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, 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, 1, 1, - 1, 1, 1, 1, 1, 1, 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, 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, -}; - -/* Used in CID 1235, 1241, 1256 */ +/* Used in CID 1235, 1236, 1241, 1256, 1257, 1270, 1271 */ static const uint16_t dnxhd_1235_ac_codes[257] = { 0, 1, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 116, 117, 118, 119, @@ -550,7 +504,7 @@ static const uint16_t dnxhd_1235_ac_codes[257] = { 65535, }; -/* Used in CID 1235, 1241, 1256 */ +/* Used in CID 1235, 1236, 1241, 1256, 1257, 1270, 1271 */ static const uint8_t dnxhd_1235_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, @@ -571,67 +525,41 @@ static const uint8_t dnxhd_1235_ac_bits[257] = { 16, }; -/* Used in CID 1235, 1241, 1256 */ -static const uint8_t dnxhd_1235_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, - 10, 11, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 12, 13, - 14, 15, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 1, - 16, 17, 18, 19, 64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 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, 25, 26, 27, 28, 29, 30, 31, 32, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 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, -}; - -/* Used in CID 1235, 1241, 1256 */ -static const uint8_t dnxhd_1235_ac_run_flag[257] = { - 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, - 0, 0, 0, 0, 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, - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 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, 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, 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, +/* Used in CID 1235, 1241, 1256, 1270, 1271 */ +static const uint8_t dnxhd_1235_ac_info[2*257] = { + 3, 0, 3, 2, 5, 0, 7, 0, 0, 0, 9, 0, 11, 0, 5, 2, + 13, 0, 15, 0, 17, 0, 7, 2, 19, 0, 21, 0, 23, 0, 9, 2, + 25, 0, 27, 0, 29, 0, 31, 0, 33, 0, 11, 2, 35, 0, 37, 0, + 39, 0, 41, 0, 43, 0, 13, 2, 15, 2, 45, 0, 47, 0, 49, 0, + 51, 0, 53, 0, 55, 0, 57, 0, 59, 0, 17, 2, 19, 2, 61, 0, + 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, + 21, 2, 23, 2, 79, 0, 81, 0, 83, 0, 85, 0, 87, 0, 89, 0, + 91, 0, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 25, 2, 27, 2, + 29, 2, 31, 2, 103, 0, 105, 0, 107, 0, 109, 0, 111, 0, 113, 0, + 115, 0, 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, 3, 1, + 33, 2, 35, 2, 37, 2, 39, 2, 129, 0, 5, 1, 7, 1, 9, 1, + 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, + 27, 1, 29, 1, 31, 1, 33, 1, 35, 1, 41, 2, 43, 2, 45, 2, + 47, 2, 49, 2, 37, 1, 39, 1, 41, 1, 43, 1, 45, 1, 47, 1, + 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, 59, 1, 61, 1, 63, 1, + 65, 1, 67, 1, 69, 1, 71, 1, 73, 1, 75, 1, 77, 1, 79, 1, + 81, 1, 83, 1, 85, 1, 51, 2, 53, 2, 55, 2, 57, 2, 59, 2, + 61, 2, 63, 2, 65, 2, 87, 1, 89, 1, 91, 1, 93, 1, 95, 1, + 97, 1, 99, 1, 101, 1, 103, 1, 105, 1, 107, 1, 109, 1, 111, 1, + 113, 1, 115, 1, 117, 1, 119, 1, 121, 1, 123, 1, 125, 1, 127, 1, + 129, 1, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, + 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, + 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, + 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 2, + 129, 2, 3, 3, 5, 3, 7, 3, 9, 3, 11, 3, 13, 3, 15, 3, + 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, + 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, + 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, + 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, + 81, 3, 83, 3, 85, 3, 87, 3, 89, 3, 91, 3, 93, 3, 95, 3, + 97, 3, 99, 3, 101, 3, 103, 3, 105, 3, 107, 3, 109, 3, 111, 3, + 113, 3, 115, 3, 117, 3, 119, 3, 121, 3, 123, 3, 125, 3, 127, 3, + 129, 3, }; static const uint16_t dnxhd_1250_ac_codes[257] = { @@ -688,62 +616,41 @@ static const uint8_t dnxhd_1250_ac_bits[257] = { 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, 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 91, 0, + 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, 23, 2, + 25, 2, 27, 2, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, 117, 0, + 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, 129, 0, 3, 1, 5, 1, + 7, 1, 9, 1, 11, 1, 29, 2, 31, 2, 33, 2, 35, 2, 13, 1, + 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, 27, 1, 29, 1, + 31, 1, 33, 1, 35, 1, 37, 1, 39, 1, 41, 1, 43, 1, 45, 1, + 47, 1, 49, 1, 51, 1, 53, 1, 37, 2, 39, 2, 41, 2, 43, 2, + 55, 1, 57, 1, 59, 1, 61, 1, 63, 1, 65, 1, 67, 1, 69, 1, + 71, 1, 73, 1, 75, 1, 77, 1, 79, 1, 81, 1, 83, 1, 85, 1, + 87, 1, 89, 1, 91, 1, 93, 1, 95, 1, 97, 1, 99, 1, 101, 1, + 103, 1, 105, 1, 107, 1, 111, 1, 113, 1, 45, 2, 47, 2, 49, 2, + 51, 2, 53, 2, 55, 2, 109, 1, 115, 1, 117, 1, 119, 1, 121, 1, + 123, 1, 125, 1, 127, 1, 129, 1, 57, 2, 59, 2, 61, 2, 63, 2, + 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, + 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, + 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, + 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 2, + 129, 2, 3, 3, 5, 3, 7, 3, 9, 3, 11, 3, 13, 3, 15, 3, + 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, + 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, + 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, + 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, + 81, 3, 83, 3, 85, 3, 87, 3, 89, 3, 91, 3, 93, 3, 95, 3, + 97, 3, 99, 3, 101, 3, 103, 3, 105, 3, 107, 3, 109, 3, 111, 3, + 113, 3, 115, 3, 117, 3, 119, 3, 121, 3, 123, 3, 125, 3, 127, 3, + 129, 3, }; static const uint16_t dnxhd_1251_ac_codes[257] = { @@ -802,64 +709,40 @@ static const uint8_t dnxhd_1251_ac_bits[257] = { 16, }; -static const uint8_t dnxhd_1251_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, 22, 23, 24, 25, - 26, 27, 28, 29, 7, 8, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 9, 10, 11, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 12, 13, 14, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1, - 2, 3, 4, 5, 6, 7, 8, 15, 16, 17, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 18, - 19, 20, 21, 22, 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, 23, 24, 25, 26, 27, 28, 59, 60, 61, 62, 63, 64, 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_1251_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, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 1, 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, - 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 1, 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, -}; - -static const uint8_t dnxhd_1251_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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0, 19, 2, 21, 2, 23, 2, 83, 0, 85, 0, 87, 0, 89, 0, + 91, 0, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, 103, 0, 105, 0, + 25, 2, 27, 2, 29, 2, 107, 0, 109, 0, 111, 0, 113, 0, 115, 0, + 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, 129, 0, 3, 1, + 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 31, 2, + 33, 2, 35, 2, 19, 1, 21, 1, 23, 1, 25, 1, 27, 1, 29, 1, + 31, 1, 33, 1, 35, 1, 37, 1, 39, 1, 41, 1, 43, 1, 45, 1, + 47, 1, 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, 59, 1, 37, 2, + 39, 2, 41, 2, 43, 2, 45, 2, 61, 1, 63, 1, 65, 1, 67, 1, + 69, 1, 71, 1, 73, 1, 75, 1, 77, 1, 79, 1, 81, 1, 83, 1, + 85, 1, 87, 1, 89, 1, 91, 1, 93, 1, 95, 1, 97, 1, 99, 1, + 101, 1, 103, 1, 105, 1, 107, 1, 109, 1, 111, 1, 113, 1, 115, 1, + 117, 1, 47, 2, 49, 2, 51, 2, 53, 2, 55, 2, 57, 2, 119, 1, + 121, 1, 123, 1, 125, 1, 127, 1, 129, 1, 59, 2, 61, 2, 63, 2, + 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, + 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, + 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, + 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 2, + 129, 2, 3, 3, 5, 3, 7, 3, 9, 3, 11, 3, 13, 3, 15, 3, + 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, + 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, + 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, + 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, + 81, 3, 83, 3, 85, 3, 87, 3, 89, 3, 91, 3, 93, 3, 95, 3, + 97, 3, 99, 3, 101, 3, 103, 3, 105, 3, 107, 3, 109, 3, 111, 3, + 113, 3, 115, 3, 117, 3, 119, 3, 121, 3, 123, 3, 125, 3, 127, 3, + 129, 3, }; /* Used in CID 1252, 1258 */ @@ -921,69 +804,43 @@ static const uint8_t dnxhd_1252_ac_bits[257] = { }; /* Used in CID 1252, 1258 */ -static const uint8_t dnxhd_1252_ac_level[257] = { - 1, 1, 2, 3, 2, 0, 4, 5, 6, 7, 3, 8, 9, 10, 11, 12, - 13, 14, 4, 5, 15, 16, 17, 18, 6, 19, 20, 21, 22, 23, 24, 7, - 8, 25, 26, 27, 28, 29, 30, 31, 32, 9, 10, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 11, 12, 13, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 14, 15, 16, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 1, 2, 3, 17, 18, 19, 20, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 21, 22, 23, 24, 25, 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, 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, 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, -}; - -/* Used in CID 1252, 1258 */ -static const uint8_t dnxhd_1252_ac_run_flag[257] = { - 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 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, 1, 1, 1, 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, 1, 1, 1, 1, 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, 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, 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, -}; - -/* Used in CID 1252, 1258 */ -static const uint8_t dnxhd_1252_ac_index_flag[257] = { - 0, 0, 0, 0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 15, 2, + 17, 2, 51, 0, 53, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 0, + 65, 0, 19, 2, 21, 2, 67, 0, 69, 0, 71, 0, 73, 0, 75, 0, + 77, 0, 79, 0, 81, 0, 83, 0, 23, 2, 25, 2, 27, 2, 85, 0, + 87, 0, 89, 0, 91, 0, 93, 0, 95, 0, 97, 0, 99, 0, 101, 0, + 103, 0, 105, 0, 107, 0, 29, 2, 31, 2, 33, 2, 109, 0, 111, 0, + 113, 0, 115, 0, 117, 0, 119, 0, 121, 0, 123, 0, 125, 0, 127, 0, + 129, 0, 3, 1, 5, 1, 7, 1, 35, 2, 37, 2, 39, 2, 41, 2, + 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, + 25, 1, 27, 1, 29, 1, 31, 1, 33, 1, 35, 1, 37, 1, 39, 1, + 41, 1, 43, 1, 43, 2, 45, 2, 47, 2, 49, 2, 51, 2, 45, 1, + 47, 1, 49, 1, 51, 1, 53, 1, 55, 1, 57, 1, 59, 1, 61, 1, + 63, 1, 65, 1, 67, 1, 69, 1, 71, 1, 73, 1, 75, 1, 77, 1, + 79, 1, 81, 1, 83, 1, 85, 1, 87, 1, 89, 1, 91, 1, 93, 1, + 95, 1, 97, 1, 99, 1, 101, 1, 103, 1, 105, 1, 107, 1, 109, 1, + 111, 1, 113, 1, 115, 1, 117, 1, 119, 1, 121, 1, 123, 1, 125, 1, + 127, 1, 129, 1, 53, 2, 55, 2, 57, 2, 59, 2, 61, 2, 63, 2, + 65, 2, 67, 2, 69, 2, 71, 2, 73, 2, 75, 2, 77, 2, 79, 2, + 81, 2, 83, 2, 85, 2, 87, 2, 89, 2, 91, 2, 93, 2, 95, 2, + 97, 2, 99, 2, 101, 2, 103, 2, 105, 2, 107, 2, 109, 2, 111, 2, + 113, 2, 115, 2, 117, 2, 119, 2, 121, 2, 123, 2, 125, 2, 127, 2, + 129, 2, 3, 3, 5, 3, 7, 3, 9, 3, 11, 3, 13, 3, 15, 3, + 17, 3, 19, 3, 21, 3, 23, 3, 25, 3, 27, 3, 29, 3, 31, 3, + 33, 3, 35, 3, 37, 3, 39, 3, 41, 3, 43, 3, 45, 3, 47, 3, + 49, 3, 51, 3, 53, 3, 55, 3, 57, 3, 59, 3, 61, 3, 63, 3, + 65, 3, 67, 3, 69, 3, 71, 3, 73, 3, 75, 3, 77, 3, 79, 3, + 81, 3, 83, 3, 85, 3, 87, 3, 89, 3, 91, 3, 93, 3, 95, 3, + 97, 3, 99, 3, 101, 3, 103, 3, 105, 3, 107, 3, 109, 3, 111, 3, + 113, 3, 115, 3, 117, 3, 119, 3, 121, 3, 123, 3, 125, 3, 127, 3, + 129, 3, +}; + +/* Used in CID 1235, 1238, 1241, 1243, 1256, 1270, 1271, 1272 */ static const uint16_t dnxhd_1235_run_codes[62] = { 0, 4, 10, 11, 24, 25, 26, 27, 56, 57, 58, 59, 120, 242, 486, 487, @@ -995,7 +852,7 @@ static const uint16_t dnxhd_1235_run_codes[62] = { 1018, 1019, 1020, 1021, 1022, 1023, }; -/* Used in CID 1235, 1238, 1241, 1243, 1256 */ +/* Used in CID 1235, 1238, 1241, 1243, 1256, 1270, 1271, 1272 */ static const uint8_t dnxhd_1235_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, @@ -1003,7 +860,7 @@ static const uint8_t dnxhd_1235_run_bits[62] = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, }; -/* Used in CID 1235, 1241, 1256 */ +/* Used in CID 1235, 1241, 1256, 1270, 1271 */ static const uint8_t dnxhd_1235_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, @@ -1011,7 +868,7 @@ static const uint8_t dnxhd_1235_run[62] = { 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, }; -/* Used in CID 1237, 1242, 1253, 1259, 1260 */ +/* Used in CID 1237, 1242, 1253, 1259, 1260, 1273, 1274 */ static const uint16_t dnxhd_1237_run_codes[62] = { 0, 4, 10, 11, 24, 25, 26, 54, 55, 56, 57, 58, 118, 119, 240, 482, @@ -1023,7 +880,7 @@ static const uint16_t dnxhd_1237_run_codes[62] = { 1018, 1019, 1020, 1021, 1022, 1023, }; -/* Used in CID 1237, 1242, 1253, 1259, 1260 */ +/* Used in CID 1237, 1242, 1253, 1259, 1260, 1273, 1274 */ static const uint8_t dnxhd_1237_run_bits[62] = { 1, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, @@ -1031,7 +888,7 @@ static const uint8_t dnxhd_1237_run_bits[62] = { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, }; -/* Used in CID 1237, 1242, 1253, 1259, 1260 */ +/* Used in CID 1237, 1242, 1253, 1259, 1260, 1273, 1274 */ static const uint8_t dnxhd_1237_run[62] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 57, 58, 59, 60, 61, 62, 22, 23, 24, 25, @@ -1039,6 +896,7 @@ static const uint8_t dnxhd_1237_run[62] = { 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, }; +/* Used in CID 1238, 1243, 1272 */ static const uint8_t dnxhd_1238_run[62] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, @@ -1075,104 +933,158 @@ static const uint8_t dnxhd_1250_run[62] = { }; const CIDEntry ff_dnxhd_cid_table[] = { - { 1235, 1920, 1080, 0, 917504, 917504, 6, 10, + { 1235, 1920, 1080, 917504, 917504, + 0, 6, 10, 4, dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, - dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_level, - dnxhd_1235_ac_run_flag, dnxhd_1235_ac_index_flag, + dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 175, 185, 365, 440 } }, - { 1237, 1920, 1080, 0, 606208, 606208, 4, 8, + { 175, 185, 365, 440 }, + { { 24000, 1001 }, { 25, 1 }, { 50, 1 }, { 60000, 1001 } } }, + { 1237, 1920, 1080, 606208, 606208, + 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, - dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level, - dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 115, 120, 145, 240, 290 } }, - { 1238, 1920, 1080, 0, 917504, 917504, 4, 8, + { 115, 120, 145, 240, 290 }, + { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 1238, 1920, 1080, 917504, 917504, + 0, 4, 8, 4, dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_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_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1238_run, - { 175, 185, 220, 365, 440 } }, - { 1241, 1920, 1080, 1, 917504, 458752, 6, 10, + { 175, 185, 220, 365, 440 }, + { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 1241, 1920, 1080, 917504, 458752, + DNXHD_INTERLACED, 6, 10, 4, dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, - dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_level, - dnxhd_1235_ac_run_flag, dnxhd_1235_ac_index_flag, + dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 185, 220 } }, - { 1242, 1920, 1080, 1, 606208, 303104, 4, 8, + { 185, 220 }, + { { 25, 1 }, { 30000, 1001 } } }, + { 1242, 1920, 1080, 606208, 303104, + DNXHD_INTERLACED, 4, 8, 3, dnxhd_1242_luma_weight, dnxhd_1242_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, - dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level, - dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, - { 120, 145 } }, - { 1243, 1920, 1080, 1, 917504, 458752, 4, 8, + { 120, 145 }, + { { 25, 1 }, { 30000, 1001 } } }, + { 1243, 1920, 1080, 917504, 458752, + DNXHD_INTERLACED, 4, 8, 4, dnxhd_1243_luma_weight, dnxhd_1243_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_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_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1238_run, - { 185, 220 } }, - { 1250, 1280, 720, 0, 458752, 458752, 6, 10, + { 185, 220 }, + { { 25, 1 }, { 30000, 1001 } } }, + { 1244, 1440, 1080, 606208, 303104, + DNXHD_INTERLACED, 4, 8, 3, + dnxhd_1260_luma_weight, dnxhd_1260_chroma_weight, + dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, + dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, + { 120, 145 }, + { { 25, 1 }, { 30000, 1001 } } }, + { 1250, 1280, 720, 458752, 458752, + 0, 6, 10, 4, dnxhd_1250_luma_weight, dnxhd_1250_chroma_weight, dnxhd_1235_dc_codes, dnxhd_1235_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_ac_codes, dnxhd_1250_ac_bits, dnxhd_1250_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, - { 90, 180, 220 } }, - { 1251, 1280, 720, 0, 458752, 458752, 4, 8, + { 90, 90, 180, 220 }, + { { 24000, 1001 }, { 25, 1 }, { 50, 1 }, { 60000, 1001 } } }, + { 1251, 1280, 720, 458752, 458752, + 0, 4, 8, 4, dnxhd_1251_luma_weight, dnxhd_1251_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, - dnxhd_1251_ac_codes, dnxhd_1251_ac_bits, dnxhd_1251_ac_level, - dnxhd_1251_ac_run_flag, dnxhd_1251_ac_index_flag, + dnxhd_1251_ac_codes, dnxhd_1251_ac_bits, dnxhd_1251_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, - { 90, 110, 175, 220 } }, - { 1252, 1280, 720, 0, 303104, 303104, 4, 8, + { 90, 90, 110, 180, 220 }, + { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 1252, 1280, 720, 303104, 303104, + 0, 4, 8, 5, dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_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_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, - { 60, 75, 115, 145 } }, - { 1253, 1920, 1080, 0, 188416, 188416, 4, 8, + { 60, 60, 75, 120, 145 }, + { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 1253, 1920, 1080, 188416, 188416, + 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, - dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level, - dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, 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_1235_chroma_weight, + { 36, 36, 45, 75, 90 }, + { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 1256, 1920, 1080, 1835008, 1835008, + DNXHD_444, 6, 10, 4, + dnxhd_1235_luma_weight, dnxhd_1235_luma_weight, dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, - dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_level, - dnxhd_1235_ac_run_flag, dnxhd_1235_ac_index_flag, + dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, - { 350, 390, 440, 730, 880 } }, - { 1258, 960, 720, 0, 212992, 212992, 4, 8, + { 350, 390, 440, 730, 880 }, + { { 24000, 1001 }, { 25, 1 }, { 30000, 1001 }, { 50, 1 }, { 60000, 1001 } } }, + { 1258, 960, 720, 212992, 212992, + 0, 4, 8, 5, dnxhd_1252_luma_weight, dnxhd_1252_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_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_1252_ac_codes, dnxhd_1252_ac_bits, dnxhd_1252_ac_info, dnxhd_1250_run_codes, dnxhd_1250_run_bits, dnxhd_1250_run, { 42, 60, 75, 115 } }, - { 1259, 1440, 1080, 0, 417792, 417792, 4, 8, + { 1259, 1440, 1080, 417792, 417792, + 0, 4, 8, 3, dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, - dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level, - dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, { 63, 84, 100, 110 } }, - { 1260, 1440, 1080, 1, 835584, 417792, 4, 8, + { 1260, 1440, 1080, 835584, 417792, + DNXHD_INTERLACED | DNXHD_MBAFF, 4, 8, 3, dnxhd_1260_luma_weight, dnxhd_1260_chroma_weight, dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, - dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_level, - dnxhd_1237_ac_run_flag, dnxhd_1237_ac_index_flag, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, { 80, 90, 100, 110 } }, + { 1270, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, + DNXHD_444, 6, DNXHD_VARIABLE, 4, + dnxhd_1235_luma_weight, dnxhd_1235_luma_weight, + dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, + dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, + dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, + { 0 }, { { 0 } }, { 57344, 255} }, + { 1271, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, + 0, 6, DNXHD_VARIABLE, 4, + dnxhd_1241_luma_weight, dnxhd_1241_chroma_weight, + dnxhd_1235_dc_codes, dnxhd_1235_dc_bits, + dnxhd_1235_ac_codes, dnxhd_1235_ac_bits, dnxhd_1235_ac_info, + dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1235_run, + { 0 }, { { 0 } }, { 28672, 255} }, + { 1272, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, + 0, 4, 8, 4, + dnxhd_1238_luma_weight, dnxhd_1238_chroma_weight, + dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, + dnxhd_1238_ac_codes, dnxhd_1238_ac_bits, dnxhd_1238_ac_info, + dnxhd_1235_run_codes, dnxhd_1235_run_bits, dnxhd_1238_run, + { 0 }, { { 0 } }, { 28672, 255} }, + { 1273, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, + 0, 4, 8, 3, + dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, + dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, + dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, + { 0 }, { { 0 } }, { 18944, 255} }, + { 1274, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, DNXHD_VARIABLE, + 0, 4, 8, 3, + dnxhd_1237_luma_weight, dnxhd_1237_chroma_weight, + dnxhd_1237_dc_codes, dnxhd_1237_dc_bits, + dnxhd_1237_ac_codes, dnxhd_1237_ac_bits, dnxhd_1237_ac_info, + dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, + { 0 }, { { 0 } }, { 5888, 255} }, }; int ff_dnxhd_get_cid_table(int cid) @@ -1184,18 +1096,68 @@ int ff_dnxhd_get_cid_table(int cid) return -1; } +int avpriv_dnxhd_get_frame_size(int cid) +{ + int i = ff_dnxhd_get_cid_table(cid); + if (i<0) + return i; + return ff_dnxhd_cid_table[i].frame_size; +} + +int avpriv_dnxhd_get_interlaced(int cid) +{ + int i = ff_dnxhd_get_cid_table(cid); + if (i < 0) + return i; + return ff_dnxhd_cid_table[i].flags & DNXHD_INTERLACED ? 1 : 0; +} + +#if LIBAVCODEC_VERSION_MAJOR < 58 +uint64_t avpriv_dnxhd_parse_header_prefix(const uint8_t *buf) +{ + return ff_dnxhd_parse_header_prefix(buf); +} +#endif + +static int dnxhd_find_hr_cid(AVCodecContext *avctx) +{ + switch (avctx->profile) { + case FF_PROFILE_DNXHR_444: + return 1270; + case FF_PROFILE_DNXHR_HQX: + return 1271; + case FF_PROFILE_DNXHR_HQ: + return 1272; + case FF_PROFILE_DNXHR_SQ: + return 1273; + case FF_PROFILE_DNXHR_LB: + return 1274; + } + return 0; +} + int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth) { int i, j; int mbs = avctx->bit_rate / 1000000; + + if (avctx->profile != FF_PROFILE_DNXHD) + return dnxhd_find_hr_cid(avctx); + if (!mbs) return 0; for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) { const CIDEntry *cid = &ff_dnxhd_cid_table[i]; + int interlaced = cid->flags & DNXHD_INTERLACED ? 1 : 0; if (cid->width == avctx->width && cid->height == avctx->height && - cid->interlaced == !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) && - cid->bit_depth == bit_depth) { - for (j = 0; j < sizeof(cid->bit_rates); j++) { + interlaced == !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) && + !(cid->flags & DNXHD_444) && cid->bit_depth == bit_depth) { + if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL && + cid->flags & DNXHD_MBAFF) { + av_log(avctx, AV_LOG_WARNING, "Profile selected is experimental\n"); + continue; + } + for (j = 0; j < FF_ARRAY_ELEMS(cid->bit_rates); j++) { if (cid->bit_rates[j] == mbs) return cid->cid; } @@ -1204,25 +1166,18 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth) return 0; } -void ff_dnxhd_list_cid(AVCodecContext *avctx) +void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel) { int i, j; - for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) { const CIDEntry *cid = &ff_dnxhd_cid_table[i]; - av_log(avctx, AV_LOG_INFO, - "cid %d %ux%u %dbits %s bit rates", - cid->cid, - cid->width, cid->height, - cid->bit_depth, - cid->interlaced ? "interlaced " : - "progressive"); for (j = 0; j < FF_ARRAY_ELEMS(cid->bit_rates); j++) { if (!cid->bit_rates[j]) break; - av_log(avctx, AV_LOG_INFO, " %dM", - cid->bit_rates[j]); + + av_log(avctx, loglevel, "Frame size: %dx%d%c; bitrate: %dMbps; pixel format: %s; framerate: %d/%d\n", + cid->width, cid->height, cid->flags & DNXHD_INTERLACED ? 'i' : 'p', cid->bit_rates[j], + cid->bit_depth == 10 ? "yuv422p10" : "yuv422p", cid->frame_rates[j].num, cid->frame_rates[j].den); } - av_log(avctx, AV_LOG_INFO, "\n"); } } |