diff options
author | James Almer <jamrial@gmail.com> | 2023-04-11 15:02:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-04 18:14:02 -0300 |
commit | 2f561ba953e23887ddb25ab1b6739aab04ff9115 (patch) | |
tree | dff824910ba954804d593dbf1aee0978dd5b612e /libavcodec/proresenc_kostya.c | |
parent | 2df4e054d4b8f69ce3c2c06aace9df9ba6d2ac2e (diff) | |
download | ffmpeg-2f561ba953e23887ddb25ab1b6739aab04ff9115.tar.gz |
avcodec: use the new AVFrame interlace flags in all decoders and encoders
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/proresenc_kostya.c')
-rw-r--r-- | libavcodec/proresenc_kostya.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 1940e0378a..77ab524046 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -585,7 +585,7 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); if (ctx->force_quant) { qmat = ctx->quants[0]; @@ -838,7 +838,7 @@ static int find_slice_quant(AVCodecContext *avctx, if (ctx->pictures_per_frame == 1) line_add = 0; else - line_add = ctx->cur_picture_idx ^ !ctx->pic->top_field_first; + line_add = ctx->cur_picture_idx ^ !(ctx->pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST); mbs = x + mbs_per_slice; for (i = 0; i < ctx->num_planes; i++) { @@ -1045,7 +1045,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, frame_flags = ctx->chroma_factor << 6; if (avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) - frame_flags |= pic->top_field_first ? 0x04 : 0x08; + frame_flags |= (pic->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? 0x04 : 0x08; bytestream_put_byte (&buf, frame_flags); bytestream_put_byte (&buf, 0); // reserved |