summaryrefslogtreecommitdiffstats
path: root/libavcodec/proresenc_anatoliy.c
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2019-02-09 18:15:59 +0100
committerMartin Vignali <martin.vignali@gmail.com>2019-02-23 13:21:17 +0100
commit6cc8cfe30c09b1776b935988fcdedf0333602f8e (patch)
treebdd2ddb812a8a3d21669264abf22fe0870dbe4fc /libavcodec/proresenc_anatoliy.c
parentc679119a73d96b834061bbed2cc38aa6bb5f79f0 (diff)
downloadffmpeg-streaming-6cc8cfe30c09b1776b935988fcdedf0333602f8e.zip
ffmpeg-streaming-6cc8cfe30c09b1776b935988fcdedf0333602f8e.tar.gz
avcodec/proresenc_aw : simplify frame flags
Diffstat (limited to 'libavcodec/proresenc_anatoliy.c')
-rw-r--r--libavcodec/proresenc_anatoliy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 2bed58b..afd1fa6 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -684,6 +684,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int header_size = 148;
uint8_t *buf;
int pic_size, ret;
+ uint8_t frame_flags;
int frame_size = FFALIGN(avctx->width, 16) * FFALIGN(avctx->height, 16)*16 + 500 + AV_INPUT_BUFFER_MIN_SIZE; //FIXME choose tighter limit
@@ -705,11 +706,10 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bytestream_put_buffer(&buf, ctx->vendor, 4);
bytestream_put_be16(&buf, avctx->width);
bytestream_put_be16(&buf, avctx->height);
- if (avctx->profile >= FF_PROFILE_PRORES_4444) { /* 4444 or 4444 Xq */
- *buf++ = 0xC2; // 444, not interlaced
- } else {
- *buf++ = 0x82; // 422, not interlaced
- }
+ frame_flags = 0x82; /* 422 not interlaced */
+ if (avctx->profile >= FF_PROFILE_PRORES_4444) /* 4444 or 4444 Xq */
+ frame_flags |= 0x40; /* 444 chroma */
+ *buf++ = frame_flags;
*buf++ = 0; /* reserved */
/* only write color properties, if valid value. set to unspecified otherwise */
*buf++ = ff_int_from_list_or_default(avctx, "frame color primaries", pict->color_primaries, valid_primaries, 0);
OpenPOWER on IntegriCloud