History

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.

Clément Bœsch committed 2 years ago

Commit 21f7a811 parent 6d3591117 files · +17 −25Browse files

Showing the changes to libavcodec (1 of 17 files). Show all

Unified · Split

libavcodec/proresenc_anatoliy.c+1−9
@@ -775,15 +775,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 774 unmodified lines
775775 pict->color_trc, valid_trc, 0);
776776 *buf++ = int_from_list_or_default(avctx, "frame colorspace",
777777 pict->colorspace, valid_colorspace, 0);
778− if (avctx->profile >= AV_PROFILE_PRORES_4444) {
779− if (avctx->pix_fmt == AV_PIX_FMT_YUV444P10) {
780− *buf++ = 0xA0;/* src b64a and no alpha */
781− } else {
782− *buf++ = 0xA2;/* src b64a and 16b alpha */
783− }
784− } else {
785− *buf++ = 32;/* src v210 and no alpha */
786− }
778+ *buf++ = ctx->need_alpha ? 0x2 /* 16-bit alpha */ : 0;
787779 *buf++ = 0; /* reserved */
788780 *buf++ = 3; /* luma and chroma matrix present */
789781

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t