diff mbox series

[FFmpeg-devel,15/24] avfilter/vsrc_testsrc: Fix compilation of colorchart filter

Message ID AS8P250MB07443D0C3504108AB33C7E9A8F1D2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 7e582d8b3e687810343b31adbf05d102ed448d12
Headers show
Series [FFmpeg-devel,1/9] configure: Add missing dirac_decoder->qpeldsp dependency | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt May 5, 2024, 1:40 p.m. UTC
Move set_color() out of the CONFIG_TESTSRC2_FILTER block.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vsrc_testsrc.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 273a852f82..41c2e70068 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -697,6 +697,15 @@  const AVFilter ff_vsrc_testsrc = {
 
 #endif /* CONFIG_TESTSRC_FILTER */
 
+static void av_unused set_color(TestSourceContext *s, FFDrawColor *color, uint32_t argb)
+{
+    uint8_t rgba[4] = { (argb >> 16) & 0xFF,
+                        (argb >>  8) & 0xFF,
+                        (argb >>  0) & 0xFF,
+                        (argb >> 24) & 0xFF, };
+    ff_draw_color(&s->draw, color, rgba);
+}
+
 #if CONFIG_TESTSRC2_FILTER
 
 static const AVOption testsrc2_options[] = {
@@ -707,15 +716,6 @@  static const AVOption testsrc2_options[] = {
 
 AVFILTER_DEFINE_CLASS(testsrc2);
 
-static void set_color(TestSourceContext *s, FFDrawColor *color, uint32_t argb)
-{
-    uint8_t rgba[4] = { (argb >> 16) & 0xFF,
-                        (argb >>  8) & 0xFF,
-                        (argb >>  0) & 0xFF,
-                        (argb >> 24) & 0xFF, };
-    ff_draw_color(&s->draw, color, rgba);
-}
-
 static uint32_t color_gradient(unsigned index)
 {
     unsigned si = index & 0xFF, sd = 0xFF - si;