FFmpeg
Loading...
Searching...
No Matches
vf_showpalette.c File Reference

Display frame palette (AV_PIX_FMT_PAL8) More...

#include "libavutil/opt.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  ShowPaletteContext
 

Macros

#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (showpalette)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_output (AVFilterLink *outlink)
 
static void disp_palette (AVFrame *out, const AVFrame *in, int size)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption showpalette_options []
 
static const AVFilterPad showpalette_inputs []
 
static const AVFilterPad showpalette_outputs []
 
const FFFilter ff_vf_showpalette
 

Detailed Description

Display frame palette (AV_PIX_FMT_PAL8)

Definition in file vf_showpalette.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 35 of file vf_showpalette.c.

◆ FLAGS

Definition at line 36 of file vf_showpalette.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( showpalette )

◆ query_formats()

static int query_formats ( const AVFilterContext * ctx,
AVFilterFormatsConfig ** cfg_in,
AVFilterFormatsConfig ** cfg_out )
static

Definition at line 44 of file vf_showpalette.c.

◆ config_output()

static int config_output ( AVFilterLink * outlink)
static

Definition at line 59 of file vf_showpalette.c.

◆ disp_palette()

static void disp_palette ( AVFrame * out,
const AVFrame * in,
int size )
static

Definition at line 67 of file vf_showpalette.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink * inlink,
AVFrame * in )
static

Definition at line 81 of file vf_showpalette.c.

Variable Documentation

◆ showpalette_options

const AVOption showpalette_options[]
static
Initial value:
= {
{ "s", "set pixel box size", OFFSET(size), AV_OPT_TYPE_INT, {.i64=30}, 1, 100, FLAGS },
{ NULL }
}
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
int size

Definition at line 37 of file vf_showpalette.c.

◆ showpalette_inputs

const AVFilterPad showpalette_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
}
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200

Definition at line 99 of file vf_showpalette.c.

◆ showpalette_outputs

const AVFilterPad showpalette_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}
static int config_output(AVBitStreamFilterLink *outlink)

Definition at line 107 of file vf_showpalette.c.

◆ ff_vf_showpalette

const FFFilter ff_vf_showpalette
Initial value:
= {
.p.name = "showpalette",
.p.description = NULL_IF_CONFIG_SMALL("Display frame palette."),
.p.priv_class = &showpalette_class,
.priv_size = sizeof(ShowPaletteContext),
}
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition aeval.c:246
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_QUERY_FUNC2(func)
Definition filters.h:241
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static const AVFilterPad showpalette_inputs[]
static const AVFilterPad showpalette_outputs[]

Definition at line 115 of file vf_showpalette.c.