Data Structures | Macros | Functions | Variables
vf_transpose_opencl.c File Reference
#include <float.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
#include "opencl.h"
#include "opencl_source.h"
#include "video.h"
#include "transpose.h"

Go to the source code of this file.

Data Structures

struct  TransposeOpenCLContext


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


static int transpose_opencl_init (AVFilterContext *avctx)
static int transpose_opencl_config_output (AVFilterLink *outlink)
static AVFrameget_video_buffer (AVFilterLink *inlink, int w, int h)
static int transpose_opencl_filter_frame (AVFilterLink *inlink, AVFrame *input)
static av_cold void transpose_opencl_uninit (AVFilterContext *avctx)
 AVFILTER_DEFINE_CLASS (transpose_opencl)


static const AVOption transpose_opencl_options []
static const AVFilterPad transpose_opencl_inputs []
static const AVFilterPad transpose_opencl_outputs []
AVFilter ff_vf_transpose_opencl

Macro Definition Documentation

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

Definition at line 237 of file vf_transpose_opencl.c.

Definition at line 238 of file vf_transpose_opencl.c.

Function Documentation

static int transpose_opencl_init ( AVFilterContext avctx)

Definition at line 43 of file vf_transpose_opencl.c.

Referenced by transpose_opencl_filter_frame().

static int transpose_opencl_config_output ( AVFilterLink outlink)

Definition at line 74 of file vf_transpose_opencl.c.

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

Definition at line 126 of file vf_transpose_opencl.c.

static int transpose_opencl_filter_frame ( AVFilterLink inlink,
AVFrame input 

Definition at line 135 of file vf_transpose_opencl.c.

static av_cold void transpose_opencl_uninit ( AVFilterContext avctx)

Definition at line 215 of file vf_transpose_opencl.c.

AVFILTER_DEFINE_CLASS ( transpose_opencl  )

Variable Documentation

const AVOption transpose_opencl_options[]
Initial value:
= {
{ "dir", "set transpose direction", OFFSET(dir), AV_OPT_TYPE_INT, { .i64 = TRANSPOSE_CCLOCK_FLIP }, 0, 3, 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" },
{ "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 OFFSET(x)
#define FLAGS

Definition at line 239 of file vf_transpose_opencl.c.

const AVFilterPad transpose_opencl_inputs[]
Initial value:
= {
.name = "default",
.get_video_buffer = get_video_buffer,
{ NULL }
#define NULL
Definition: coverity.c:32
int ff_opencl_filter_config_input(AVFilterLink *inlink)
Check that the input link contains a suitable hardware frames context and extract the device from it...
Definition: opencl.c:60
static int transpose_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)

Definition at line 257 of file vf_transpose_opencl.c.

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

Definition at line 268 of file vf_transpose_opencl.c.

AVFilter ff_vf_transpose_opencl
Initial value:
= {
.name = "transpose_opencl",
.description = NULL_IF_CONFIG_SMALL("Transpose input video"),
.priv_size = sizeof(TransposeOpenCLContext),
.priv_class = &transpose_opencl_class,
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:339
int ff_opencl_filter_query_formats(AVFilterContext *avctx)
Return that all inputs and outputs support only AV_PIX_FMT_OPENCL.
Definition: opencl.c:28
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
int ff_opencl_filter_init(AVFilterContext *avctx)
Initialise an OpenCL filter context.
Definition: opencl.c:147
static av_cold void transpose_opencl_uninit(AVFilterContext *avctx)
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static const AVFilterPad transpose_opencl_outputs[]
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
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
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
static const AVFilterPad transpose_opencl_inputs[]

Definition at line 277 of file vf_transpose_opencl.c.