aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/msmpeg4.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/msmpeg4.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/msmpeg4.c')
-rw-r--r--libavcodec/msmpeg4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 323f083f8f..f7ebb8ba89 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -282,10 +282,10 @@ int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,
int bs = 8 >> s->avctx->lowres;
if(n<4){
wrap= s->linesize;
- dest = s->cur_pic.f->data[0] + (((n >> 1) + 2*s->mb_y) * bs* wrap ) + ((n & 1) + 2*s->mb_x) * bs;
+ dest = s->cur_pic.data[0] + (((n >> 1) + 2*s->mb_y) * bs* wrap ) + ((n & 1) + 2*s->mb_x) * bs;
}else{
wrap= s->uvlinesize;
- dest = s->cur_pic.f->data[n - 3] + (s->mb_y * bs * wrap) + s->mb_x * bs;
+ dest = s->cur_pic.data[n - 3] + (s->mb_y * bs * wrap) + s->mb_x * bs;
}
if(s->mb_x==0) a= (1024 + (scale>>1))/scale;
else a= get_dc(dest-bs, wrap, scale*8>>(2*s->avctx->lowres), bs);