94 int i, j, plane,
step, hsub, vsub;
103 for (plane = 0; plane < 4 && in->
data[plane]; plane++) {
105 hsub = (plane == 1 || plane == 2) ? flip->
hsub : 0;
106 vsub = (plane == 1 || plane == 2) ? flip->
vsub : 0;
108 outrow = out->
data[plane];
109 inrow = in ->
data[plane] + ((inlink->
w >> hsub) - 1) *
step;
110 for (i = 0; i < in->
video->
h >> vsub; i++) {
113 for (j = 0; j < (inlink->
w >> hsub); j++)
114 outrow[j] = inrow[-j];
119 uint16_t *outrow16 = (uint16_t *)outrow;
120 uint16_t * inrow16 = (uint16_t *) inrow;
121 for (j = 0; j < (inlink->
w >> hsub); j++)
122 outrow16[j] = inrow16[-j];
130 for (j = 0; j < (inlink->
w >> hsub); j++, out += 3, in -= 3) {
139 uint32_t *outrow32 = (uint32_t *)outrow;
140 uint32_t * inrow32 = (uint32_t *) inrow;
141 for (j = 0; j < (inlink->
w >> hsub); j++)
142 outrow32[j] = inrow32[-j];
147 for (j = 0; j < (inlink->
w >> hsub); j++)
148 memcpy(outrow + j*step, inrow - j*step, step);
185 .
inputs = avfilter_vf_hflip_inputs,
186 .
outputs = avfilter_vf_hflip_outputs,
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
int max_step[4]
max pixel step for each plane, expressed as a number of bytes
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.
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.
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
8 bit with PIX_FMT_RGB32 palette
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
static const AVFilterPad avfilter_vf_hflip_outputs[]
void avfilter_unref_bufferp(AVFilterBufferRef **ref)
Remove a reference to a buffer and set the pointer to NULL.
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 ...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of PIX_FMT_YUV422P and setting color_...
static int config_props(AVFilterLink *inlink)
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.
static int query_formats(AVFilterContext *ctx)
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...
void * priv
private data for use by the filter
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 RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
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
static const AVFilterPad avfilter_vf_hflip_inputs[]
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_...
AVFilter avfilter_vf_hflip
packed RGB 8:8:8, 24bpp, BGRBGR...
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
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[]
const char * name
filter name
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)
void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src)
Copy properties of src to dst, without copying the actual data.
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
static void flip(AVCodecContext *avctx, AVPicture *picture)
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
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)
int vsub
chroma subsampling
AVPixelFormat
Pixel format.