FFmpeg
|
vf_pad.c File Reference
video padding filter More...
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/pixdesc.h"
#include "libavutil/colorspace.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/mathematics.h"
#include "drawutils.h"
Include dependency graph for vf_pad.c:
Go to the source code of this file.
Data Structures | |
struct | PadContext |
Macros | |
#define | SIGN(x) ((x) > 0 ? 1 : -1) |
#define | OFFSET(x) offsetof(PadContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Functions | |
static int | query_formats (AVFilterContext *ctx) |
static av_cold int | init (AVFilterContext *ctx) |
static int | config_input (AVFilterLink *inlink) |
static int | config_output (AVFilterLink *outlink) |
static AVFrame * | get_video_buffer (AVFilterLink *inlink, int w, int h) |
static int | buffer_needs_copy (PadContext *s, AVFrame *frame, AVBufferRef *buf) |
static int | frame_needs_copy (PadContext *s, AVFrame *frame) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
AVFILTER_DEFINE_CLASS (pad) | |
Variables | |
static const char *const | var_names [] |
static const AVOption | pad_options [] |
static const AVFilterPad | avfilter_vf_pad_inputs [] |
static const AVFilterPad | avfilter_vf_pad_outputs [] |
AVFilter | avfilter_vf_pad |
Detailed Description
video padding filter
Definition in file vf_pad.c.
Macro Definition Documentation
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#define OFFSET | ( | x | ) | offsetof(PadContext, x) |
Referenced by buffer_needs_copy().
Enumeration Type Documentation
enum var_name |
Function Documentation
AVFILTER_DEFINE_CLASS | ( | pad | ) |
|
static |
Definition at line 239 of file vf_pad.c.
Referenced by frame_needs_copy().
|
static |
|
static |
|
static |
|
static |
Definition at line 292 of file vf_pad.c.
Referenced by filter_frame().
|
static |
|
static |
|
static |
Variable Documentation
AVFilter avfilter_vf_pad |
Initial value:
= {
.name = "pad",
.description = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."),
.priv_size = sizeof(PadContext),
.priv_class = &pad_class,
}
Definition: vf_pad.c:81
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:216
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = get_video_buffer,
.filter_frame = filter_frame,
},
{ NULL }
}
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)
Definition: vf_pad.c:213
Definition: avutil.h:143
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
},
{ NULL }
}
Definition: avutil.h:143
|
static |
Initial value:
= {
{ "width", "set the pad area width expression", OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "w", "set the pad area width expression", OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "height", "set the pad area height expression", OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "h", "set the pad area height expression", OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "x", "set the x offset expression for the input image position", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "y", "set the y offset expression for the input image position", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "color", "set the color of the padded area border", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str = "black"}, .flags = FLAGS },
{ NULL },
}
Definition: opt.h:226
Generated on Mon Nov 18 2024 06:52:10 for FFmpeg by 1.8.11