History

avcodec/proresenc_anatoliy: use a compatible bitstream version

Quoting SMPTE RDD 36:2015: A decoder shall abort if it encounters a bitstream with an unsupported bitstream_version value. If 0, the value of the chroma_format syntax element shall be 2 (4:2:2 sampling) and the value of the alpha_channel_type element shall be 0 (no encoded alpha); if 1, any permissible value may be used for those syntax elements. So if we're not in 4:2:2 or if there is alpha, we are not allowed to use version 0.

Clément Bœsch committed 2 years ago

Commit 85cb1b91 parent 0405f719 files · +9 −9Browse files

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

Unified · Split

libavcodec/proresenc_anatoliy.c+1−1
@@ -746,7 +746,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 745 unmodified lines
746746 bytestream_put_be32(&buf, FRAME_ID);
747747
748748 bytestream_put_be16(&buf, header_size);
749− bytestream_put_be16(&buf, 0); /* version */
749+ bytestream_put_be16(&buf, avctx->pix_fmt != AV_PIX_FMT_YUV422P10 || ctx->need_alpha ? 1 : 0); /* version */
750750 bytestream_put_buffer(&buf, ctx->vendor, 4);
751751 bytestream_put_be16(&buf, avctx->width);
752752 bytestream_put_be16(&buf, avctx->height);

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