FFmpeg
Data Structures | Macros | Functions | Variables
vf_misc_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  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 []
 
AVFilter ff_vf_denoise_vaapi
 
AVFilter ff_vf_sharpness_vaapi
 

Macro Definition Documentation

◆ DENOISE_MIN

#define DENOISE_MIN   0

Definition at line 31 of file vf_misc_vaapi.c.

◆ DENOISE_MAX

#define DENOISE_MAX   64

Definition at line 32 of file vf_misc_vaapi.c.

◆ DENOISE_DEFAULT

#define DENOISE_DEFAULT   0

Definition at line 33 of file vf_misc_vaapi.c.

◆ SHARPNESS_MIN

#define SHARPNESS_MIN   0

Definition at line 36 of file vf_misc_vaapi.c.

◆ SHARPNESS_MAX

#define SHARPNESS_MAX   64

Definition at line 37 of file vf_misc_vaapi.c.

◆ SHARPNESS_DEFAULT

#define SHARPNESS_DEFAULT   44

Definition at line 38 of file vf_misc_vaapi.c.

◆ DOFFSET

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

Definition at line 202 of file vf_misc_vaapi.c.

◆ FLAGS

Definition at line 203 of file vf_misc_vaapi.c.

◆ SOFFSET

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

Definition at line 210 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 62 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 92 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 123 of file vf_misc_vaapi.c.

◆ denoise_vaapi_init()

static av_cold int denoise_vaapi_init ( AVFilterContext avctx)
static

Definition at line 178 of file vf_misc_vaapi.c.

◆ sharpness_vaapi_init()

static av_cold int sharpness_vaapi_init ( AVFilterContext avctx)
static

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

◆ sharpness_vaapi_options

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

Definition at line 211 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,
},
{ NULL }
}

Definition at line 220 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,
},
{ NULL }
}

Definition at line 230 of file vf_misc_vaapi.c.

◆ ff_vf_denoise_vaapi

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 239 of file vf_misc_vaapi.c.

◆ ff_vf_sharpness_vaapi

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 252 of file vf_misc_vaapi.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
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:365
SOFFSET
#define SOFFSET(x)
Definition: vf_misc_vaapi.c:210
sharpness_vaapi_init
static av_cold int sharpness_vaapi_init(AVFilterContext *avctx)
Definition: vf_misc_vaapi.c:190
DenoiseVAAPIContext
Definition: vf_misc_vaapi.c:40
DENOISE_DEFAULT
#define DENOISE_DEFAULT
Definition: vf_misc_vaapi.c:33
SHARPNESS_DEFAULT
#define SHARPNESS_DEFAULT
Definition: vf_misc_vaapi.c:38
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
denoise_vaapi_init
static av_cold int denoise_vaapi_init(AVFilterContext *avctx)
Definition: vf_misc_vaapi.c:178
NULL
#define NULL
Definition: coverity.c:32
SHARPNESS_MIN
#define SHARPNESS_MIN
Definition: vf_misc_vaapi.c:36
ff_vaapi_vpp_config_input
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
Definition: vaapi_vpp.c:70
inputs
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:243
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:188
misc_vaapi_filter_frame
static int misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
Definition: vf_misc_vaapi.c:123
misc_vaapi_outputs
static const AVFilterPad misc_vaapi_outputs[]
Definition: vf_misc_vaapi.c:230
DOFFSET
#define DOFFSET(x)
Definition: vf_misc_vaapi.c:202
denoise
#define denoise(...)
Definition: vf_hqdn3d.c:156
misc_vaapi_inputs
static const AVFilterPad misc_vaapi_inputs[]
Definition: vf_misc_vaapi.c:220
FLAGS
#define FLAGS
Definition: vf_misc_vaapi.c:203
DENOISE_MAX
#define DENOISE_MAX
Definition: vf_misc_vaapi.c:32
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:223
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
DENOISE_MIN
#define DENOISE_MIN
Definition: vf_misc_vaapi.c:31
SHARPNESS_MAX
#define SHARPNESS_MAX
Definition: vf_misc_vaapi.c:37
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
SharpnessVAAPIContext
Definition: vf_misc_vaapi.c:46