FFmpeg  4.4
Data Structures | Macros | Enumerations | Functions | Variables
vf_hue.c File Reference

Apply a hue/saturation filter to the input video Ported from MPlayer libmpcodecs/vf_hue.c. More...

#include <float.h>
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  HueContext
 

Macros

#define SAT_MIN_VAL   -10
 
#define SAT_MAX_VAL   10
 
#define OFFSET(x)   offsetof(HueContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define SET_EXPR(expr, option)
 
#define SET_EXPR(expr, option)
 

Enumerations

enum  var_name {
  VAR_N , VAR_TS , VAR_POS , VAR_PREV_INPTS ,
  VAR_PREV_INDTS , VAR_PREV_OUTPTS , VAR_PREV_OUTDTS , VAR_PTS ,
  VAR_DTS , VAR_STARTPTS , VAR_STARTDTS , VAR_TB ,
  VAR_SR , VAR_VARS_NB , VAR_CH , VAR_N ,
  VAR_NB_IN_CHANNELS , VAR_NB_OUT_CHANNELS , VAR_T , VAR_S ,
  VAR_VARS_NB , VAR_W , VAR_H , VAR_CW ,
  VAR_CH , VAR_HSUB , VAR_VSUB , VARS_NB ,
  VAR_VALUE1 , VAR_VALUE2 , VAR_VARS_NB , VAR_TB ,
  VAR_PTS , VAR_START_PTS , VAR_PREV_PTS , VAR_PREV_SELECTED_PTS ,
  VAR_T , VAR_START_T , VAR_PREV_T , VAR_PREV_SELECTED_T ,
  VAR_PICT_TYPE , VAR_I , VAR_P , VAR_B ,
  VAR_S , VAR_SI , VAR_SP , VAR_BI ,
  VAR_PICT_TYPE_I , VAR_PICT_TYPE_P , VAR_PICT_TYPE_B , VAR_PICT_TYPE_S ,
  VAR_PICT_TYPE_SI , VAR_PICT_TYPE_SP , VAR_PICT_TYPE_BI , VAR_INTERLACE_TYPE ,
  VAR_INTERLACE_TYPE_P , VAR_INTERLACE_TYPE_T , VAR_INTERLACE_TYPE_B , VAR_CONSUMED_SAMPLES_N ,
  VAR_SAMPLES_N , VAR_SAMPLE_RATE , VAR_N , VAR_SELECTED_N ,
  VAR_PREV_SELECTED_N , VAR_KEY , VAR_POS , VAR_SCENE ,
  VAR_CONCATDEC_SELECT , VAR_VARS_NB , VAR_N , VAR_T ,
  VAR_POS , VAR_PTS , VAR_TS , VAR_TE ,
  VAR_TI , VAR_VARS_NB , VAR_IN_W , VAR_IW ,
  VAR_IN_H , VAR_IH , VAR_OUT_W , VAR_OW ,
  VAR_OUT_H , VAR_OH , VAR_A , VAR_SAR ,
  VAR_DAR , VAR_HSUB , VAR_VSUB , VAR_OHSUB ,
  VAR_OVSUB , VARS_NB , VAR_FRAME_RATE , VAR_INTERLACED ,
  VAR_N , VAR_NB_CONSUMED_SAMPLES , VAR_NB_SAMPLES , VAR_POS ,
  VAR_PREV_INPTS , VAR_PREV_INT , VAR_PREV_OUTPTS , VAR_PREV_OUTT ,
  VAR_PTS , VAR_SAMPLE_RATE , VAR_STARTPTS , VAR_STARTT ,
  VAR_T , VAR_TB , VAR_RTCTIME , VAR_RTCSTART ,
  VAR_S , VAR_SR , VAR_FR , VAR_VARS_NB ,
  VAR_AVTB , VAR_INTB , VAR_SR , VAR_VARS_NB ,
  VAR_W , VAR_H , VAR_A , VAR_DAR ,
  VAR_SAR , VAR_HSUB , VAR_VSUB , VARS_NB ,
  VAR_IN_W , VAR_IW , VAR_IN_H , VAR_IH ,
  VAR_OUT_W , VAR_OW , VAR_OUT_H , VAR_OH ,
  VAR_A , VAR_SAR , VAR_DAR , VAR_HSUB ,
  VAR_VSUB , VAR_X , VAR_Y , VAR_N ,
  VAR_POS , VAR_T , VAR_VARS_NB , VAR_X ,
  VAR_Y , VAR_W , VAR_H , VAR_N ,
  VAR_T , VAR_VARS_NB , VAR_DAR , VAR_HSUB ,
  VAR_VSUB , VAR_IN_H , VAR_IH , VAR_IN_W ,
  VAR_IW , VAR_SAR , VAR_X , VAR_Y ,
  VAR_H , VAR_W , VAR_T , VAR_MAX ,
  VARS_NB , VAR_DAR , VAR_HSUB , VAR_VSUB ,
  VAR_LINE_H , VAR_LH , VAR_MAIN_H , VAR_h ,
  VAR_H , VAR_MAIN_W , VAR_w , VAR_W ,
  VAR_MAX_GLYPH_A , VAR_ASCENT , VAR_MAX_GLYPH_D , VAR_DESCENT ,
  VAR_MAX_GLYPH_H , VAR_MAX_GLYPH_W , VAR_N , VAR_SAR ,
  VAR_T , VAR_TEXT_H , VAR_TH , VAR_TEXT_W ,
  VAR_TW , VAR_X , VAR_Y , VAR_PICT_TYPE ,
  VAR_PKT_POS , VAR_PKT_DURATION , VAR_PKT_SIZE , VAR_VARS_NB ,
  VAR_N , VAR_POS , VAR_R , VAR_T ,
  VAR_NB , VAR_N , VAR_PTS , VAR_R ,
  VAR_T , VAR_TB , VAR_NB , VAR_W ,
  VAR_H , VAR_VAL , VAR_MAXVAL , VAR_MINVAL ,
  VAR_NEGVAL , VAR_CLIPVAL , VAR_VARS_NB , VAR_W ,
  VAR_H , VAR_X , VAR_Y , VAR_BITDEPTHX ,
  VAR_BITDEPTHY , VAR_VARS_NB , VAR_MAIN_W , VAR_MW ,
  VAR_MAIN_H , VAR_MH , VAR_OVERLAY_W , VAR_OW ,
  VAR_OVERLAY_H , VAR_OH , VAR_HSUB , VAR_VSUB ,
  VAR_X , VAR_Y , VAR_N , VAR_POS ,
  VAR_T , VAR_VARS_NB , VAR_MAIN_iW , VAR_MW ,
  VAR_MAIN_iH , VAR_MH , VAR_OVERLAY_iW , VAR_OVERLAY_iH ,
  VAR_OVERLAY_X , VAR_OX , VAR_OVERLAY_Y , VAR_OY ,
  VAR_OVERLAY_W , VAR_OW , VAR_OVERLAY_H , VAR_OH ,
  VAR_VARS_NB , VAR_IN_W , VAR_IW , VAR_IN_H ,
  VAR_IH , VAR_OUT_W , VAR_OW , VAR_OUT_H ,
  VAR_OH , VAR_X , VAR_Y , VAR_A ,
  VAR_SAR , VAR_DAR , VAR_HSUB , VAR_VSUB ,
  VARS_NB , VAR_IN_W , VAR_IW , VAR_IN_H ,
  VAR_IH , VAR_OUT_W , VAR_OW , VAR_OUT_H ,
  VAR_OH , VAR_X , VAR_Y , VAR_A ,
  VAR_SAR , VAR_DAR , VARS_NB , VAR_W ,
  VAR_H , VAR_VAL , VAR_YMIN , VAR_UMIN ,
  VAR_VMIN , VAR_AMIN , VAR_YMAX , VAR_UMAX ,
  VAR_VMAX , VAR_AMAX , VAR_VARS_NB , VAR_IN_W ,
  VAR_IW , VAR_IN_H , VAR_IH , VAR_OUT_W ,
  VAR_OW , VAR_OUT_H , VAR_OH , VAR_HSUB ,
  VAR_VSUB , VAR_N , VAR_T , VAR_VARS_NB ,
  VAR_IN_W , VAR_IW , VAR_IN_H , VAR_IH ,
  VAR_OUT_W , VAR_OW , VAR_OUT_H , VAR_OH ,
  VAR_A , VAR_SAR , VAR_DAR , VAR_HSUB ,
  VAR_VSUB , VAR_OHSUB , VAR_OVSUB , VAR_N ,
  VAR_T , VAR_POS , VAR_S2R_MAIN_W , VAR_S2R_MAIN_H ,
  VAR_S2R_MAIN_A , VAR_S2R_MAIN_SAR , VAR_S2R_MAIN_DAR , VAR_S2R_MDAR ,
  VAR_S2R_MAIN_HSUB , VAR_S2R_MAIN_VSUB , VAR_S2R_MAIN_N , VAR_S2R_MAIN_T ,
  VAR_S2R_MAIN_POS , VARS_NB , VAR_PI , VAR_PHI ,
  VAR_E , VAR_IN_W , VAR_IW , VAR_IN_H ,
  VAR_IH , VAR_OUT_W , VAR_OW , VAR_OUT_H ,
  VAR_OH , VAR_A , VAR_DAR , VAR_SAR ,
  VARS_NB , VAR_W , VAR_H , VAR_N ,
  VAR_PTS , VAR_R , VAR_T , VAR_TB ,
  VAR_NB , VAR_iW , VAR_IN_W , VAR_iH ,
  VAR_IN_H , VAR_oW , VAR_OUT_W , VAR_W ,
  VAR_oH , VAR_OUT_H , VAR_H , CW ,
  CH , CX , CY , VAR_VARS_NB ,
  VAR_IN_W , VAR_IW , VAR_IN_H , VAR_IH ,
  VAR_OUT_W , VAR_OW , VAR_OUT_H , VAR_OH ,
  VAR_IN , VAR_ON , VAR_DURATION , VAR_PDURATION ,
  VAR_IN_TIME , VAR_IT , VAR_TIME , VAR_OUT_TIME ,
  VAR_OT , VAR_FRAME , VAR_ZOOM , VAR_PZOOM ,
  VAR_X , VAR_PX , VAR_Y , VAR_PY ,
  VAR_A , VAR_SAR , VAR_DAR , VAR_HSUB ,
  VAR_VSUB , VARS_NB , VAR_IN_W , VAR_IW ,
  VAR_IN_H , VAR_IH , VAR_OUT_W , VAR_OW ,
  VAR_OUT_H , VAR_OH , VAR_A , VAR_SAR ,
  VAR_DAR , VAR_HSUB , VAR_VSUB , VAR_OHSUB ,
  VAR_OVSUB , VARS_NB , VAR_X , VAR_Y ,
  VAR_W , VAR_H , VAR_TIME , VAR_SPEED ,
  VAR_TEMPO , VAR_ORDER , VAR_PATTERN , VAR_ROW ,
  VAR_VARS_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (hue)
 
static void compute_sin_and_cos (HueContext *hue)
 
static void create_luma_lut (HueContext *h)
 
static void create_chrominance_lut (HueContext *h, const int32_t c, const int32_t s)
 
static int set_expr (AVExpr **pexpr_ptr, char **expr_ptr, const char *expr, const char *option, void *log_ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_props (AVFilterLink *inlink)
 
static void apply_luma_lut (HueContext *s, uint8_t *ldst, const int dst_linesize, uint8_t *lsrc, const int src_linesize, int w, int h)
 
static void apply_luma_lut10 (HueContext *s, uint16_t *ldst, const int dst_linesize, uint16_t *lsrc, const int src_linesize, int w, int h)
 
static void apply_lut (HueContext *s, uint8_t *udst, uint8_t *vdst, const int dst_linesize, uint8_t *usrc, uint8_t *vsrc, const int src_linesize, int w, int h)
 
static void apply_lut10 (HueContext *s, uint16_t *udst, uint16_t *vdst, const int dst_linesize, uint16_t *usrc, uint16_t *vsrc, const int src_linesize, int w, int h)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *inpic)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 

Variables

static const char *const var_names []
 
static const AVOption hue_options []
 
static const AVFilterPad hue_inputs []
 
static const AVFilterPad hue_outputs []
 
AVFilter ff_vf_hue
 

Detailed Description

Apply a hue/saturation filter to the input video Ported from MPlayer libmpcodecs/vf_hue.c.

Definition in file vf_hue.c.

Macro Definition Documentation

◆ SAT_MIN_VAL

#define SAT_MIN_VAL   -10

Definition at line 39 of file vf_hue.c.

◆ SAT_MAX_VAL

#define SAT_MAX_VAL   10

Definition at line 40 of file vf_hue.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(HueContext, x)

Definition at line 88 of file vf_hue.c.

◆ FLAGS

Definition at line 89 of file vf_hue.c.

◆ SET_EXPR [1/2]

#define SET_EXPR (   expr,
  option 
)
Value:
if (hue->expr##_expr) do { \
ret = set_expr(&hue->expr##_pexpr, &hue->expr##_expr, \
hue->expr##_expr, option, ctx); \
if (ret < 0) \
return ret; \
} while (0)
option
Definition: libkvazaar.c:319
AVFormatContext * ctx
Definition: movenc.c:48
static int set_expr(AVExpr **pexpr_ptr, char **expr_ptr, const char *expr, const char *option, void *log_ctx)
Definition: vf_hue.c:178

◆ SET_EXPR [2/2]

#define SET_EXPR (   expr,
  option 
)
Value:
do { \
ret = set_expr(&hue->expr##_pexpr, &hue->expr##_expr, \
args, option, ctx); \
if (ret < 0) \
return ret; \
} while (0)

