diff options
author | Jeremy James <jeremy.james@gmail.com> | 2015-10-03 18:59:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-05 12:44:10 +0200 |
commit | 118a3cd2c5e210ef7c8c36a083a6c3a68d5fb395 (patch) | |
tree | 79ee398cb8f5c9f962decfc463087a67c1d2b6fd | |
parent | 3a6a432b58fab042cfd90bf4a77e30bfe7de6a07 (diff) | |
download | ffmpeg-streaming-118a3cd2c5e210ef7c8c36a083a6c3a68d5fb395.zip ffmpeg-streaming-118a3cd2c5e210ef7c8c36a083a6c3a68d5fb395.tar.gz |
dnxhd: add decoder support for DNxHR
Signed-off-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/dnxhddata.c | 8 | ||||
-rw-r--r-- | libavcodec/dnxhddec.c | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c index 798cc0e..5fb7a5e 100644 --- a/libavcodec/dnxhddata.c +++ b/libavcodec/dnxhddata.c @@ -1073,6 +1073,14 @@ const CIDEntry ff_dnxhd_cid_table[] = { dnxhd_1237_ac_flags, dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, { 80, 90, 100, 110 } }, + { 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_level, + dnxhd_1237_ac_flags, + dnxhd_1237_run_codes, dnxhd_1237_run_bits, dnxhd_1237_run, + { 0 } }, }; int ff_dnxhd_get_cid_table(int cid) diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index f71977a..47f1535 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -153,6 +153,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, { static const uint8_t header_prefix[] = { 0x00, 0x00, 0x02, 0x80, 0x01 }; static const uint8_t header_prefix444[] = { 0x00, 0x00, 0x02, 0x80, 0x02 }; + static const uint8_t header_prefixhr[] = { 0x00, 0x00, 0x02, 0x80, 0x03 }; int i, cid, ret; int old_bit_depth = ctx->bit_depth; @@ -162,7 +163,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, return AVERROR_INVALIDDATA; } - if (memcmp(buf, header_prefix, 5) && memcmp(buf, header_prefix444, 5)) { + if (memcmp(buf, header_prefix, 5) && memcmp(buf, header_prefix444, 5) && memcmp(buf, header_prefixhr, 5)) { av_log(ctx->avctx, AV_LOG_ERROR, "unknown header 0x%02X 0x%02X 0x%02X 0x%02X 0x%02X\n", buf[0], buf[1], buf[2], buf[3], buf[4]); |