1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00

avcodec/mpegpicture: Cache AVFrame.data and linesize values

This avoids an indirection and is in preparation for removing
the AVFrame from MpegEncContext.(cur|last|next)_pic altogether.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2023-10-04 17:27:24 +02:00
parent 1c40a17922
commit 7814dd77aa
16 changed files with 114 additions and 96 deletions

View File

@@ -613,8 +613,8 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
const int h_edge_pos = s->h_edge_pos >> lowres;
const int v_edge_pos = s->v_edge_pos >> lowres;
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
linesize = s->cur_pic.f->linesize[0] << field_based;
uvlinesize = s->cur_pic.f->linesize[1] << field_based;
linesize = s->cur_pic.linesize[0] << field_based;
uvlinesize = s->cur_pic.linesize[1] << field_based;
// FIXME obviously not perfect but qpel will not work in lowres anyway
if (s->quarter_sample) {