X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdnxhddec.c;h=ae8b0ffafa279e9c62e16097b38fab6ffad17c5c;hb=6228ce0a33c77d8bd84a7abf61f502b46a8ce46f;hp=11d0bf424aae4f4d1689fd64c1550083c3283d30;hpb=23ba9b3fd1fe8fe7a67387aaaff2b173bd7c3d2c;p=ffmpeg diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 11d0bf424aa..ae8b0ffafa2 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -67,6 +67,8 @@ typedef struct DNXHDContext { const CIDEntry *cid_table; int bit_depth; // 8, 10, 12 or 0 if not initialized at all. int is_444; + int alpha; + int lla; int mbaff; int act; int (*decode_dct_block)(const struct DNXHDContext *ctx, @@ -205,6 +207,10 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, ctx->cur_field = 0; } ctx->mbaff = (buf[0x6] >> 5) & 1; + ctx->alpha = buf[0x7] & 1; + ctx->lla = (buf[0x7] >> 1) & 1; + if (ctx->alpha) + avpriv_request_sample(ctx->avctx, "alpha"); ctx->height = AV_RB16(buf + 0x18); ctx->width = AV_RB16(buf + 0x1a);