FFmpeg
Data Structures | Macros | Functions | Variables
vf_misc_vaapi.c File Reference
#include <string.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  DenoiseVAAPIContext
 
struct  SharpnessVAAPIContext
 

Macros

#define DENOISE_MIN   0
 
#define DENOISE_MAX   64
 
#define DENOISE_DEFAULT   0
 
#define SHARPNESS_MIN   0
 
#define SHARPNESS_MAX   64
 
#define SHARPNESS_DEFAULT   44
 
#define DOFFSET(x)   offsetof(DenoiseVAAPIContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
 
#define SOFFSET(x)   offsetof(SharpnessVAAPIContext, x)
 

Functions

static float map (int x, int in_min, int in_max, float out_min, float out_max)
 
static int denoise_vaapi_build_filter_params (AVFilterContext *avctx)
 
static int sharpness_vaapi_build_filter_params (AVFilterContext *avctx)
 
static int misc_vaapi_filter_frame (AVFilterLink *inlink, AVFrame *input_frame)
 
static av_cold int denoise_vaapi_init (AVFilterContext *avctx)
 
static av_cold int sharpness_vaapi_init (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (denoise_vaapi)
 
 AVFILTER_DEFINE_CLASS (sharpness_vaapi)
 

Variables

static const AVOption denoise_vaapi_options []
 
static const AVOption sharpness_vaapi_options []
 
static const AVFilterPad misc_vaapi_inputs []
 
static const AVFilterPad misc_vaapi_outputs []
 
const AVFilter ff_vf_denoise_vaapi
 
const AVFilter ff_vf_sharpness_vaapi
 

Macro Definition Documentation

◆ DENOISE_MIN

#define DENOISE_MIN   0

Definition at line 29 of file vf_misc_vaapi.c.

◆ DENOISE_MAX

#define DENOISE_MAX   64

Definition at line 30 of file vf_misc_vaapi.c.

◆ DENOISE_DEFAULT

#define DENOISE_DEFAULT   0

Definition at line 31 of file vf_misc_vaapi.c.

◆ SHARPNESS_MIN

#define SHARPNESS_MIN   0

Definition at line 34 of file vf_misc_vaapi.c.

◆ SHARPNESS_MAX

#define SHARPNESS_MAX   64

Definition at line 35 of file vf_misc_vaapi.c.

◆ SHARPNESS_DEFAULT

#define SHARPNESS_DEFAULT   44

Definition at line 36 of file vf_misc_vaapi.c.

◆ DOFFSET

#define DOFFSET (   x)    offsetof(DenoiseVAAPIContext, x)

Definition at line 200 of file vf_misc_vaapi.c.

◆ FLAGS

Definition at line 201 of file vf_misc_vaapi.c.

◆ SOFFSET

#define SOFFSET (   x)    offsetof(SharpnessVAAPIContext, x)

Definition at line 208 of file vf_misc_vaapi.c.

Function Documentation

◆ map()

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

◆ denoise_vaapi_build_filter_params()

static int denoise_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 60 of file vf_misc_vaapi.c.

Referenced by denoise_vaapi_init().

◆ sharpness_vaapi_build_filter_params()

static int sharpness_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 90 of file vf_misc_vaapi.c.

Referenced by sharpness_vaapi_init().

◆ misc_vaapi_filter_frame()

static int misc_vaapi_filter_frame ( AVFilterLink inlink,
AVFrame input_frame 
)
static

Definition at line 121 of file vf_misc_vaapi.c.

◆ denoise_vaapi_init()

static av_cold int denoise_vaapi_init ( AVFilterContext avctx)
static

Definition at line 176 of file vf_misc_vaapi.c.

◆ sharpness_vaapi_init()

static av_cold int sharpness_vaapi_init ( AVFilterContext avctx)
static

Definition at line 188 of file vf_misc_vaapi.c.

◆ AVFILTER_DEFINE_CLASS() [1/2]

AVFILTER_DEFINE_CLASS ( denoise_vaapi  )

◆ AVFILTER_DEFINE_CLASS() [2/2]

AVFILTER_DEFINE_CLASS ( sharpness_vaapi  )

Variable Documentation

◆ denoise_vaapi_options

const AVOption denoise_vaapi_options[]
static
Initial value:
= {
{ "denoise", "denoise level",
{ NULL },
}

Definition at line 202 of file vf_misc_vaapi.c.

◆ sharpness_vaapi_options

const AVOption sharpness_vaapi_options[]
static
Initial value:
= {
{ "sharpness", "sharpness level",
{ NULL },
}

Definition at line 209 of file vf_misc_vaapi.c.

◆ misc_vaapi_inputs

const AVFilterPad misc_vaapi_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &misc_vaapi_filter_frame,
.config_props = &ff_vaapi_vpp_config_input,
},
}

Definition at line 218 of file vf_misc_vaapi.c.

◆ misc_vaapi_outputs

const AVFilterPad misc_vaapi_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = &ff_vaapi_vpp_config_output,
},
}

