summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_dec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-08 13:06:54 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-10 18:49:35 +0200
commit3443330b172af9b45e11ecc3af4351a023f83d9c (patch)
treee94b3dd9e53e9c132a825f365dcd65d4d7ed0e52 /libavcodec/mpegvideo_dec.c
parent300e31457a42a4b618b6cecab65acbcc5632cb16 (diff)
downloadffmpeg-3443330b172af9b45e11ecc3af4351a023f83d9c.tar.gz
avcodec/mpegvideo: Move setting mb_height to ff_mpv_init_context_frame
It is the proper place to set it, directly besides mb_width and mb_stride. The reason for doing it the way it is done now seems to be that the code does not create more slice contexts than necessary (i.e. not more than one per row), so that this number needs to be known before setting the number of slices. But this can always be arranged by just moving the code that sets the number of slices. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo_dec.c')
-rw-r--r--libavcodec/mpegvideo_dec.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index 7caaf0596d..93ba4e31b3 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -208,12 +208,6 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s)
s->next_picture_ptr =
s->current_picture_ptr = NULL;
- // init
- if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
- s->mb_height = (s->height + 31) / 32 * 2;
- else
- s->mb_height = (s->height + 15) / 16;
-
if ((s->width || s->height) &&
(err = av_image_check_size(s->width, s->height, 0, s->avctx)) < 0)
goto fail;