Enumeration Type Documentation

◆ var_name

enum var_name
Enumerator
VAR_N 
VAR_TS 
VAR_POS 
VAR_PREV_INPTS 
VAR_PREV_INDTS 
VAR_PREV_OUTPTS 
VAR_PREV_OUTDTS 
VAR_PTS 
VAR_DTS 
VAR_STARTPTS 
VAR_STARTDTS 
VAR_TB 
VAR_SR 
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VAR_X 
VAR_Y 
VAR_W 
VAR_H 
VAR_TIME 
VAR_SPEED 
VAR_TEMPO 
VAR_ORDER 
VAR_PATTERN 
VAR_ROW 
VAR_VARS_NB 

Definition at line 51 of file vf_hue.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( hue  )

◆ compute_sin_and_cos()

static void compute_sin_and_cos ( HueContext hue)
inlinestatic

Definition at line 104 of file vf_hue.c.

Referenced by filter_frame(), and init().

◆ create_luma_lut()

static void create_luma_lut ( HueContext h)
inlinestatic

Definition at line 115 of file vf_hue.c.

Referenced by filter_frame().

◆ create_chrominance_lut()

static void create_chrominance_lut ( HueContext h,
const int32_t  c,
const int32_t  s 
)
inlinestatic

Definition at line 128 of file vf_hue.c.

