[FFmpeg-cvslog] avcodec/mpeg4video: Nuke ff_mpeg4_init_rl_intra()

Andreas Rheinhardt git at videolan.org
Mon May 26 06:24:59 EEST 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun May 18 08:59:27 2025 +0200| [2a59cb0c8248220eda8fc4e902d52ae18f2527e9] | committer: Andreas Rheinhardt

avcodec/mpeg4video: Nuke ff_mpeg4_init_rl_intra()

The MPEG-4 decoder can now initialize ff_mpeg4_rl_intra
directly given that the MPEG-4 encoder no longer wants
it performed, too.

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

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

 libavcodec/mpeg4video.c     | 14 --------------
 libavcodec/mpeg4videodata.h |  1 -
 libavcodec/mpeg4videodec.c  |  4 +++-
 3 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/libavcodec/mpeg4video.c b/libavcodec/mpeg4video.c
index 2c0c1044f2..3980a39305 100644
--- a/libavcodec/mpeg4video.c
+++ b/libavcodec/mpeg4video.c
@@ -20,25 +20,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "libavutil/thread.h"
-
 #include "mpegutils.h"
 #include "mpegvideo.h"
 #include "mpeg4video.h"
 #include "mpeg4data.h"
 
-static av_cold void mpeg4_init_rl_intra(void)
-{
-    static uint8_t mpeg4_rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
-    ff_rl_init(&ff_mpeg4_rl_intra, mpeg4_rl_intra_table);
-}
-
-av_cold void ff_mpeg4_init_rl_intra(void)
-{
-    static AVOnce init_static_once = AV_ONCE_INIT;
-    ff_thread_once(&init_static_once, mpeg4_init_rl_intra);
-}
-
 int ff_mpeg4_get_video_packet_prefix_length(enum AVPictureType pict_type,
                                             int f_code, int b_code)
 {
diff --git a/libavcodec/mpeg4videodata.h b/libavcodec/mpeg4videodata.h
index 8aac8a2255..baca8a0b9a 100644
--- a/libavcodec/mpeg4videodata.h
+++ b/libavcodec/mpeg4videodata.h
@@ -35,7 +35,6 @@ extern const int8_t ff_mpeg4_intra_level[102];
 extern const int8_t ff_mpeg4_intra_run[102];
 
 extern RLTable ff_mpeg4_rl_intra;
-void ff_mpeg4_init_rl_intra(void);
 
 /* Note this is identical to the intra rvlc except that it is reordered. */
 extern RLTable ff_rvlc_rl_inter;
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 4d09a58ffb..82b552356a 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -3922,7 +3922,9 @@ static av_cold void mpeg4_init_static(void)
                                             0, 0);
     }
 
-    ff_mpeg4_init_rl_intra();
+    static uint8_t mpeg4_rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
+    ff_rl_init(&ff_mpeg4_rl_intra, mpeg4_rl_intra_table);
+
     INIT_FIRST_VLC_RL(ff_mpeg4_rl_intra, 554);
     VLC_INIT_RL(ff_rvlc_rl_inter, 1072);
     INIT_FIRST_VLC_RL(ff_rvlc_rl_intra, 1072);



More information about the ffmpeg-cvslog mailing list