FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_scale_vaapi.c File Reference
#include <string.h>
#include <va/va.h>
#include <va/va_vpp.h>
#include "libavutil/avassert.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_vaapi.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "scale.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  ScaleVAAPIContext
 

Macros

#define CS(av, va)   case AVCOL_SPC_ ## av: return VAProcColorStandard ## va;
 
#define OFFSET(x)   offsetof(ScaleVAAPIContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static int scale_vaapi_query_formats (AVFilterContext *avctx)
 
static int scale_vaapi_pipeline_uninit (ScaleVAAPIContext *ctx)
 
static int scale_vaapi_config_input (AVFilterLink *inlink)
 
static int scale_vaapi_config_output (AVFilterLink *outlink)
 
static int vaapi_proc_colour_standard (enum AVColorSpace av_cs)
 
static int scale_vaapi_filter_frame (AVFilterLink *inlink, AVFrame *input_frame)
 
static av_cold int scale_vaapi_init (AVFilterContext *avctx)
 
static av_cold void scale_vaapi_uninit (AVFilterContext *avctx)
 

Variables

static const AVOption scale_vaapi_options []
 
static const AVClass scale_vaapi_class
 
static const AVFilterPad scale_vaapi_inputs []
 
static const AVFilterPad scale_vaapi_outputs []
 
AVFilter ff_vf_scale_vaapi
 

Macro Definition Documentation

#define CS (   av,
  va 
)    case AVCOL_SPC_ ## av: return VAProcColorStandard ## va;
#define OFFSET (   x)    offsetof(ScaleVAAPIContext, x)

Definition at line 432 of file vf_scale_vaapi.c.

Definition at line 433 of file vf_scale_vaapi.c.

Function Documentation

static int scale_vaapi_query_formats ( AVFilterContext avctx)
static

Definition at line 64 of file vf_scale_vaapi.c.

static int scale_vaapi_pipeline_uninit ( ScaleVAAPIContext ctx)
static
static int scale_vaapi_config_input ( AVFilterLink inlink)
static

Definition at line 100 of file vf_scale_vaapi.c.

static int scale_vaapi_config_output ( AVFilterLink outlink)
static

Definition at line 119 of file vf_scale_vaapi.c.

static int vaapi_proc_colour_standard ( enum AVColorSpace  av_cs)
static

Definition at line 254 of file vf_scale_vaapi.c.

Referenced by scale_vaapi_filter_frame().

static int scale_vaapi_filter_frame ( AVFilterLink inlink,
AVFrame input_frame 
)
static

Definition at line 268 of file vf_scale_vaapi.c.

static av_cold int scale_vaapi_init ( AVFilterContext avctx)
static

Definition at line 397 of file vf_scale_vaapi.c.

static av_cold void scale_vaapi_uninit ( AVFilterContext avctx)
static

Definition at line 419 of file vf_scale_vaapi.c.

Variable Documentation

const AVOption scale_vaapi_options[]
static
Initial value:
= {
{ "w", "Output video width",
OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, .flags = FLAGS },
{ "h", "Output video height",
OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, .flags = FLAGS },
{ "format", "Output video format (software format of hardware frames)",
OFFSET(output_format_string), AV_OPT_TYPE_STRING, .flags = FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 434 of file vf_scale_vaapi.c.

const AVClass scale_vaapi_class
static
Initial value:
= {
.class_name = "scale_vaapi",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:86
static const AVOption scale_vaapi_options[]
av_default_item_name

Definition at line 444 of file vf_scale_vaapi.c.

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

Definition at line 451 of file vf_scale_vaapi.c.

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

Definition at line 461 of file vf_scale_vaapi.c.

AVFilter ff_vf_scale_vaapi
Initial value:
= {
.name = "scale_vaapi",
.description = NULL_IF_CONFIG_SMALL("Scale to/from VAAPI surfaces."),
.priv_size = sizeof(ScaleVAAPIContext),
.priv_class = &scale_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 void scale_vaapi_uninit(AVFilterContext *avctx)
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static av_cold int scale_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:179
static const AVFilterPad scale_vaapi_inputs[]
static const AVClass scale_vaapi_class
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:389
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:379
static const AVFilterPad scale_vaapi_outputs[]
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
static int scale_vaapi_query_formats(AVFilterContext *avctx)

Definition at line 470 of file vf_scale_vaapi.c.