FFmpeg
Classes | Macros | Typedefs | Enumerations | Functions | Variables
vf_palettegen.c File Reference

Generate one palette for a whole video stream. More...

#include "libavutil/avassert.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/qsort.h"
#include "libavutil/intreadwrite.h"
#include "avfilter.h"
#include "internal.h"

Classes

struct  color_ref
 
struct  range_box
 
struct  hist_node
 
struct  PaletteGenContext
 

Macros

#define NBITS   5
 
#define HIST_SIZE   (1<<(3*NBITS))
 
#define OFFSET(x)   offsetof(PaletteGenContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define DECLARE_CMP_FUNC(name, pos)
 

Typedefs

typedef struct PaletteGenContext PaletteGenContext
 
typedef int(* cmp_func) (const void *, const void *)
 

Enumerations

enum  { STATS_MODE_ALL_FRAMES, STATS_MODE_DIFF_FRAMES, STATS_MODE_SINGLE_FRAMES, NB_STATS_MODE }
 

Functions

 AVFILTER_DEFINE_CLASS (palettegen)
 

Variables

AVFilter ff_vf_palettegen
 

Detailed Description

Generate one palette for a whole video stream.

Macro Definition Documentation

§ DECLARE_CMP_FUNC

#define DECLARE_CMP_FUNC (   name,
  pos 
)
Value:
static int cmp_##name(const void *pa, const void *pb) \
{ \
const struct color_ref * const *a = pa; \
const struct color_ref * const *b = pb; \
return ((*a)->color >> (8 * (2 - (pos))) & 0xff) \
- ((*b)->color >> (8 * (2 - (pos))) & 0xff); \
}
Definition: vf_palettegen.c:35

Variable Documentation

§ ff_vf_palettegen

AVFilter ff_vf_palettegen
Initial value:
= {
.name = "palettegen",
.description = NULL_IF_CONFIG_SMALL("Find the optimal palette for a given stream."),
.priv_size = sizeof(PaletteGenContext),
.uninit = uninit,
.query_formats = query_formats,
.inputs = palettegen_inputs,
.outputs = palettegen_outputs,
.priv_class = &palettegen_class,
}
Definition: vf_palettegen.c:64
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186