diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-07 17:52:23 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-07 21:33:35 +0200 |
commit | e2301feabc2be18e1ee878dcdf643fd78b90c735 (patch) | |
tree | 0373c0ddebc91684f29856dafd3a51c9a9cb9924 /libavcodec/h263.c | |
parent | 8f588eea8e813304f14e1889cfdc79ab89a88deb (diff) | |
download | ffmpeg-e2301feabc2be18e1ee878dcdf643fd78b90c735.tar.gz |
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@outlook.com>
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 12 |
1 files changed, 12 insertions, 0 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; |