FFmpeg
|
vf_transpose.c File Reference
#include <stdio.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Include dependency graph for vf_transpose.c:

Go to the source code of this file.
Data Structures | |
struct | TransContext |
Macros | |
#define | OFFSET(x) offsetof(TransContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Enumerations | |
enum | PassthroughType { TRANSPOSE_PT_TYPE_NONE, TRANSPOSE_PT_TYPE_LANDSCAPE, TRANSPOSE_PT_TYPE_PORTRAIT } |
enum | TransposeDir { TRANSPOSE_CCLOCK_FLIP, TRANSPOSE_CLOCK, TRANSPOSE_CCLOCK, TRANSPOSE_CLOCK_FLIP } |
Functions | |
static int | query_formats (AVFilterContext *ctx) |
static int | config_props_output (AVFilterLink *outlink) |
static AVFrame * | get_video_buffer (AVFilterLink *inlink, int w, int h) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
AVFILTER_DEFINE_CLASS (transpose) | |
Variables | |
static const AVOption | transpose_options [] |
static const AVFilterPad | avfilter_vf_transpose_inputs [] |
static const AVFilterPad | avfilter_vf_transpose_outputs [] |
AVFilter | avfilter_vf_transpose |
Detailed Description
transposition filter Based on MPlayer libmpcodecs/vf_rotate.c.
Definition in file vf_transpose.c.
Macro Definition Documentation
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 227 of file vf_transpose.c.
#define OFFSET | ( | x | ) | offsetof(TransContext, x) |
Definition at line 226 of file vf_transpose.c.
Enumeration Type Documentation
enum PassthroughType |
Enumerator | |
---|---|
TRANSPOSE_PT_TYPE_NONE | |
TRANSPOSE_PT_TYPE_LANDSCAPE | |
TRANSPOSE_PT_TYPE_PORTRAIT |
Definition at line 41 of file vf_transpose.c.
enum TransposeDir |
Enumerator | |
---|---|
TRANSPOSE_CCLOCK_FLIP | |
TRANSPOSE_CLOCK | |
TRANSPOSE_CCLOCK | |
TRANSPOSE_CLOCK_FLIP |
Definition at line 47 of file vf_transpose.c.
Function Documentation
AVFILTER_DEFINE_CLASS | ( | transpose | ) |
|
static |
Definition at line 82 of file vf_transpose.c.
|
static |
Definition at line 136 of file vf_transpose.c.
|
static |
Definition at line 127 of file vf_transpose.c.
|
static |
Definition at line 63 of file vf_transpose.c.
Variable Documentation
AVFilter avfilter_vf_transpose |
Initial value:
= {
.name = "transpose",
.description = NULL_IF_CONFIG_SMALL("Transpose input video."),
.priv_size = sizeof(TransContext),
.priv_class = &transpose_class,
}
static const AVFilterPad avfilter_vf_transpose_outputs[]
Definition: vf_transpose.c:258
Definition: vf_transpose.c:54
static const AVFilterPad avfilter_vf_transpose_inputs[]
Definition: vf_transpose.c:248
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
Definition: filter_design.txt:216
Definition at line 267 of file vf_transpose.c.
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.get_video_buffer= get_video_buffer,
.filter_frame = filter_frame,
},
{ NULL }
}
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)
Definition: vf_transpose.c:127
Definition: avutil.h:143
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_transpose.c:136
Definition at line 248 of file vf_transpose.c.
|
static |
Initial value:
= {
{
.name = "default",
.config_props = config_props_output,
.type = AVMEDIA_TYPE_VIDEO,
},
{ NULL }
}
Definition: avutil.h:143
static int config_props_output(AVFilterLink *outlink)
Definition: vf_transpose.c:82
Definition at line 258 of file vf_transpose.c.
|
static |
Initial value:
= {
{ "cclock_flip", "counter-clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK_FLIP }, .unit = "dir" },
{ "cclock", "counter-clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK }, .unit = "dir" },
{ "clock_flip", "clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK_FLIP }, .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 },
}
Definition: opt.h:222
Definition: vf_transpose.c:43
Definition: opt.h:229
Definition: vf_transpose.c:48
Definition: vf_transpose.c:51
Definition: vf_transpose.c:44
Definition: vf_transpose.c:50
Definition: vf_transpose.c:49
Definition: vf_transpose.c:42
Definition at line 229 of file vf_transpose.c.
Generated on Tue Sep 2 2025 06:56:10 for FFmpeg by
