Skip to content

Commit

Permalink
avfilter/vsrc_testsrc: Fix compilation of colorchart filter
Browse files Browse the repository at this point in the history
Move set_color() out of the CONFIG_TESTSRC2_FILTER block.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
  • Loading branch information
mkver committed May 7, 2024
1 parent 03618ee commit 7e582d8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libavfilter/vsrc_testsrc.c
Expand Up @@ -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[] = {
Expand All @@ -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;
Expand Down

0 comments on commit 7e582d8

Please sign in to comment.