95 memset(ptr + y * linesize,
104 memcpy(ptr + y * linesize,
109 memcpy(ptr + y * linesize,
121 uint16_t *ptr = (uint16_t *)frame->
data[p];
122 int linesize = frame->
linesize[p] / 2;
126 ptr[y * linesize + x] = *(ptr + y * linesize + s->
borders[p].
left);
136 memcpy(ptr + y * linesize,
141 memcpy(ptr + y * linesize,
158 ptr[y * linesize + x] = ptr[y * linesize + s->
borders[p].
left * 2 - 1 - x];
168 memcpy(ptr + y * linesize,
169 ptr + (s->
borders[p].
top * 2 - 1 - y) * linesize,
186 uint16_t *ptr = (uint16_t *)frame->
data[p];
187 int linesize = frame->
linesize[p] / 2;
191 ptr[y * linesize + x] = ptr[y * linesize + s->
borders[p].
left * 2 - 1 - x];
201 memcpy(ptr + y * linesize,
202 ptr + (s->
borders[p].
top * 2 - 1 - y) * linesize,
224 memset(ptr + y * linesize, fill, s->
borders[p].
left);
230 memset(ptr + y * linesize, fill, s->
planewidth[p]);
234 memset(ptr + y * linesize, fill, s->
planewidth[p]);
244 uint16_t *ptr = (uint16_t *)frame->
data[p];
246 int linesize = frame->
linesize[p] / 2;
250 ptr[y * linesize + x] =
fill;
260 ptr[y * linesize + x] =
fill;
266 ptr[y * linesize + x] =
fill;
296 inlink->
w <= s->
left ||
299 inlink->
h <= s->
top ||
301 inlink->
w < s->
left * 2 ||
302 inlink->
w < s->
right * 2 ||
303 inlink->
h < s->
top * 2 ||
340 for (i = 0; i < 4; i++)
350 char *res,
int res_len,
int flags)
361 #define OFFSET(x) offsetof(FillBordersContext, x) 362 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM 399 .
name =
"fillborders",
402 .priv_class = &fillborders_class,
404 .
inputs = fillborders_inputs,
405 .
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
AVFilterLink ** inputs
array of pointers to input links
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 int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
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 i(width, name, range_min, range_max)
#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. ...
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options...
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)
#define AV_PIX_FMT_YUVA444P12
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
typedef void(RENAME(mix_any_func_type))
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[]
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)
void(* fillborders)(struct FillBordersContext *s, AVFrame *frame)
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_PIX_FMT_YUVA422P12
#define AV_CEIL_RSHIFT(a, b)