History

avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields

The layout for the frame flags is as follow: chroma_format u(2) reserved u(2) interlace_mode u(2) reserved u(2) chroma_format has 2 allowed values: 0: reserved 1: reserved 2: 4:2:2 3: 4:4:4 interlace_mode has 3 allowed values: 0: progressive 1: tff 2: bff 3: reserved 0x80 is what we expect for "422 not interlaced", and the extra 0x2 from 0x82 is actually writing into the reserved bits.

Clément Bœsch committed 2 years ago

Commit af509f91 parent 21f7a8117 files · +17 −17Browse files

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

Unified · Split

libavcodec/proresenc_anatoliy.c+1−1
@@ -750,7 +750,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 749 unmodified lines
750750 bytestream_put_buffer(&buf, ctx->vendor, 4);
751751 bytestream_put_be16(&buf, avctx->width);
752752 bytestream_put_be16(&buf, avctx->height);
753− frame_flags = 0x82; /* 422 not interlaced */
753+ frame_flags = 0x80; /* 422 not interlaced */
754754 if (avctx->profile >= AV_PROFILE_PRORES_4444) /* 4444 or 4444 Xq */
755755 frame_flags |= 0x40; /* 444 chroma */
756756 if (ctx->is_interlaced) {

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