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 "internal.h"
#include "vaapi_vpp.h"
#include "video.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 209 of file vf_misc_vaapi.c.

◆ FLAGS

Definition at line 210 of file vf_misc_vaapi.c.

◆ SOFFSET

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

Definition at line 217 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 179 of file vf_misc_vaapi.c.

◆ sharpness_vaapi_init()

static av_cold int sharpness_vaapi_init ( AVFilterContext avctx)
static

Definition at line 194 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 211 of file vf_misc_vaapi.c.

◆ sharpness_vaapi_options

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

Definition at line 218 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 227 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 236 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 244 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 257 of file vf_misc_vaapi.c.

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:364
SOFFSET
#define SOFFSET(x)
Definition: vf_misc_vaapi.c:217
sharpness_vaapi_init
static av_cold int sharpness_vaapi_init(AVFilterContext *avctx)
Definition: vf_misc_vaapi.c:194
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:169
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
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
denoise_vaapi_init
static av_cold int denoise_vaapi_init(AVFilterContext *avctx)
Definition: vf_misc_vaapi.c:179
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
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:719
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:106
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:236
DOFFSET
#define DOFFSET(x)
Definition: vf_misc_vaapi.c:209
denoise
#define denoise(...)
Definition: vf_hqdn3d.c:156
misc_vaapi_inputs
static const AVFilterPad misc_vaapi_inputs[]
Definition: vf_misc_vaapi.c:227
FLAGS
#define FLAGS
Definition: vf_misc_vaapi.c:210
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:225
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:193
SHARPNESS_MAX
#define SHARPNESS_MAX
Definition: vf_misc_vaapi.c:35
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:285
SharpnessVAAPIContext
Definition: vf_misc_vaapi.c:44