Definition at line 227 of file vf_misc_vaapi.c.

◆ ff_vf_denoise_vaapi

const AVFilter ff_vf_denoise_vaapi
Initial value:
= {
.name = "denoise_vaapi",
.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for de-noise"),
.priv_size = sizeof(DenoiseVAAPIContext),
.priv_class = &denoise_vaapi_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 235 of file vf_misc_vaapi.c.

◆ ff_vf_sharpness_vaapi

const AVFilter ff_vf_sharpness_vaapi
Initial value:
= {
.name = "sharpness_vaapi",
.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for sharpness"),
.priv_size = sizeof(SharpnessVAAPIContext),
.priv_class = &sharpness_vaapi_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 248 of file vf_misc_vaapi.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
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:371
SOFFSET
#define SOFFSET(x)
Definition: vf_misc_vaapi.c:208
sharpness_vaapi_init
static av_cold int sharpness_vaapi_init(AVFilterContext *avctx)
Definition: vf_misc_vaapi.c:188
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:168
DenoiseVAAPIContext
Definition: vf_misc_vaapi.c:38
DENOISE_DEFAULT
#define DENOISE_DEFAULT
Definition: vf_misc_vaapi.c:31
SHARPNESS_DEFAULT
#define SHARPNESS_DEFAULT
Definition: vf_misc_vaapi.c:36
denoise_vaapi_init
static av_cold int denoise_vaapi_init(AVFilterContext *avctx)
Definition: vf_misc_vaapi.c:176
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
NULL
#define NULL
Definition: coverity.c:32
SHARPNESS_MIN
#define SHARPNESS_MIN
Definition: vf_misc_vaapi.c:34
ff_vaapi_vpp_config_input
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
Definition: vaapi_vpp.c:70
ff_vaapi_vpp_ctx_uninit
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:680
ff_vaapi_vpp_query_formats
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
misc_vaapi_filter_frame
static int misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
Definition: vf_misc_vaapi.c:121
misc_vaapi_outputs
static const AVFilterPad misc_vaapi_outputs[]
Definition: vf_misc_vaapi.c:227
DOFFSET
#define DOFFSET(x)
Definition: vf_misc_vaapi.c:200
denoise
#define denoise(...)
Definition: vf_hqdn3d.c:156
misc_vaapi_inputs
static const AVFilterPad misc_vaapi_inputs[]
Definition: vf_misc_vaapi.c:218
FLAGS
#define FLAGS
Definition: vf_misc_vaapi.c:201
DENOISE_MAX
#define DENOISE_MAX
Definition: vf_misc_vaapi.c:30
ff_vaapi_vpp_config_output
int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
Definition: vaapi_vpp.c:95
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
DENOISE_MIN
#define DENOISE_MIN
Definition: vf_misc_vaapi.c:29
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
SHARPNESS_MAX
#define SHARPNESS_MAX
Definition: vf_misc_vaapi.c:35
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:282
SharpnessVAAPIContext
Definition: vf_misc_vaapi.c:44