diff mbox series

[FFmpeg-devel,08/13] avcodec/mpegvideo_enc: Remove dead block

Message ID AS8P250MB07443B8EDD6E410FC72980528FC9A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit d87c358ee6382bb72520c09fcefda95021bbdd61
Headers show
Series [FFmpeg-devel,01/13] avcodec/mpegvideo_enc: Fix abort on allocation errors | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 6, 2023, 2:46 a.m. UTC
None of the mpegvideo encoders support anything but coded frames;
and if this were to change, it is unclear whether they would need
the adjustment here. So remove it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegvideo_enc.c | 13 -------------
 1 file changed, 13 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 9e28304554..5dc95ef309 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1724,19 +1724,6 @@  static int frame_start(MpegEncContext *s)
             return ret;
     }
 
-    if (s->picture_structure!= PICT_FRAME) {
-        int i;
-        for (i = 0; i < 4; i++) {
-            if (s->picture_structure == PICT_BOTTOM_FIELD) {
-                s->current_picture.f->data[i] +=
-                    s->current_picture.f->linesize[i];
-            }
-            s->current_picture.f->linesize[i] *= 2;
-            s->last_picture.f->linesize[i]    *= 2;
-            s->next_picture.f->linesize[i]    *= 2;
-        }
-    }
-
     if (s->dct_error_sum) {
         av_assert2(s->noise_reduction && s->encoding);
         update_noise_reduction(s);