Referenced by filter_frame().

◆ set_expr()

static int set_expr ( AVExpr **  pexpr_ptr,
char **  expr_ptr,
const char *  expr,
const char *  option,
void log_ctx 
)
static

Definition at line 178 of file vf_hue.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 207 of file vf_hue.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 241 of file vf_hue.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 251 of file vf_hue.c.

◆ config_props()

static int config_props ( AVFilterLink inlink)
static

Definition at line 272 of file vf_hue.c.

◆ apply_luma_lut()

static void apply_luma_lut ( HueContext s,
uint8_t ldst,
const int  dst_linesize,
uint8_t lsrc,
const int  src_linesize,
int  w,
int  h 
)
static

Definition at line 288 of file vf_hue.c.

Referenced by filter_frame().

◆ apply_luma_lut10()

static void apply_luma_lut10 ( HueContext s,
uint16_t *  ldst,
const int  dst_linesize,
uint16_t *  lsrc,
const int  src_linesize,
int  w,
int  h 
)
static

Definition at line 304 of file vf_hue.c.

Referenced by filter_frame().

◆ apply_lut()

static void apply_lut ( HueContext s,
uint8_t udst,
uint8_t vdst,
const int  dst_linesize,
uint8_t usrc,
uint8_t vsrc,
const int  src_linesize,
int  w,
int  h 
)
static

