FFmpeg
Data Structures | Macros | Functions | Variables
vf_procamp_vaapi.c File Reference
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "vaapi_vpp.h"

Go to the source code of this file.

Data Structures

struct  ProcampVAAPIContext
 

Macros

#define BRIGHTNESS_MIN   -100.0F
 
#define BRIGHTNESS_MAX   100.0F
 
#define BRIGHTNESS_DEFAULT   0.0F
 
#define CONTRAST_MIN   0.0F
 
#define CONTRAST_MAX   10.0F
 
#define CONTRAST_DEFAULT   1.0F
 
#define HUE_MIN   -180.0F
 
#define HUE_MAX   180.0F
 
#define HUE_DEFAULT   0.0F
 
#define SATURATION_MIN   0.0F
 
#define SATURATION_MAX   10.0F
 
#define SATURATION_DEFAULT   1.0F
 
#define OFFSET(x)   offsetof(ProcampVAAPIContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
 

Functions

static float map (float x, float in_min, float in_max, float out_min, float out_max)
 
static int procamp_vaapi_build_filter_params (AVFilterContext *avctx)
 
static int procamp_vaapi_filter_frame (AVFilterLink *inlink, AVFrame *input_frame)
 
static av_cold int procamp_vaapi_init (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (procamp_vaapi)
 

Variables

static const AVOption procamp_vaapi_options []
 
static const AVFilterPad procamp_vaapi_inputs []
 
static const AVFilterPad procamp_vaapi_outputs []
 
AVFilter ff_vf_procamp_vaapi
 

Macro Definition Documentation

#define BRIGHTNESS_MIN   -100.0F

Definition at line 31 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define BRIGHTNESS_MAX   100.0F

Definition at line 32 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define BRIGHTNESS_DEFAULT   0.0F

Definition at line 33 of file vf_procamp_vaapi.c.

#define CONTRAST_MIN   0.0F

Definition at line 35 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define CONTRAST_MAX   10.0F

Definition at line 36 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define CONTRAST_DEFAULT   1.0F

Definition at line 37 of file vf_procamp_vaapi.c.

#define HUE_MIN   -180.0F

Definition at line 39 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define HUE_MAX   180.0F

Definition at line 40 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define HUE_DEFAULT   0.0F

Definition at line 41 of file vf_procamp_vaapi.c.

#define SATURATION_MIN   0.0F

Definition at line 43 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define SATURATION_MAX   10.0F

Definition at line 44 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

#define SATURATION_DEFAULT   1.0F

Definition at line 45 of file vf_procamp_vaapi.c.

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

Definition at line 193 of file vf_procamp_vaapi.c.

Definition at line 194 of file vf_procamp_vaapi.c.

Function Documentation

static float map ( float  x,
float  in_min,
float  in_max,
float  out_min,
float  out_max 
)
static

Definition at line 56 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_build_filter_params().

static int procamp_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 66 of file vf_procamp_vaapi.c.

Referenced by procamp_vaapi_init().

static int procamp_vaapi_filter_frame ( AVFilterLink inlink,
AVFrame input_frame 
)
static

Definition at line 128 of file vf_procamp_vaapi.c.

static av_cold int procamp_vaapi_init ( AVFilterContext avctx)
static

Definition at line 181 of file vf_procamp_vaapi.c.

AVFILTER_DEFINE_CLASS ( procamp_vaapi  )

Variable Documentation

const AVOption procamp_vaapi_options[]
static
Initial value:
= {
{ "b", "Output video brightness",
{ "brightness", "Output video brightness",
{ "s", "Output video saturation",
{ "saturatio", "Output video saturation",
{ "c", "Output video contrast",
{ "contrast", "Output video contrast",
{ "h", "Output video hue",
OFFSET(hue), AV_OPT_TYPE_FLOAT, { .dbl = HUE_DEFAULT }, HUE_MIN, HUE_MAX, .flags = FLAGS },
{ "hue", "Output video hue",
OFFSET(hue), AV_OPT_TYPE_FLOAT, { .dbl = HUE_DEFAULT }, HUE_MIN, HUE_MAX, .flags = FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define CONTRAST_DEFAULT
#define HUE_MIN
#define HUE_DEFAULT
#define OFFSET(x)
#define HUE_MAX
#define CONTRAST_MIN
#define BRIGHTNESS_MAX
#define SATURATION_MIN
#define SATURATION_MAX
#define BRIGHTNESS_DEFAULT
#define CONTRAST_MAX
#define FLAGS
#define SATURATION_DEFAULT
#define BRIGHTNESS_MIN

Definition at line 195 of file vf_procamp_vaapi.c.

const AVFilterPad procamp_vaapi_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &procamp_vaapi_filter_frame,
.config_props = &ff_vaapi_vpp_config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
Definition: vaapi_vpp.c:70
static int procamp_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)

Definition at line 217 of file vf_procamp_vaapi.c.

const AVFilterPad procamp_vaapi_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = &ff_vaapi_vpp_config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
Definition: vaapi_vpp.c:95

Definition at line 227 of file vf_procamp_vaapi.c.

AVFilter ff_vf_procamp_vaapi
Initial value:
= {
.name = "procamp_vaapi",
.description = NULL_IF_CONFIG_SMALL("ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast"),
.priv_size = sizeof(ProcampVAAPIContext),
.priv_class = &procamp_vaapi_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:385
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int procamp_vaapi_init(AVFilterContext *avctx)
static const AVFilterPad procamp_vaapi_outputs[]
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
static const AVFilterPad procamp_vaapi_inputs[]
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:680

Definition at line 236 of file vf_procamp_vaapi.c.