56 sscanf(args,
"%d", &trans->
dir);
58 if (trans->
dir < 0 || trans->
dir > 3) {
109 outlink->
w = inlink->
h;
110 outlink->
h = inlink->
w;
118 inlink->
w, inlink->
h, trans->
dir, outlink->
w, outlink->
h,
119 trans->
dir == 1 || trans->
dir == 3 ?
"clockwise" :
"counterclockwise",
120 trans->
dir == 0 || trans->
dir == 3);
146 for (plane = 0; out->
data[plane]; plane++) {
147 int hsub = plane == 1 || plane == 2 ? trans->
hsub : 0;
148 int vsub = plane == 1 || plane == 2 ? trans->
vsub : 0;
149 int pixstep = trans->
pixsteps[plane];
150 int inh = in->
video->
h>>vsub;
151 int outw = out->
video->
w>>hsub;
152 int outh = out->
video->
h>>vsub;
154 int dstlinesize, srclinesize;
157 dst = out->
data[plane];
159 src = in->
data[plane];
163 src += in->
linesize[plane] * (inh-1);
168 dst += out->
linesize[plane] * (outh-1);
172 for (y = 0; y < outh; y++) {
175 for (x = 0; x < outw; x++)
176 dst[x] = src[x*srclinesize + y];
179 for (x = 0; x < outw; x++)
180 *((uint16_t *)(dst + 2*x)) = *((uint16_t *)(src + x*srclinesize + y*2));
183 for (x = 0; x < outw; x++) {
189 for (x = 0; x < outw; x++)
190 *((uint32_t *)(dst + 4*x)) = *((uint32_t *)(src + x*srclinesize + y*4));
229 .
inputs = avfilter_vf_transpose_inputs,
230 .
outputs = avfilter_vf_transpose_outputs,
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
AVFilterBufferRefVideoProps * video
video buffer specific properties
int linesize[8]
number of bytes per line
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static const AVFilterPad outputs[]
packed RGB 8:8:8, 24bpp, RGBRGB...
int h
agreed upon image height
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0 ...
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
static const AVFilterPad avfilter_vf_transpose_outputs[]
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], const AVPixFmtDescriptor *pixdesc)
Compute the max pixel step for each plane of an image with a format described by pixdesc.
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
void avfilter_unref_bufferp(AVFilterBufferRef **ref)
Remove a reference to a buffer and set the pointer to NULL.
static av_cold int init(AVFilterContext *ctx, const char *args)
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of PIX_FMT_YUV440P and setting color_range ...
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV422P and setting color_...
AVFilter avfilter_vf_transpose
AVRational pixel_aspect
pixel aspect ratio
int64_t pts
presentation timestamp.
A filter pad used for either input or output.
A link between two filters.
AVFilterBufferRef * ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
Request a picture buffer with a specific set of permissions.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
void * priv
private data for use by the filter
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
void av_log(void *avcl, int level, const char *fmt,...)
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
common internal API header
as above, but U and V bytes are swapped
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV420P and setting color_...
static int query_formats(AVFilterContext *ctx)
packed RGB 8:8:8, 24bpp, BGRBGR...
AVFilterContext * src
source filter
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
int format
agreed upon media format
A reference to an AVFilterBuffer.
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static const AVFilterPad inputs[]
rational number numerator/denominator
const char * name
filter name
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1 ...
AVFilterLink ** outputs
array of pointers to output links
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV444P and setting color_...
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
Y , 16bpp, little-endian.
uint8_t * data[8]
picture/audio data for each plane
static const AVFilterPad avfilter_vf_transpose_inputs[]
packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1 ...
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
static int config_props_output(AVFilterLink *outlink)
AVPixelFormat
Pixel format.