[FFmpeg-cvslog] avcodec/h263, h263data: Move ff_h263_init_rl_inter to h263.c
Andreas Rheinhardt
git at videolan.org
Wed May 12 09:27:14 EEST 2021
ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri May 7 17:52:23 2021 +0200| [74bcfe5f858a720695736268c861fb34160941e9] | committer: Andreas Rheinhardt
avcodec/h263, h263data: Move ff_h263_init_rl_inter to h263.c
The SVQ1 decoder does not need mpegvideo or rl.c, but it uses stuff
from h263data.c. But since 61fe481586425a41d45e371de1e875b49882477d
h263data.c called ff_rl_init() and this of course led to build errors
when the SVQ1 decoder is enabled and mpegvideo disabled.
Fix this by moving ff_h263_init_rl_inter() to h263.c.
Fixes ticket #9224.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
(cherry picked from commit e2301feabc2be18e1ee878dcdf643fd78b90c735)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=74bcfe5f858a720695736268c861fb34160941e9
---
libavcodec/h263.c | 12 ++++++++++++
libavcodec/h263.h | 1 +
libavcodec/h263data.c | 14 --------------
libavcodec/h263data.h | 1 -
4 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index bc5c0d599f..4a03c710a6 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -29,6 +29,7 @@
#include <limits.h>
+#include "libavutil/thread.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "h263.h"
@@ -38,6 +39,17 @@
#include "flv.h"
#include "mpeg4video.h"
+static av_cold void h263_init_rl_inter(void)
+{
+ static uint8_t h263_rl_inter_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
+ ff_rl_init(&ff_h263_rl_inter, h263_rl_inter_table);
+}
+
+av_cold void ff_h263_init_rl_inter(void)
+{
+ static AVOnce init_static_once = AV_ONCE_INIT;
+ ff_thread_once(&init_static_once, h263_init_rl_inter);
+}
void ff_h263_update_motion_val(MpegEncContext * s){
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 998f7d0d59..491f2e0aac 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -66,6 +66,7 @@ int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir,
int *px, int *py);
void ff_h263_encode_init(MpegEncContext *s);
void ff_h263_decode_init_vlc(void);
+void ff_h263_init_rl_inter(void);
int ff_h263_decode_picture_header(MpegEncContext *s);
int ff_h263_decode_gob_header(MpegEncContext *s);
void ff_h263_update_motion_val(MpegEncContext * s);
diff --git a/libavcodec/h263data.c b/libavcodec/h263data.c
index 604a0425e1..20d0436fda 100644
--- a/libavcodec/h263data.c
+++ b/libavcodec/h263data.c
@@ -25,8 +25,6 @@
#include <stdint.h>
-#include "libavutil/thread.h"
-
#include "h263data.h"
#include "mpegvideo.h"
@@ -290,15 +288,3 @@ const AVRational ff_h263_pixel_aspect[16] = {
{ 0, 1 },
{ 0, 1 },
};
-
-static av_cold void h263_init_rl_inter(void)
-{
- static uint8_t h263_rl_inter_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
- ff_rl_init(&ff_h263_rl_inter, h263_rl_inter_table);
-}
-
-av_cold void ff_h263_init_rl_inter(void)
-{
- static AVOnce init_static_once = AV_ONCE_INIT;
- ff_thread_once(&init_static_once, h263_init_rl_inter);
-}
diff --git a/libavcodec/h263data.h b/libavcodec/h263data.h
index 144704d12b..06554bdf0d 100644
--- a/libavcodec/h263data.h
+++ b/libavcodec/h263data.h
@@ -61,7 +61,6 @@ extern const int8_t ff_inter_run[102];
extern RLTable ff_h263_rl_inter;
extern RLTable ff_rl_intra_aic;
-void ff_h263_init_rl_inter(void);
extern const uint16_t ff_h263_format[8][2];
More information about the ffmpeg-cvslog
mailing list