FFmpeg
Data Structures | Macros | Functions | Variables
vf_transpose_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 "transpose.h"
#include "vaapi_vpp.h"

Go to the source code of this file.

Data Structures

struct  TransposeVAAPIContext
 

Macros

#define OFFSET(x)   offsetof(TransposeVAAPIContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
 

Functions

static int transpose_vaapi_build_filter_params (AVFilterContext *avctx)
 
static int transpose_vaapi_filter_frame (AVFilterLink *inlink, AVFrame *input_frame)
 
static av_cold int transpose_vaapi_init (AVFilterContext *avctx)
 
static int transpose_vaapi_vpp_config_output (AVFilterLink *outlink)
 
static AVFrameget_video_buffer (AVFilterLink *inlink, int w, int h)
 
 AVFILTER_DEFINE_CLASS (transpose_vaapi)
 

Variables

static const AVOption transpose_vaapi_options []
 
static const AVFilterPad transpose_vaapi_inputs []
 
static const AVFilterPad transpose_vaapi_outputs []
 
AVFilter ff_vf_transpose_vaapi
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(TransposeVAAPIContext, x)

Definition at line 233 of file vf_transpose_vaapi.c.

Definition at line 234 of file vf_transpose_vaapi.c.

Function Documentation

static int transpose_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 40 of file vf_transpose_vaapi.c.

Referenced by transpose_vaapi_init().

static int transpose_vaapi_filter_frame ( AVFilterLink inlink,
AVFrame input_frame 
)
static

Definition at line 119 of file vf_transpose_vaapi.c.

static av_cold int transpose_vaapi_init ( AVFilterContext avctx)
static

Definition at line 176 of file vf_transpose_vaapi.c.

static int transpose_vaapi_vpp_config_output ( AVFilterLink outlink)
static

Definition at line 188 of file vf_transpose_vaapi.c.

static AVFrame* get_video_buffer ( AVFilterLink inlink,
int  w,
int  h 
)
static

Definition at line 224 of file vf_transpose_vaapi.c.

AVFILTER_DEFINE_CLASS ( transpose_vaapi  )

Variable Documentation

const AVOption transpose_vaapi_options[]
static
Initial value:
= {
{ "dir", "set transpose direction", OFFSET(dir), AV_OPT_TYPE_INT, { .i64 = TRANSPOSE_CCLOCK_FLIP }, 0, 6, FLAGS, "dir" },
{ "cclock_flip", "rotate counter-clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
{ "clock", "rotate clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK }, .flags=FLAGS, .unit = "dir" },
{ "cclock", "rotate counter-clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK }, .flags=FLAGS, .unit = "dir" },
{ "clock_flip", "rotate clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
{ "reversal", "rotate by half-turn", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_REVERSAL }, .flags=FLAGS, .unit = "dir" },
{ "hflip", "flip horizontally", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_HFLIP }, .flags=FLAGS, .unit = "dir" },
{ "vflip", "flip vertically", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_VFLIP }, .flags=FLAGS, .unit = "dir" },
{ "passthrough", "do not apply transposition if the input matches the specified geometry",
OFFSET(passthrough), AV_OPT_TYPE_INT, {.i64=TRANSPOSE_PT_TYPE_NONE}, 0, INT_MAX, FLAGS, "passthrough" },
{ "none", "always apply transposition", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_NONE}, INT_MIN, INT_MAX, FLAGS, "passthrough" },
{ "portrait", "preserve portrait geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_PORTRAIT}, INT_MIN, INT_MAX, FLAGS, "passthrough" },
{ "landscape", "preserve landscape geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_LANDSCAPE}, INT_MIN, INT_MAX, FLAGS, "passthrough" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 235 of file vf_transpose_vaapi.c.

const AVFilterPad transpose_vaapi_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &transpose_vaapi_filter_frame,
.get_video_buffer = get_video_buffer,
.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 transpose_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)

Definition at line 257 of file vf_transpose_vaapi.c.

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

Definition at line 268 of file vf_transpose_vaapi.c.

AVFilter ff_vf_transpose_vaapi
Initial value:
= {
.name = "transpose_vaapi",
.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for transpose"),
.priv_size = sizeof(TransposeVAAPIContext),
.priv_class = &transpose_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 int transpose_vaapi_init(AVFilterContext *avctx)
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static const AVFilterPad transpose_vaapi_inputs[]
#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 outputs[]
Definition: af_acontrast.c:203
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
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
static const AVFilterPad transpose_vaapi_outputs[]
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:680

Definition at line 277 of file vf_transpose_vaapi.c.