FFmpeg
Loading...
Searching...
No Matches
vf_transpose.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 Stefano Sabatini
3 * Copyright (c) 2008 Vitor Sessak
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22/**
23 * @file
24 * transposition filter
25 * Based on MPlayer libmpcodecs/vf_rotate.c.
26 */
27
28#include <stdio.h>
29
30#include "libavutil/avassert.h"
31#include "libavutil/imgutils.h"
32#include "libavutil/internal.h"
34#include "libavutil/opt.h"
35#include "libavutil/pixdesc.h"
36
37#include "avfilter.h"
38#include "filters.h"
39#include "formats.h"
40#include "video.h"
41#include "transpose.h"
42
43typedef struct TransContext {
44 const AVClass *class;
45 int hsub, vsub;
46 int planes;
47 int pixsteps[4];
48
49 int passthrough; ///< PassthroughType, landscape passthrough mode enabled
50 int dir; ///< TransposeDir
51
54
56 AVFilterFormatsConfig **cfg_in,
57 AVFilterFormatsConfig **cfg_out)
58{
61 int fmt, ret;
62
63 for (fmt = 0; desc = av_pix_fmt_desc_get(fmt); fmt++) {
64 if (!(desc->flags & AV_PIX_FMT_FLAG_PAL ||
67 desc->log2_chroma_w != desc->log2_chroma_h) &&
68 (ret = ff_add_format(&pix_fmts, fmt)) < 0)
69 return ret;
70 }
71
72
73 return ff_set_common_formats2(ctx, cfg_in, cfg_out, pix_fmts);
74}
75
76static inline void transpose_block_8_c(uint8_t *src, ptrdiff_t src_linesize,
77 uint8_t *dst, ptrdiff_t dst_linesize,
78 int w, int h)
79{
80 int x, y;
81 for (y = 0; y < h; y++, dst += dst_linesize, src++)
82 for (x = 0; x < w; x++)
83 dst[x] = src[x*src_linesize];
84}
85
86static void transpose_8x8_8_c(uint8_t *src, ptrdiff_t src_linesize,
87 uint8_t *dst, ptrdiff_t dst_linesize)
88{
89 transpose_block_8_c(src, src_linesize, dst, dst_linesize, 8, 8);
90}
91
92static inline void transpose_block_16_c(uint8_t *src, ptrdiff_t src_linesize,
93 uint8_t *dst, ptrdiff_t dst_linesize,
94 int w, int h)
95{
96 int x, y;
97 for (y = 0; y < h; y++, dst += dst_linesize, src += 2)
98 for (x = 0; x < w; x++)
99 *((uint16_t *)(dst + 2*x)) = *((uint16_t *)(src + x*src_linesize));
100}
101
102static void transpose_8x8_16_c(uint8_t *src, ptrdiff_t src_linesize,
103 uint8_t *dst, ptrdiff_t dst_linesize)
104{
105 transpose_block_16_c(src, src_linesize, dst, dst_linesize, 8, 8);
106}
107
108static inline void transpose_block_24_c(uint8_t *src, ptrdiff_t src_linesize,
109 uint8_t *dst, ptrdiff_t dst_linesize,
110 int w, int h)
111{
112 int x, y;
113 for (y = 0; y < h; y++, dst += dst_linesize) {
114 for (x = 0; x < w; x++) {
115 int32_t v = AV_RB24(src + x*src_linesize + y*3);
116 AV_WB24(dst + 3*x, v);
117 }
118 }
119}
120
121static void transpose_8x8_24_c(uint8_t *src, ptrdiff_t src_linesize,
122 uint8_t *dst, ptrdiff_t dst_linesize)
123{
124 transpose_block_24_c(src, src_linesize, dst, dst_linesize, 8, 8);
125}
126
127static inline void transpose_block_32_c(uint8_t *src, ptrdiff_t src_linesize,
128 uint8_t *dst, ptrdiff_t dst_linesize,
129 int w, int h)
130{
131 int x, y;
132 for (y = 0; y < h; y++, dst += dst_linesize, src += 4) {
133 for (x = 0; x < w; x++)
134 *((uint32_t *)(dst + 4*x)) = *((uint32_t *)(src + x*src_linesize));
135 }
136}
137
138static void transpose_8x8_32_c(uint8_t *src, ptrdiff_t src_linesize,
139 uint8_t *dst, ptrdiff_t dst_linesize)
140{
141 transpose_block_32_c(src, src_linesize, dst, dst_linesize, 8, 8);
142}
143
144static inline void transpose_block_48_c(uint8_t *src, ptrdiff_t src_linesize,
145 uint8_t *dst, ptrdiff_t dst_linesize,
146 int w, int h)
147{
148 int x, y;
149 for (y = 0; y < h; y++, dst += dst_linesize, src += 6) {
150 for (x = 0; x < w; x++) {
151 int64_t v = AV_RB48(src + x*src_linesize);
152 AV_WB48(dst + 6*x, v);
153 }
154 }
155}
156
157static void transpose_8x8_48_c(uint8_t *src, ptrdiff_t src_linesize,
158 uint8_t *dst, ptrdiff_t dst_linesize)
159{
160 transpose_block_48_c(src, src_linesize, dst, dst_linesize, 8, 8);
161}
162
163static inline void transpose_block_64_c(uint8_t *src, ptrdiff_t src_linesize,
164 uint8_t *dst, ptrdiff_t dst_linesize,
165 int w, int h)
166{
167 int x, y;
168 for (y = 0; y < h; y++, dst += dst_linesize, src += 8)
169 for (x = 0; x < w; x++)
170 *((uint64_t *)(dst + 8*x)) = *((uint64_t *)(src + x*src_linesize));
171}
172
173static void transpose_8x8_64_c(uint8_t *src, ptrdiff_t src_linesize,
174 uint8_t *dst, ptrdiff_t dst_linesize)
175{
176 transpose_block_64_c(src, src_linesize, dst, dst_linesize, 8, 8);
177}
178
179static inline void transpose_block_96_c(uint8_t *src, ptrdiff_t src_linesize,
180 uint8_t *dst, ptrdiff_t dst_linesize,
181 int w, int h)
182{
183 int x, y;
184 for (y = 0; y < h; y++, dst += dst_linesize, src += 12) {
185 for (x = 0; x < w; x++) {
186 int64_t v1 = AV_RB48(src + x*src_linesize);
187 int64_t v2 = AV_RB48(src + 6 + x*src_linesize);
188 AV_WB48(dst + 12*x, v1);
189 AV_WB48(dst + 6 + 12*x, v2);
190 }
191 }
192}
193
194static void transpose_8x8_96_c(uint8_t *src, ptrdiff_t src_linesize,
195 uint8_t *dst, ptrdiff_t dst_linesize)
196{
197 transpose_block_96_c(src, src_linesize, dst, dst_linesize, 8, 8);
198}
199
200static inline void transpose_block_128_c(uint8_t *src, ptrdiff_t src_linesize,
201 uint8_t *dst, ptrdiff_t dst_linesize,
202 int w, int h)
203{
204 int x, y;
205 for (y = 0; y < h; y++, dst += dst_linesize, src += 16) {
206 for (x = 0; x < w; x++) {
207 AV_COPY128U(dst + 16*x, src + x*src_linesize);
208 }
209 }
210}
211
212static void transpose_8x8_128_c(uint8_t *src, ptrdiff_t src_linesize,
213 uint8_t *dst, ptrdiff_t dst_linesize)
214{
215 transpose_block_128_c(src, src_linesize, dst, dst_linesize, 8, 8);
216}
217
219{
220 AVFilterContext *ctx = outlink->src;
221 TransContext *s = ctx->priv;
222 AVFilterLink *inlink = ctx->inputs[0];
223 const AVPixFmtDescriptor *desc_out = av_pix_fmt_desc_get(outlink->format);
224 const AVPixFmtDescriptor *desc_in = av_pix_fmt_desc_get(inlink->format);
225
226 if (s->dir&4) {
228 "dir values greater than 3 are deprecated, use the passthrough option instead\n");
229 s->dir &= 3;
230 s->passthrough = TRANSPOSE_PT_TYPE_LANDSCAPE;
231 }
232
233 if ((inlink->w >= inlink->h && s->passthrough == TRANSPOSE_PT_TYPE_LANDSCAPE) ||
234 (inlink->w <= inlink->h && s->passthrough == TRANSPOSE_PT_TYPE_PORTRAIT)) {
236 "w:%d h:%d -> w:%d h:%d (passthrough mode)\n",
237 inlink->w, inlink->h, inlink->w, inlink->h);
238 return 0;
239 } else {
240 s->passthrough = TRANSPOSE_PT_TYPE_NONE;
241 }
242
243 s->hsub = desc_in->log2_chroma_w;
244 s->vsub = desc_in->log2_chroma_h;
245 s->planes = av_pix_fmt_count_planes(outlink->format);
246
247 av_assert0(desc_in->nb_components == desc_out->nb_components);
248
249
250 av_image_fill_max_pixsteps(s->pixsteps, NULL, desc_out);
251
252 outlink->w = inlink->h;
253 outlink->h = inlink->w;
254
255 if (inlink->sample_aspect_ratio.num)
256 outlink->sample_aspect_ratio = av_div_q((AVRational) { 1, 1 },
257 inlink->sample_aspect_ratio);
258 else
259 outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
260
261 for (int i = 0; i < s->planes; i++) {
262 TransVtable *v = &s->vtables[i];
263 switch (s->pixsteps[i]) {
280 default:
281 return AVERROR_BUG;
282 }
283 }
284
285#if ARCH_X86 && HAVE_X86ASM
286 for (int i = 0; i < 4; i++) {
287 TransVtable *v = &s->vtables[i];
288
289 ff_transpose_init_x86(v, s->pixsteps[i]);
290 }
291#endif
292
294 "w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d\n",
295 inlink->w, inlink->h, s->dir, outlink->w, outlink->h,
296 s->dir == 1 || s->dir == 3 ? "clockwise" : "counterclockwise",
297 s->dir == 0 || s->dir == 3);
298 return 0;
299}
300
301static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h)
302{
303 TransContext *s = inlink->dst->priv;
304
305 return s->passthrough ?
306 ff_null_get_video_buffer (inlink, w, h) :
308}
309
310typedef struct ThreadData {
311 AVFrame *in, *out;
312} ThreadData;
313
314static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr,
315 int nb_jobs)
316{
317 TransContext *s = ctx->priv;
318 ThreadData *td = arg;
319 AVFrame *out = td->out;
320 AVFrame *in = td->in;
321 int plane;
322
323 for (plane = 0; plane < s->planes; plane++) {
324 int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
325 int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
326 int pixstep = s->pixsteps[plane];
327 int inh = AV_CEIL_RSHIFT(in->height, vsub);
328 int outw = AV_CEIL_RSHIFT(out->width, hsub);
329 int outh = AV_CEIL_RSHIFT(out->height, vsub);
330 int start = ff_slice_pos(outh, jobnr, nb_jobs);
331 int end = ff_slice_pos(outh, jobnr + 1, nb_jobs);
332 uint8_t *dst, *src;
333 int dstlinesize, srclinesize;
334 int x, y;
335 TransVtable *v = &s->vtables[plane];
336
337 dstlinesize = out->linesize[plane];
338 dst = out->data[plane] + start * dstlinesize;
339 src = in->data[plane];
340 srclinesize = in->linesize[plane];
341
342 if (s->dir & 1) {
343 src += in->linesize[plane] * (inh - 1);
344 srclinesize *= -1;
345 }
346
347 if (s->dir & 2) {
348 dst = out->data[plane] + dstlinesize * (outh - start - 1);
349 dstlinesize *= -1;
350 }
351
352 for (y = start; y < end - 7; y += 8) {
353 for (x = 0; x < outw - 7; x += 8) {
354 v->transpose_8x8(src + x * srclinesize + y * pixstep,
355 srclinesize,
356 dst + (y - start) * dstlinesize + x * pixstep,
357 dstlinesize);
358 }
359 if (outw - x > 0 && end - y > 0)
360 v->transpose_block(src + x * srclinesize + y * pixstep,
361 srclinesize,
362 dst + (y - start) * dstlinesize + x * pixstep,
363 dstlinesize, outw - x, end - y);
364 }
365
366 if (end - y > 0)
367 v->transpose_block(src + 0 * srclinesize + y * pixstep,
368 srclinesize,
369 dst + (y - start) * dstlinesize + 0 * pixstep,
370 dstlinesize, outw, end - y);
371 }
372
373 return 0;
374}
375
376static int filter_frame(AVFilterLink *inlink, AVFrame *in)
377{
378 int err = 0;
379 AVFilterContext *ctx = inlink->dst;
380 TransContext *s = ctx->priv;
381 AVFilterLink *outlink = ctx->outputs[0];
382 ThreadData td;
383 AVFrame *out;
384
385 if (s->passthrough)
386 return ff_filter_frame(outlink, in);
387
388 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
389 if (!out) {
390 err = AVERROR(ENOMEM);
391 goto fail;
392 }
393
394 err = av_frame_copy_props(out, in);
395 if (err < 0)
396 goto fail;
397
398 if (in->sample_aspect_ratio.num == 0) {
399 out->sample_aspect_ratio = in->sample_aspect_ratio;
400 } else {
401 out->sample_aspect_ratio.num = in->sample_aspect_ratio.den;
402 out->sample_aspect_ratio.den = in->sample_aspect_ratio.num;
403 }
404
405 td.in = in, td.out = out;
407 FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));
408 av_frame_free(&in);
409 return ff_filter_frame(outlink, out);
410
411fail:
412 av_frame_free(&in);
414 return err;
415}
416
417#define OFFSET(x) offsetof(TransContext, x)
418#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
419
420static const AVOption transpose_options[] = {
421 { "dir", "set transpose direction", OFFSET(dir), AV_OPT_TYPE_INT, { .i64 = TRANSPOSE_CCLOCK_FLIP }, 0, 7, FLAGS, .unit = "dir" },
422 { "cclock_flip", "rotate counter-clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
423 { "clock", "rotate clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK }, .flags=FLAGS, .unit = "dir" },
424 { "cclock", "rotate counter-clockwise", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CCLOCK }, .flags=FLAGS, .unit = "dir" },
425 { "clock_flip", "rotate clockwise with vertical flip", 0, AV_OPT_TYPE_CONST, { .i64 = TRANSPOSE_CLOCK_FLIP }, .flags=FLAGS, .unit = "dir" },
426
427 { "passthrough", "do not apply transposition if the input matches the specified geometry",
428 OFFSET(passthrough), AV_OPT_TYPE_INT, {.i64=TRANSPOSE_PT_TYPE_NONE}, 0, INT_MAX, FLAGS, .unit = "passthrough" },
429 { "none", "always apply transposition", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_NONE}, INT_MIN, INT_MAX, FLAGS, .unit = "passthrough" },
430 { "portrait", "preserve portrait geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_PORTRAIT}, INT_MIN, INT_MAX, FLAGS, .unit = "passthrough" },
431 { "landscape", "preserve landscape geometry", 0, AV_OPT_TYPE_CONST, {.i64=TRANSPOSE_PT_TYPE_LANDSCAPE}, INT_MIN, INT_MAX, FLAGS, .unit = "passthrough" },
432
433 { NULL }
434};
435
437
439 {
440 .name = "default",
441 .type = AVMEDIA_TYPE_VIDEO,
442 .get_buffer.video = get_video_buffer,
443 .filter_frame = filter_frame,
444 },
445};
446
448 {
449 .name = "default",
450 .config_props = config_props_output,
451 .type = AVMEDIA_TYPE_VIDEO,
452 },
453};
454
456 .p.name = "transpose",
457 .p.description = NULL_IF_CONFIG_SMALL("Transpose input video."),
458 .p.priv_class = &transpose_class,
460 .priv_size = sizeof(TransContext),
464};
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:97
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition aeval.c:246
const FFFilter ff_vf_transpose
static FILE * out
static AVFormatContext * ctx
int32_t
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition avassert.h:42
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition avfilter.c:1112
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition avfilter.c:1754
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition avfilter.c:890
Main libavfilter public API header.
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
#define s(width, name)
Definition cbs_vp9.c:198
#define FLAGS
Definition cmdutils.c:596
#define AV_CEIL_RSHIFT(a, b)
Definition common.h:60
#define NULL
Definition coverity.c:32
long long int64_t
Definition coverity.c:34
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
int ret
Definition ffplay.c:391
int ff_set_common_formats2(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out, AVFilterFormats *formats)
Definition formats.c:1200
int ff_add_format(AVFilterFormats **avff, int64_t fmt)
Add fmt to the list of media formats contained in *avff.
Definition formats.c:580
#define fail
Definition test.h:479
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition avfilter.h:172
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
Definition error.h:52
#define AVERROR(e)
Definition error.h:45
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition frame.c:65
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition frame.c:602
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition log.h:216
#define AV_LOG_VERBOSE
Detailed information.
Definition log.h:226
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
Definition rational.c:88
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
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.
Definition imgutils.c:35
misc image utilities
#define AV_WB24(p, d)
#define AV_COPY128U(d, s)
#define AV_WB48(p, darg)
#define AV_RB24(x)
#define AV_RB48(x)
const char * arg
Definition jacosubdec.c:66
#define transpose(x)
#define FILTER_INPUTS(array)
Definition filters.h:279
#define FILTER_OUTPUTS(array)
Definition filters.h:280
static int ff_slice_pos(int total, int jobnr, int nb_jobs)
Compute the boundary index for a slice when work of size total is split into nb_jobs slices.
Definition filters.h:813
#define AVFILTER_DEFINE_CLASS(fname)
Definition filters.h:493
#define FILTER_QUERY_FUNC2(func)
Definition filters.h:256
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:97
static enum AVPixelFormat pix_fmts[]
Definition libkvazaar.c:296
const char * desc
Definition libsvtav1.c:110
uint8_t w
Definition llvidencdsp.c:39
#define FFMIN(a, b)
Definition macros.h:49
AVOptions.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3524
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition pixdesc.c:3484
#define AV_PIX_FMT_FLAG_BITSTREAM
All values of a component are bit-wise packed end to end.
Definition pixdesc.h:124
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
Definition pixdesc.h:128
#define AV_PIX_FMT_FLAG_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
Definition pixdesc.h:120
Describe the class of an AVClass context structure.
Definition log.h:76
An instance of a filter.
Definition avfilter.h:279
void * priv
private data for use by the filter
Definition avfilter.h:294
Lists of formats / etc.
Definition avfilter.h:120
A list of supported formats for one end of a filter link.
Definition formats.h:64
A filter pad used for either input or output.
Definition filters.h:40
This structure describes decoded (raw) audio or video data.
Definition frame.h:479
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition frame.h:500
int height
Definition frame.h:551
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
Definition frame.h:576
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
Definition frame.h:524
AVOption.
Definition opt.h:428
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition pixdesc.h:80
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition pixdesc.h:89
uint8_t nb_components
The number of components each pixel has, (1-4)
Definition pixdesc.h:71
Rational number (pair of numerator and denominator).
Definition rational.h:58
int num
Numerator.
Definition rational.h:59
int den
Denominator.
Definition rational.h:60
Used for passing data between threads.
Definition v210dec.c:35
AVFrame * out
TransVtable vtables[4]
int pixsteps[4]
int passthrough
PassthroughType, landscape passthrough mode enabled.
int dir
TransposeDir.
void(* transpose_block)(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
Definition transpose.h:43
void(* transpose_8x8)(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
Definition transpose.h:41
#define av_log(a,...)
#define src
Definition vp8dsp.c:248
@ TRANSPOSE_CLOCK_FLIP
Definition transpose.h:34
@ TRANSPOSE_CCLOCK
Definition transpose.h:33
@ TRANSPOSE_CCLOCK_FLIP
Definition transpose.h:31
@ TRANSPOSE_CLOCK
Definition transpose.h:32
void ff_transpose_init_x86(TransVtable *v, int pixstep)
@ TRANSPOSE_PT_TYPE_NONE
Definition transpose.h:25
@ TRANSPOSE_PT_TYPE_PORTRAIT
Definition transpose.h:27
@ TRANSPOSE_PT_TYPE_LANDSCAPE
Definition transpose.h:26
static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int config_props_output(AVFilterLink *outlink)
static void hsub(htype *dst, const htype *src, int bins)
Definition vf_median.c:74
static void transpose_block_32_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static void transpose_8x8_32_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static void transpose_block_96_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static void transpose_8x8_96_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static void transpose_block_64_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)
static void transpose_8x8_64_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static void transpose_8x8_24_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static void transpose_block_128_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static const AVFilterPad avfilter_vf_transpose_inputs[]
static const AVOption transpose_options[]
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static void transpose_8x8_16_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static void transpose_8x8_128_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static void transpose_block_8_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static void transpose_block_24_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static void transpose_block_48_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static int config_props_output(AVFilterLink *outlink)
static void transpose_8x8_8_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
#define OFFSET(x)
static void transpose_block_16_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize, int w, int h)
static void transpose_8x8_48_c(uint8_t *src, ptrdiff_t src_linesize, uint8_t *dst, ptrdiff_t dst_linesize)
static const AVFilterPad avfilter_vf_transpose_outputs[]
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition video.c:44
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
Definition video.c:120
AVFrame * ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
Definition video.c:90
static int get_video_buffer(AVCodecContext *avctx, AVFrame *frame)
Definition zmbv.c:83