[FFmpeg-cvslog] avcodec/vp8: Move VPx specific functions inside #if CONFIG_VPx block
Andreas Rheinhardt
git at videolan.org
Mon Mar 10 02:59:16 EET 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Mar 6 18:16:50 2025 +0100| [a41baa743d1c79bc0b76dc7312e4a155f4537f40] | committer: Andreas Rheinhardt
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 at xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a41baa743d1c79bc0b76dc7312e4a155f4537f40
---
libavcodec/vp8.c | 74 +++++++++++++++++++++++++++-----------------------------
1 file 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;
More information about the ffmpeg-cvslog
mailing list