FFmpeg
|
vf_crop.c File Reference
video crop filter More...
#include <stdio.h>
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "libavutil/eval.h"
#include "libavutil/avstring.h"
#include "libavutil/internal.h"
#include "libavutil/libm.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
Include dependency graph for vf_crop.c:
Go to the source code of this file.
Data Structures | |
struct | CropContext |
Macros | |
#define | OFFSET(x) offsetof(CropContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Functions | |
static int | query_formats (AVFilterContext *ctx) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | normalize_double (int *n, double d) |
static int | config_input (AVFilterLink *link) |
static int | config_output (AVFilterLink *link) |
static int | filter_frame (AVFilterLink *link, AVFrame *frame) |
AVFILTER_DEFINE_CLASS (crop) | |
Variables | |
static const char *const | var_names [] |
static const AVOption | crop_options [] |
static const AVFilterPad | avfilter_vf_crop_inputs [] |
static const AVFilterPad | avfilter_vf_crop_outputs [] |
AVFilter | avfilter_vf_crop |
Detailed Description
video crop filter
Definition in file vf_crop.c.
Macro Definition Documentation
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#define OFFSET | ( | x | ) | offsetof(CropContext, x) |
Enumeration Type Documentation
enum var_name |
Function Documentation
AVFILTER_DEFINE_CLASS | ( | crop | ) |
|
static |
|
static |
|
static |
|
inlinestatic |
Definition at line 136 of file vf_crop.c.
Referenced by config_input(), and filter_frame().
|
static |
|
static |
Variable Documentation
AVFilter avfilter_vf_crop |
Initial value:
= {
.name = "crop",
.description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."),
.priv_size = sizeof(CropContext),
.priv_class = &crop_class,
}
static const AVFilterPad avfilter_vf_crop_outputs[]
Definition: vf_crop.c:334
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
Definition: vf_crop.c:78
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,
.filter_frame = filter_frame,
.get_video_buffer = ff_null_get_video_buffer,
.config_props = config_input,
},
{ NULL }
}
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:35
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:
= {
{ "out_w", "set the width crop area expression", OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "w", "set the width crop area expression", OFFSET(w_expr), AV_OPT_TYPE_STRING, {.str = "iw"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "out_h", "set the height crop area expression", OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "h", "set the height crop area expression", OFFSET(h_expr), AV_OPT_TYPE_STRING, {.str = "ih"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "x", "set the x crop area expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = "(in_w-out_w)/2"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "y", "set the y crop area expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = "(in_h-out_h)/2"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "keep_aspect", "keep aspect ratio", OFFSET(keep_aspect), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS },
{NULL}
}
Definition: opt.h:222
Definition: opt.h:226
Generated on Mon Nov 18 2024 06:52:09 for FFmpeg by 1.8.11