avcodec/dnxhddec: fix decoding of DNxHR HQX 10-bit
authorPaul B Mahol <onemda@gmail.com>
Wed, 22 Feb 2017 13:47:43 +0000 (14:47 +0100)
committerPaul B Mahol <onemda@gmail.com>
Wed, 22 Feb 2017 20:21:52 +0000 (21:21 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/dnxhddec.c

index 70ce264..defbf10 100644 (file)
@@ -249,7 +249,10 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
         ctx->decode_dct_block = dnxhd_decode_dct_block_12;
         ctx->pix_fmt = AV_PIX_FMT_YUV422P12;
     } else if (bitdepth == 10) {
-        ctx->decode_dct_block = dnxhd_decode_dct_block_10;
+        if (ctx->avctx->profile == FF_PROFILE_DNXHR_HQX)
+            ctx->decode_dct_block = dnxhd_decode_dct_block_10_444;
+        else
+            ctx->decode_dct_block = dnxhd_decode_dct_block_10;
         ctx->pix_fmt = AV_PIX_FMT_YUV422P10;
     } else {
         ctx->decode_dct_block = dnxhd_decode_dct_block_8;