86 uint8_t *inrow, *outrow;
87 int i, j, plane,
step, hsub, vsub;
89 for (plane = 0; plane < 4 && inpic->
data[plane]; plane++) {
91 hsub = (plane == 1 || plane == 2) ? flip->
hsub : 0;
92 vsub = (plane == 1 || plane == 2) ? flip->
vsub : 0;
94 outrow = outpic->
data[plane] + (y>>vsub) * outpic->
linesize[plane];
95 inrow = inpic ->
data[plane] + (y>>vsub) * inpic ->
linesize[plane] + ((inlink->
w >> hsub) - 1) *
step;
96 for (i = 0; i < h>>vsub; i++) {
100 for (j = 0; j < (inlink->
w >> hsub); j++)
101 outrow[j] = inrow[-j];
107 uint16_t *outrow16 = (uint16_t *)outrow;
108 uint16_t * inrow16 = (uint16_t *) inrow;
109 for (j = 0; j < (inlink->
w >> hsub); j++)
110 outrow16[j] = inrow16[-j];
117 uint8_t *out = outrow;
118 for (j = 0; j < (inlink->
w >> hsub); j++, out += 3, in -= 3) {
127 uint32_t *outrow32 = (uint32_t *)outrow;
128 uint32_t * inrow32 = (uint32_t *) inrow;
129 for (j = 0; j < (inlink->
w >> hsub); j++)
130 outrow32[j] = inrow32[-j];
135 for (j = 0; j < (inlink->
w >> hsub); j++)
136 memcpy(outrow + j*step, inrow - j*step, step);
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int max_step[4]
max pixel step for each plane, expressed as a number of bytes
int linesize[8]
number of bytes per line
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)
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_...
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)
static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
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_...
static int config_props(AVFilterLink *inlink)
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
A filter pad used for either input or output.
Y , 16bpp, little-endian.
A link between two filters.
static int query_formats(AVFilterContext *ctx)
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. ...
void * priv
private data for use by the filter
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, 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
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)
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
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 ...
AVFilter avfilter_vf_hflip
void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
Send a slice to the next filter.
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
int format
agreed upon media format
A reference to an AVFilterBuffer.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0 ...
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 ...
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
const char * name
filter name
packed RGB 8:8:8, 24bpp, BGRBGR...
AVFilterLink ** outputs
array of pointers to output links
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_RB24
static void flip(AVCodecContext *avctx, AVPicture *picture)
8 bit with PIX_FMT_RGB32 palette
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...
int vsub
chroma subsampling
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)