FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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

#define DENOISE_MIN   0

Definition at line 31 of file vf_misc_vaapi.c.

Referenced by denoise_vaapi_build_filter_params().

#define DENOISE_MAX   64

Definition at line 32 of file vf_misc_vaapi.c.

Referenced by denoise_vaapi_build_filter_params().

#define DENOISE_DEFAULT   0

Definition at line 33 of file vf_misc_vaapi.c.

#define SHARPNESS_MIN   0

Definition at line 36 of file vf_misc_vaapi.c.

Referenced by sharpness_vaapi_build_filter_params().

#define SHARPNESS_MAX   64

Definition at line 37 of file vf_misc_vaapi.c.

Referenced by sharpness_vaapi_build_filter_params().

#define SHARPNESS_DEFAULT   44

Definition at line 38 of file vf_misc_vaapi.c.

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

Definition at line 228 of file vf_misc_vaapi.c.

Definition at line 229 of file vf_misc_vaapi.c.

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

Definition at line 236 of file vf_misc_vaapi.c.

Function Documentation

static float map ( int  x,
int  in_min,
int  in_max,
float  out_min,
float  out_max 
)
static
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().

static int sharpness_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 93 of file vf_misc_vaapi.c.

Referenced by sharpness_vaapi_init().

static int misc_vaapi_filter_frame ( AVFilterLink inlink,
AVFrame input_frame 
)
static

Definition at line 126 of file vf_misc_vaapi.c.

static av_cold int denoise_vaapi_init ( AVFilterContext avctx)
static

Definition at line 204 of file vf_misc_vaapi.c.

static av_cold int sharpness_vaapi_init ( AVFilterContext avctx)
static

Definition at line 216 of file vf_misc_vaapi.c.

AVFILTER_DEFINE_CLASS ( denoise_vaapi  )
AVFILTER_DEFINE_CLASS ( sharpness_vaapi  )

Variable Documentation

const AVOption denoise_vaapi_options[]
static
Initial value:
= {
{ "denoise", "denoise level",
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define DENOISE_DEFAULT
Definition: vf_misc_vaapi.c:33
#define DOFFSET(x)
#define DENOISE_MIN
Definition: vf_misc_vaapi.c:31
#define DENOISE_MAX
Definition: vf_misc_vaapi.c:32
#define FLAGS
#define denoise(...)
Definition: vf_hqdn3d.c:156

Definition at line 230 of file vf_misc_vaapi.c.

const AVOption sharpness_vaapi_options[]
static
Initial value:
= {
{ "sharpness", "sharpness level",
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define SHARPNESS_DEFAULT
Definition: vf_misc_vaapi.c:38
#define SOFFSET(x)
#define SHARPNESS_MAX
Definition: vf_misc_vaapi.c:37
#define SHARPNESS_MIN
Definition: vf_misc_vaapi.c:36
#define FLAGS

Definition at line 237 of file vf_misc_vaapi.c.

const AVFilterPad misc_vaapi_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &misc_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 misc_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)

Definition at line 246 of file vf_misc_vaapi.c.

const AVFilterPad misc_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 256 of file vf_misc_vaapi.c.

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,
}
#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 const AVFilterPad misc_vaapi_inputs[]
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static const AVFilterPad misc_vaapi_outputs[]
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 denoise_vaapi_init(AVFilterContext *avctx)
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:365

Definition at line 265 of file vf_misc_vaapi.c.

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,
}
#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 const AVFilterPad misc_vaapi_inputs[]
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static const AVFilterPad misc_vaapi_outputs[]
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static av_cold int sharpness_vaapi_init(AVFilterContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:365

Definition at line 278 of file vf_misc_vaapi.c.