summaryrefslogtreecommitdiff
path: root/libavcodec/proresenc_kostya.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2023-12-11 19:51:09 +0100
committerClément Bœsch <u@pkh.me>2024-01-10 23:33:02 +0100
commit6d3591166786aa2404798331554472a125c96dc1 (patch)
tree681372bf78a714f0659f16234f0f5884443d3c91 /libavcodec/proresenc_kostya.c
parentaa7ccd0ce902450c865c62ac160dd08a7b003eb3 (diff)
avcodec/proresenc_kostya: 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. This part is correctly written (alpha_bits>>3 does the correct thing), but the 4 initial bits are reserved.
Diffstat (limited to 'libavcodec/proresenc_kostya.c')
-rw-r--r--libavcodec/proresenc_kostya.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 49bef5cf2f..61231b8cfb 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1008,7 +1008,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bytestream_put_byte (&buf, pic->color_primaries);
bytestream_put_byte (&buf, pic->color_trc);
bytestream_put_byte (&buf, pic->colorspace);
- bytestream_put_byte (&buf, 0x40 | (ctx->alpha_bits >> 3));
+ bytestream_put_byte (&buf, ctx->alpha_bits >> 3);
bytestream_put_byte (&buf, 0); // reserved
if (ctx->quant_sel != QUANT_MAT_DEFAULT) {
bytestream_put_byte (&buf, 0x03); // matrix flags - both matrices are present