FFmpeg
|
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"
Include dependency graph for vf_hue.c:
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 |
#define | SET_EXPR(expr, option) |
#define | TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) |
#define | TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) |
#define | SET_CMD(expr, option) |
Functions | |
AVFILTER_DEFINE_CLASS (hue) | |
static void | compute_sin_and_cos (HueContext *hue) |
static int | set_expr (AVExpr **pexpr, 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 | process_chrominance (uint8_t *udst, uint8_t *vdst, const int dst_linesize, uint8_t *usrc, uint8_t *vsrc, const int src_linesize, int w, int h, const int32_t c, const int32_t s) |
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 | avfilter_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
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
#define OFFSET | ( | x | ) | offsetof(HueContext, x) |
#define SAT_MAX_VAL 10 |
Definition at line 40 of file vf_hue.c.
Referenced by filter_frame().
#define SAT_MIN_VAL -10 |
Definition at line 39 of file vf_hue.c.
Referenced by filter_frame().
#define SET_CMD | ( | expr, | |
option | |||
) |
Value:
do { \
} while (0)
Definition: avisynth_c.h:503
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void *log_ctx)
Definition: vf_hue.c:103
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return
Definition: filter_design.txt:216
Referenced by process_command().
#define SET_EXPR | ( | expr, | |
option | |||
) |
Value:
} while (0)
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void *log_ctx)
Definition: vf_hue.c:103
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return
Definition: filter_design.txt:216
Referenced by init().
#define TS2D | ( | ts | ) | ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) |
Definition at line 233 of file vf_hue.c.
Referenced by filter_frame().
#define TS2T | ( | ts, | |
tb | |||
) | ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) |
Definition at line 234 of file vf_hue.c.
Referenced by filter_frame().
Enumeration Type Documentation
enum var_name |
Function Documentation
AVFILTER_DEFINE_CLASS | ( | hue | ) |
|
inlinestatic |
Definition at line 92 of file vf_hue.c.
Referenced by filter_frame(), and init().
|
static |
|
static |
|
static |
|
static |
Definition at line 194 of file vf_hue.c.
Referenced by filter_frame().
|
static |
|
static |
|
static |
Variable Documentation
AVFilter avfilter_vf_hue |
Initial value:
= {
.name = "hue",
.description = NULL_IF_CONFIG_SMALL("Adjust the hue and saturation of the input video."),
.priv_size = sizeof(HueContext),
.inputs = hue_inputs,
.outputs = hue_outputs,
.priv_class = &hue_class,
}
Definition: vf_hue.c:60
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: vf_hue.c:306
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:216
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.filter_frame = filter_frame,
.config_props = config_props,
},
{ NULL }
}
Definition: avutil.h:143
|
static |
|
static |
Initial value:
Generated on Mon Nov 18 2024 06:52:10 for FFmpeg by 1.8.11