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"

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 412 of file vf_scale_vaapi.c.

Definition at line 413 of file vf_scale_vaapi.c.

Function Documentation

static int scale_vaapi_query_formats ( AVFilterContext avctx)
static

Definition at line 59 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 92 of file vf_scale_vaapi.c.

static int scale_vaapi_config_output ( AVFilterLink outlink)
static

Definition at line 111 of file vf_scale_vaapi.c.

static int vaapi_proc_colour_standard ( enum AVColorSpace  av_cs)
static

Definition at line 239 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 253 of file vf_scale_vaapi.c.

static av_cold int scale_vaapi_init ( AVFilterContext avctx)
static

Definition at line 377 of file vf_scale_vaapi.c.

static av_cold void scale_vaapi_uninit ( AVFilterContext avctx)
static

Definition at line 399 of file vf_scale_vaapi.c.

Variable Documentation

const AVOption scale_vaapi_options[]
static
Initial value:
= {
{ "w", "Output video width",
OFFSET(output_width), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ "h", "Output video height",
OFFSET(output_height), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .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 414 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:85
static const AVOption scale_vaapi_options[]
av_default_item_name

Definition at line 424 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 431 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 441 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,
}
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:336
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:176
static const AVFilterPad scale_vaapi_inputs[]
static const AVClass scale_vaapi_class
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
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 450 of file vf_scale_vaapi.c.