50 sscanf(args,
"%d", &trans->
dir);
52 if (trans->
dir < 0 || trans->
dir > 3) {
102 outlink->
w = inlink->
h;
103 outlink->
h = inlink->
w;
111 inlink->
w, inlink->
h, trans->
dir, outlink->
w, outlink->
h,
112 trans->
dir == 1 || trans->
dir == 3 ?
"clockwise" :
"counterclockwise",
113 trans->
dir == 0 || trans->
dir == 3);
122 outlink->
w, outlink->
h);
143 for (plane = 0; outpic->
data[plane]; plane++) {
144 int hsub = plane == 1 || plane == 2 ? trans->
hsub : 0;
145 int vsub = plane == 1 || plane == 2 ? trans->
vsub : 0;
146 int pixstep = trans->
pixsteps[plane];
147 int inh = inpic->
video->
h>>vsub;
148 int outw = outpic->
video->
w>>hsub;
149 int outh = outpic->
video->
h>>vsub;
151 int outlinesize, inlinesize;
154 out = outpic->
data[plane]; outlinesize = outpic->
linesize[plane];
155 in = inpic ->
data[plane]; inlinesize = inpic ->
linesize[plane];
158 in += inpic->
linesize[plane] * (inh-1);
163 out += outpic->
linesize[plane] * (outh-1);
167 for (y = 0; y < outh; y++) {
170 for (x = 0; x < outw; x++)
171 out[x] = in[x*inlinesize + y];
174 for (x = 0; x < outw; x++)
175 *((uint16_t *)(out + 2*x)) = *((uint16_t *)(in + x*inlinesize + y*2));
178 for (x = 0; x < outw; x++) {
179 int32_t
v =
AV_RB24(in + x*inlinesize + y*3);
184 for (x = 0; x < outw; x++)
185 *((uint32_t *)(out + 4*x)) = *((uint32_t *)(in + x*inlinesize + y*4));
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
AVFilterBufferRef * avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
Request a picture buffer with a specific set of permissions.
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
AVFilterBufferRefVideoProps * video
video buffer specific properties
int linesize[8]
number of bytes per line
int h
agreed upon image height
AVFilterBufferRef * out_buf
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV422P and setting color_...
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
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
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV444P and setting color_...
AVFilterLink ** inputs
array of pointers to input links
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1 ...
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
void avfilter_end_frame(AVFilterLink *link)
Notifie the next filter that the current frame has finished.
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV420P and setting color_...
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
AVFilter avfilter_vf_transpose
AVRational pixel_aspect
pixel aspect ratio
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
int64_t pts
presentation timestamp.
A filter pad used for either input or output.
Y , 16bpp, little-endian.
A link between two filters.
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
void * priv
private data for use by the filter
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
void av_log(void *avcl, int level, const char *fmt,...)
AVFilterFormats * avfilter_make_format_list(const int *fmts)
Create a list of supported formats.
const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB]
The array of all the pixel format descriptors.
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
int w
agreed upon image width
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of PIX_FMT_YUV440P and setting color_range ...
static int query_formats(AVFilterContext *ctx)
AVFilterContext * src
source filter
void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
Send a slice to the next filter.
as above, but U and V bytes are swapped
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
int format
agreed upon media format
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
A reference to an AVFilterBuffer.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static void end_frame(AVFilterLink *inlink)
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
AVFilterBufferRef * avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
Add a new reference to a buffer.
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0 ...
packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1 ...
rational number numerator/denominator
void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
Notify the next filter of the start of a frame.
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
const char * name
filter name
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
packed RGB 8:8:8, 24bpp, BGRBGR...
AVFilterLink ** outputs
array of pointers to output links
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_RB24
#define AV_PERM_WRITE
can write to the buffer
packed RGB 8:8:8, 24bpp, RGBRGB...
AVFilterContext * dst
dest filter
uint8_t * data[8]
picture/audio data for each plane
AVFilterBufferRef * cur_buf
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
static int config_props_output(AVFilterLink *outlink)
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)