1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/dnxhddec: ask for samples with alpha

This commit is contained in:
Paul B Mahol 2018-09-06 13:39:22 +02:00
parent 7bb90a9449
commit 237bbf6678

View File

@ -67,6 +67,8 @@ typedef struct DNXHDContext {
const CIDEntry *cid_table; const CIDEntry *cid_table;
int bit_depth; // 8, 10, 12 or 0 if not initialized at all. int bit_depth; // 8, 10, 12 or 0 if not initialized at all.
int is_444; int is_444;
int alpha;
int lla;
int mbaff; int mbaff;
int act; int act;
int (*decode_dct_block)(const struct DNXHDContext *ctx, 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->cur_field = 0;
} }
ctx->mbaff = (buf[0x6] >> 5) & 1; 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->height = AV_RB16(buf + 0x18);
ctx->width = AV_RB16(buf + 0x1a); ctx->width = AV_RB16(buf + 0x1a);