[FFmpeg-cvslog] avcodec/mpeg4videodec: Remove unnecessary ff_xvid_idct_init()
Andreas Rheinhardt
git at videolan.org
Mon May 26 06:25:07 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon May 19 17:18:38 2025 +0200| [eb5d900f87faeaca5a79b96a2faee0153ad8c7b1] | committer: Andreas Rheinhardt
avcodec/mpeg4videodec: Remove unnecessary ff_xvid_idct_init()
It is unnecessary: If the dst context is not already initialized,
then it will be initialized by memcpy(dst, src, sizeof(*dst),
which already initializes the IDCT to the desired one, potentially
followed by ff_mpv_common_init(), which does not touch the IDCT.
(This call has been added in f89d76c10355242c39b08f253c1d1524f45ef778;
the aforementioned copying took place back then, too, but
ff_mpv_common_init() reinitialized the IDCT to a non-xvid one,
therefore the initialization here has been added to fix
multithreaded decoding.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb5d900f87faeaca5a79b96a2faee0153ad8c7b1
---
libavcodec/mpeg4videodec.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 82b552356a..c4eed9136a 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -48,7 +48,6 @@
#include "profiles.h"
#include "qpeldsp.h"
#include "threadprogress.h"
-#include "xvididct.h"
#include "unary.h"
#if 0 //3IV1 is quite rare and it slows things down a tiny bit
@@ -3880,9 +3879,6 @@ static int mpeg4_update_thread_context(AVCodecContext *dst,
memcpy(s->sprite_shift, s1->sprite_shift, sizeof(s1->sprite_shift));
memcpy(s->sprite_traj, s1->sprite_traj, sizeof(s1->sprite_traj));
- if (!init && s1->xvid_build >= 0)
- ff_xvid_idct_init(&s->m.idsp, dst);
-
return av_buffer_replace(&s->bitstream_buffer, s1->bitstream_buffer);
}
More information about the ffmpeg-cvslog
mailing list