94 memset(ptr + y * linesize,
103 memcpy(ptr + y * linesize,
108 memcpy(ptr + y * linesize,
120 uint16_t *ptr = (uint16_t *)frame->
data[p];
121 int linesize = frame->
linesize[p] / 2;
125 ptr[y * linesize + x] = *(ptr + y * linesize + s->
borders[p].
left);
135 memcpy(ptr + y * linesize,
140 memcpy(ptr + y * linesize,
157 ptr[y * linesize + x] = ptr[y * linesize + s->
borders[p].
left * 2 - 1 - x];
167 memcpy(ptr + y * linesize,
168 ptr + (s->
borders[p].
top * 2 - 1 - y) * linesize,
185 uint16_t *ptr = (uint16_t *)frame->
data[p];
186 int linesize = frame->
linesize[p] / 2;
190 ptr[y * linesize + x] = ptr[y * linesize + s->
borders[p].
left * 2 - 1 - x];
200 memcpy(ptr + y * linesize,
201 ptr + (s->
borders[p].
top * 2 - 1 - y) * linesize,
223 memset(ptr + y * linesize, fill, s->
borders[p].
left);
229 memset(ptr + y * linesize, fill, s->
planewidth[p]);
233 memset(ptr + y * linesize, fill, s->
planewidth[p]);
243 uint16_t *ptr = (uint16_t *)frame->
data[p];
245 int linesize = frame->
linesize[p] / 2;
249 ptr[y * linesize + x] =
fill;
259 ptr[y * linesize + x] =
fill;
265 ptr[y * linesize + x] =
fill;
310 inlink->
w <= s->
left ||
313 inlink->
h <= s->
top ||
315 inlink->
w < s->
left * 2 ||
316 inlink->
w < s->
right * 2 ||
317 inlink->
h < s->
top * 2 ||
339 for (i = 0; i < 4; i++)
348 #define OFFSET(x) offsetof(FillBordersContext, x)
349 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
386 .
name =
"fillborders",
389 .priv_class = &fillborders_class,
391 .
inputs = fillborders_inputs,
392 .
outputs = fillborders_outputs,
AVFILTER_DEFINE_CLASS(fillborders)
#define AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P9
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
static const AVOption fillborders_options[]
#define AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_YUVA422P10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Main libavfilter public API header.
int h
agreed upon image height
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUV420P12
static void fixed_borders16(FillBordersContext *s, AVFrame *frame)
static const AVFilterPad fillborders_inputs[]
static void mirror_borders8(FillBordersContext *s, AVFrame *frame)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
#define AV_PIX_FMT_GRAY10
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
const char * name
Pad name.
#define AV_PIX_FMT_GRAY12
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static void mirror_borders16(FillBordersContext *s, AVFrame *frame)
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
#define AV_PIX_FMT_YUVA420P9
static void smear_borders16(FillBordersContext *s, AVFrame *frame)
static void fixed_borders8(FillBordersContext *s, AVFrame *frame)
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
#define AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUVA420P16
A filter pad used for either input or output.
A link between two filters.
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Various defines for YUV<->RGB conversion.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
#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
#define RGB_TO_U_CCIR(r1, g1, b1, shift)
#define AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_GBRAP16
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
#define AV_PIX_FMT_YUV422P9
uint8_t nb_components
The number of components each pixel has, (1-4)
#define AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GRAY16
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static void smear_borders8(FillBordersContext *s, AVFrame *frame)
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
static int config_input(AVFilterLink *inlink)
#define AV_PIX_FMT_YUVA444P10
static const AVFilterPad inputs[]
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_GBRP14
static const AVFilterPad outputs[]
int format
agreed upon media format
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P14
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_YUV420P10
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
static int query_formats(AVFilterContext *ctx)
Describe the class of an AVClass context structure.
static const AVFilterPad fillborders_outputs[]
void(* fillborders)(struct FillBordersContext *s, AVFrame *frame)
const char * name
Filter name.
#define AV_PIX_FMT_YUV440P12
#define AV_PIX_FMT_YUV420P9
AVFilterLink ** outputs
array of pointers to output links
static enum AVPixelFormat pix_fmts[]
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_GBRP12
#define flags(name, subs,...)
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
common internal and external API header
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_YUVA444P9
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
AVFilterContext * dst
dest filter
AVFilter ff_vf_fillborders
#define RGB_TO_V_CCIR(r1, g1, b1, shift)
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
int depth
Number of bits in the component.
#define RGB_TO_Y_CCIR(r, g, b)
AVPixelFormat
Pixel format.
mode
Use these values in ebur128_init (or'ed).
#define AV_PIX_FMT_YUV422P16
#define AV_CEIL_RSHIFT(a, b)