diff options
author | Clément Bœsch <u@pkh.me> | 2023-12-11 19:51:48 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2024-01-10 23:33:02 +0100 |
commit | 21f7a814ea6403a504e40f358cc24f97ebdf3193 (patch) | |
tree | 1a17eca8c107f6e25fec257afc8a2403475f568b /libavcodec/proresenc_anatoliy.c | |
parent | 6d3591166786aa2404798331554472a125c96dc1 (diff) | |
download | ffmpeg-21f7a814ea6403a504e40f358cc24f97ebdf3193.tar.gz |
avcodec/proresenc_anatoliy: do not write into alpha reserved bitfields
This byte represents 4 reserved bits followed by 4 alpha_channel_type bits.
alpha_channel_type currently has 3 differents defined values: 0 (no
alpha), 1 (8b alpha), and 2 (16b alpha), all the other values are
reserved. The 4 initial reserved bits are expected to be 0.
Diffstat (limited to 'libavcodec/proresenc_anatoliy.c')
-rw-r--r-- | libavcodec/proresenc_anatoliy.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 91e0e21f13..0dde661aed 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -775,15 +775,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, pict->color_trc, valid_trc, 0); *buf++ = int_from_list_or_default(avctx, "frame colorspace", pict->colorspace, valid_colorspace, 0); - if (avctx->profile >= AV_PROFILE_PRORES_4444) { - if (avctx->pix_fmt == AV_PIX_FMT_YUV444P10) { - *buf++ = 0xA0;/* src b64a and no alpha */ - } else { - *buf++ = 0xA2;/* src b64a and 16b alpha */ - } - } else { - *buf++ = 32;/* src v210 and no alpha */ - } + *buf++ = ctx->need_alpha ? 0x2 /* 16-bit alpha */ : 0; *buf++ = 0; /* reserved */ *buf++ = 3; /* luma and chroma matrix present */ |