[FFmpeg-cvslog] avcodec/mpegvideo_enc: Remove always-false checks

Andreas Rheinhardt git at videolan.org
Tue Oct 10 01:31:52 EEST 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Oct  4 21:57:53 2023 +0200| [5aaaa7dbee959947fbb4f8f58cfd2a388725c09e] | committer: Andreas Rheinhardt

avcodec/mpegvideo_enc: Remove always-false checks

In case "!direct" we are not reusing the input buffers
(due to e.g. insufficient alignment), but allocating
new ones. These of course do not alias with the ones
provided by the user, so these checks are always-false.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5aaaa7dbee959947fbb4f8f58cfd2a388725c09e
---

 libavcodec/mpegvideo_enc.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index bc89de0550..3f1dd929fa 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1172,11 +1172,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
             return ret;
 
         if (!direct) {
-            if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] &&
-                pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] &&
-                pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) {
-                // empty
-            } else {
                 int h_chroma_shift, v_chroma_shift;
                 av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
                                                  &h_chroma_shift,
@@ -1221,7 +1216,6 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
                     }
                 }
                 emms_c();
-            }
         }
         ret = av_frame_copy_props(pic->f, pic_arg);
         if (ret < 0) {



More information about the ffmpeg-cvslog mailing list