aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_motion.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-04 17:27:24 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-12 11:20:56 +0200
commit7814dd77aa61703e3d43fc72bfaf6a9fbc42ff9c (patch)
tree179608480b6e2965a85d63b68b20b688f7af19a1 /libavcodec/mpegvideo_motion.c
parent1c40a179222f638e88c8e7b1a374753a00b0f979 (diff)
downloadffmpeg-7814dd77aa61703e3d43fc72bfaf6a9fbc42ff9c.tar.gz
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>
Diffstat (limited to 'libavcodec/mpegvideo_motion.c')
-rw-r--r--libavcodec/mpegvideo_motion.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index 3824832f9d..9c1872aa1b 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -93,8 +93,8 @@ void mpeg_motion_internal(MpegEncContext *s,
ptrdiff_t uvlinesize, linesize;
v_edge_pos = s->v_edge_pos >> field_based;
- 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;
block_y_half = (field_based | is_16x8);
dxy = ((motion_y & 1) << 1) | (motion_x & 1);