Definition at line 320 of file vf_hue.c.

Referenced by filter_frame().

◆ apply_lut10()

static void apply_lut10 ( HueContext s,
uint16_t *  udst,
uint16_t *  vdst,
const int  dst_linesize,
uint16_t *  usrc,
uint16_t *  vsrc,
const int  src_linesize,
int  w,
int  h 
)
static

Definition at line 343 of file vf_hue.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame inpic 
)
static

Definition at line 366 of file vf_hue.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 471 of file vf_hue.c.

Variable Documentation

◆ var_names

const char* const var_names[]
static
Initial value:
= {
"n",
"pts",
"r",
"t",
"tb",
}
#define NULL
Definition: coverity.c:32

Definition at line 42 of file vf_hue.c.

Referenced by set_expr().

◆ hue_options

const AVOption hue_options[]
static
Initial value:
= {
{ "h", "set the hue angle degrees expression", OFFSET(hue_deg_expr), AV_OPT_TYPE_STRING,
{ .str = NULL }, .flags = FLAGS },
{ "s", "set the saturation expression", OFFSET(saturation_expr), AV_OPT_TYPE_STRING,
{ .str = "1" }, .flags = FLAGS },
{ "H", "set the hue angle radians expression", OFFSET(hue_expr), AV_OPT_TYPE_STRING,
{ .str = NULL }, .flags = FLAGS },
{ "b", "set the brightness expression", OFFSET(brightness_expr), AV_OPT_TYPE_STRING,
{ .str = "0" }, .flags = FLAGS },
{ NULL }
}
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
#define FLAGS
Definition: vf_hue.c:89
#define OFFSET(x)
Definition: vf_hue.c:88

Definition at line 90 of file vf_hue.c.

◆ hue_inputs

const AVFilterPad hue_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_props,
},
{ NULL }
}
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
Definition: vf_hue.c:366
static int config_props(AVFilterLink *inlink)
Definition: vf_hue.c:272

Definition at line 501 of file vf_hue.c.

◆ hue_outputs

const AVFilterPad hue_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 511 of file vf_hue.c.

◆ ff_vf_hue

AVFilter ff_vf_hue
Initial value:
= {
.name = "hue",
.description = NULL_IF_CONFIG_SMALL("Adjust the hue and saturation of the input video."),
.priv_size = sizeof(HueContext),
.init = init,
.priv_class = &hue_class,
}
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
#define flags(name, subs,...)
Definition: cbs_av1.c:561
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:126
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
static const AVFilterPad hue_outputs[]
Definition: vf_hue.c:511
static int query_formats(AVFilterContext *ctx)
Definition: vf_hue.c:251
static const AVFilterPad hue_inputs[]
Definition: vf_hue.c:501
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: vf_hue.c:471
static av_cold int init(AVFilterContext *ctx)
Definition: vf_hue.c:207
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_hue.c:241

Definition at line 519 of file vf_hue.c.