diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-06 18:16:50 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-10 00:50:57 +0100 |
commit | a41baa743d1c79bc0b76dc7312e4a155f4537f40 (patch) | |
tree | ccb8eb491bc25e3c4d111c971697bb81c7332747 | |
parent | 4040dc0782f2bc9307a3a93d93c4af37db512b19 (diff) | |
download | ffmpeg-a41baa743d1c79bc0b76dc7312e4a155f4537f40.tar.gz |
avcodec/vp8: Move VPx specific functions inside #if CONFIG_VPx block
where appropriate. Avoids including ff_vp8_decode_frame()
when the VP8 decoder is disabled.
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavcodec/vp8.c | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index be8dbde91e..77f7b4d4df 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2512,18 +2512,6 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void return 0; } -static int vp7_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) -{ - return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 1); -} - -static int vp8_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) -{ - return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 0); -} - static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int is_vp7) { @@ -2583,18 +2571,6 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, } } -static void vp7_filter_mb_row(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) -{ - filter_mb_row(avctx, tdata, jobnr, threadnr, 1); -} - -static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) -{ - filter_mb_row(avctx, tdata, jobnr, threadnr, 0); -} - static av_always_inline int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int is_vp7) @@ -2837,20 +2813,6 @@ err: return ret; } -int ff_vp8_decode_frame(AVCodecContext *avctx, AVFrame *frame, - int *got_frame, AVPacket *avpkt) -{ - return vp78_decode_frame(avctx, frame, got_frame, avpkt, IS_VP8); -} - -#if CONFIG_VP7_DECODER -static int vp7_decode_frame(AVCodecContext *avctx, AVFrame *frame, - int *got_frame, AVPacket *avpkt) -{ - return vp78_decode_frame(avctx, frame, got_frame, avpkt, IS_VP7); -} -#endif /* CONFIG_VP7_DECODER */ - av_cold int ff_vp8_decode_free(AVCodecContext *avctx) { vp8_decode_flush_impl(avctx, 1); @@ -2875,6 +2837,24 @@ static av_cold void vp78_decode_init(AVCodecContext *avctx) } #if CONFIG_VP8_DECODER +static int vp8_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, + int jobnr, int threadnr) +{ + return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 0); +} + +static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata, + int jobnr, int threadnr) +{ + filter_mb_row(avctx, tdata, jobnr, threadnr, 0); +} + +int ff_vp8_decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) +{ + return vp78_decode_frame(avctx, frame, got_frame, avpkt, IS_VP8); +} + av_cold int ff_vp8_decode_init(AVCodecContext *avctx) { VP8Context *s = avctx->priv_data; @@ -2931,6 +2911,24 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, #endif /* CONFIG_VP8_DECODER */ #if CONFIG_VP7_DECODER +static int vp7_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, + int jobnr, int threadnr) +{ + return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 1); +} + +static void vp7_filter_mb_row(AVCodecContext *avctx, void *tdata, + int jobnr, int threadnr) +{ + filter_mb_row(avctx, tdata, jobnr, threadnr, 1); +} + +static int vp7_decode_frame(AVCodecContext *avctx, AVFrame *frame, + int *got_frame, AVPacket *avpkt) +{ + return vp78_decode_frame(avctx, frame, got_frame, avpkt, IS_VP7); +} + av_cold static int vp7_decode_init(AVCodecContext *avctx) { VP8Context *s = avctx->priv_data; |