FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
vf_scale.c File Reference
#include <stdio.h>
#include <string.h>
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "scale_eval.h"
#include "video.h"
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
#include "libswscale/swscale.h"

Go to the source code of this file.

Data Structures

struct  ScaleContext
 

Macros

#define TS2T(ts, tb)   ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))
 
#define OFFSET(x)   offsetof(ScaleContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define TFLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Enumerations

enum  var_name {
  VAR_CH, VAR_N, VAR_NB_IN_CHANNELS, VAR_NB_OUT_CHANNELS,
  VAR_T, VAR_S, VAR_VARS_NB, VAR_W,
  VAR_H, VAR_CW, VAR_CH, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_VALUE1, VAR_VALUE2,
  VAR_VARS_NB, VAR_TB, VAR_PTS, VAR_START_PTS,
  VAR_PREV_PTS, VAR_PREV_SELECTED_PTS, VAR_T, VAR_START_T,
  VAR_PREV_T, VAR_PREV_SELECTED_T, VAR_PICT_TYPE, VAR_I,
  VAR_P, VAR_B, VAR_S, VAR_SI,
  VAR_SP, VAR_BI, VAR_PICT_TYPE_I, VAR_PICT_TYPE_P,
  VAR_PICT_TYPE_B, VAR_PICT_TYPE_S, VAR_PICT_TYPE_SI, VAR_PICT_TYPE_SP,
  VAR_PICT_TYPE_BI, VAR_INTERLACE_TYPE, VAR_INTERLACE_TYPE_P, VAR_INTERLACE_TYPE_T,
  VAR_INTERLACE_TYPE_B, VAR_CONSUMED_SAMPLES_N, VAR_SAMPLES_N, VAR_SAMPLE_RATE,
  VAR_N, VAR_SELECTED_N, VAR_PREV_SELECTED_N, VAR_KEY,
  VAR_POS, VAR_SCENE, VAR_CONCATDEC_SELECT, VAR_VARS_NB,
  VAR_N, VAR_T, VAR_POS, VAR_PTS,
  VAR_TS, VAR_TE, VAR_TI, VAR_VARS_NB,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VAR_OHSUB, VAR_OVSUB, VARS_NB,
  VAR_FRAME_RATE, VAR_INTERLACED, VAR_N, VAR_NB_CONSUMED_SAMPLES,
  VAR_NB_SAMPLES, VAR_POS, VAR_PREV_INPTS, VAR_PREV_INT,
  VAR_PREV_OUTPTS, VAR_PREV_OUTT, VAR_PTS, VAR_SAMPLE_RATE,
  VAR_STARTPTS, VAR_STARTT, VAR_T, VAR_TB,
  VAR_RTCTIME, VAR_RTCSTART, VAR_S, VAR_SR,
  VAR_FR, VAR_VARS_NB, VAR_AVTB, VAR_INTB,
  VAR_SR, VAR_VARS_NB, VAR_W, VAR_H,
  VAR_A, VAR_DAR, VAR_SAR, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_A, VAR_SAR,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VAR_X,
  VAR_Y, VAR_N, VAR_POS, VAR_T,
  VAR_VARS_NB, VAR_X, VAR_Y, VAR_W,
  VAR_H, VAR_N, VAR_T, VAR_VARS_NB,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VAR_IN_H,
  VAR_IH, VAR_IN_W, VAR_IW, VAR_SAR,
  VAR_X, VAR_Y, VAR_H, VAR_W,
  VAR_T, VAR_MAX, VARS_NB, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_LINE_H, VAR_LH,
  VAR_MAIN_H, VAR_h, VAR_H, VAR_MAIN_W,
  VAR_w, VAR_W, VAR_MAX_GLYPH_A, VAR_ASCENT,
  VAR_MAX_GLYPH_D, VAR_DESCENT, VAR_MAX_GLYPH_H, VAR_MAX_GLYPH_W,
  VAR_N, VAR_SAR, VAR_T, VAR_TEXT_H,
  VAR_TH, VAR_TEXT_W, VAR_TW, VAR_X,
  VAR_Y, VAR_PICT_TYPE, VAR_PKT_POS, VAR_PKT_DURATION,
  VAR_PKT_SIZE, VAR_VARS_NB, VAR_N, VAR_POS,
  VAR_R, VAR_T, VAR_NB, VAR_N,
  VAR_PTS, VAR_R, VAR_T, VAR_TB,
  VAR_NB, VAR_W, VAR_H, VAR_VAL,
  VAR_MAXVAL, VAR_MINVAL, VAR_NEGVAL, VAR_CLIPVAL,
  VAR_VARS_NB, VAR_W, VAR_H, VAR_X,
  VAR_Y, VAR_BITDEPTHX, VAR_BITDEPTHY, VAR_VARS_NB,
  VAR_MAIN_W, VAR_MW, VAR_MAIN_H, VAR_MH,
  VAR_OVERLAY_W, VAR_OW, VAR_OVERLAY_H, VAR_OH,
  VAR_HSUB, VAR_VSUB, VAR_X, VAR_Y,
  VAR_N, VAR_POS, VAR_T, VAR_VARS_NB,
  VAR_MAIN_iW, VAR_MW, VAR_MAIN_iH, VAR_MH,
  VAR_OVERLAY_iW, VAR_OVERLAY_iH, VAR_OVERLAY_X, VAR_OX,
  VAR_OVERLAY_Y, VAR_OY, VAR_OVERLAY_W, VAR_OW,
  VAR_OVERLAY_H, VAR_OH, VAR_VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_X,
  VAR_Y, VAR_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_X,
  VAR_Y, VAR_A, VAR_SAR, VAR_DAR,
  VARS_NB, VAR_W, VAR_H, VAR_VAL,
  VAR_YMIN, VAR_UMIN, VAR_VMIN, VAR_AMIN,
  VAR_YMAX, VAR_UMAX, VAR_VMAX, VAR_AMAX,
  VAR_VARS_NB, VAR_IN_W, VAR_IW, VAR_IN_H,
  VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H,
  VAR_OH, VAR_HSUB, VAR_VSUB, VAR_N,
  VAR_T, VAR_VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_A, VAR_SAR,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VAR_OHSUB,
  VAR_OVSUB, VAR_N, VAR_T, VAR_POS,
  VAR_S2R_MAIN_W, VAR_S2R_MAIN_H, VAR_S2R_MAIN_A, VAR_S2R_MAIN_SAR,
  VAR_S2R_MAIN_DAR, VAR_S2R_MDAR, VAR_S2R_MAIN_HSUB, VAR_S2R_MAIN_VSUB,
  VAR_S2R_MAIN_N, VAR_S2R_MAIN_T, VAR_S2R_MAIN_POS, VARS_NB,
  VAR_PI, VAR_PHI, VAR_E, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_DAR, VAR_SAR, VARS_NB, VAR_W,
  VAR_H, VAR_N, VAR_PTS, VAR_R,
  VAR_T, VAR_TB, VAR_NB, VAR_iW,
  VAR_IN_W, VAR_iH, VAR_IN_H, VAR_oW,
  VAR_OUT_W, VAR_W, VAR_oH, VAR_OUT_H,
  VAR_H, CW, CH, CX,
  CY, VAR_VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_IN, VAR_ON,
  VAR_DURATION, VAR_PDURATION, VAR_TIME, VAR_FRAME,
  VAR_ZOOM, VAR_PZOOM, VAR_X, VAR_PX,
  VAR_Y, VAR_PY, VAR_A, VAR_SAR,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VARS_NB,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VAR_OHSUB, VAR_OVSUB, VARS_NB,
  VAR_X, VAR_Y, VAR_W, VAR_H,
  VAR_TIME, VAR_SPEED, VAR_TEMPO, VAR_ORDER,
  VAR_PATTERN, VAR_ROW, VAR_VARS_NB
}
 
enum  EvalMode {
  EVAL_MODE_ONCE, EVAL_MODE_FRAME, EVAL_MODE_NB, EVAL_MODE_INIT,
  EVAL_MODE_FRAME, EVAL_MODE_NB, EVAL_MODE_INIT, EVAL_MODE_FRAME,
  EVAL_MODE_NB, EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB,
  EVAL_MODE_INIT, EVAL_MODE_FRAME, EVAL_MODE_NB, EVAL_MODE_INIT,
  EVAL_MODE_FRAME, EVAL_MODE_NB, EVAL_MODE_INIT, EVAL_MODE_FRAME,
  EVAL_MODE_NB
}
 

Functions

static int config_props (AVFilterLink *outlink)
 
static int check_exprs (AVFilterContext *ctx)
 
static int scale_parse_expr (AVFilterContext *ctx, char *str_expr, AVExpr **pexpr_ptr, const char *var, const char *args)
 
static av_cold int init_dict (AVFilterContext *ctx, AVDictionary **opts)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static const intparse_yuv_type (const char *s, enum AVColorSpace colorspace)
 
static int scale_eval_dimensions (AVFilterContext *ctx)
 
static int config_props_ref (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 
static int request_frame_ref (AVFilterLink *outlink)
 
static int scale_slice (AVFilterLink *link, AVFrame *out_buf, AVFrame *cur_pic, struct SwsContext *sws, int y, int h, int mul, int field)
 
static int scale_frame (AVFilterLink *link, AVFrame *in, AVFrame **frame_out)
 
static int filter_frame (AVFilterLink *link, AVFrame *in)
 
static int filter_frame_ref (AVFilterLink *link, AVFrame *in)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
static const AVClasschild_class_next (const AVClass *prev)
 

Variables

static const char *const var_names []
 
AVFilter ff_vf_scale2ref
 
static const AVOption scale_options []
 
static const AVClass scale_class
 
static const AVFilterPad avfilter_vf_scale_inputs []
 
static const AVFilterPad avfilter_vf_scale_outputs []
 
AVFilter ff_vf_scale
 
static const AVClass scale2ref_class
 
static const AVFilterPad avfilter_vf_scale2ref_inputs []
 
static const AVFilterPad avfilter_vf_scale2ref_outputs []
 

Detailed Description

scale video filter

Definition in file vf_scale.c.

Macro Definition Documentation

◆ TS2T

#define TS2T (   ts,
  tb 
)    ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb))

Definition at line 650 of file vf_scale.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(ScaleContext, x)

Definition at line 890 of file vf_scale.c.

◆ FLAGS

Definition at line 891 of file vf_scale.c.

◆ TFLAGS

Definition at line 892 of file vf_scale.c.

Enumeration Type Documentation

◆ var_name

enum var_name
Enumerator
VAR_CH 
VAR_N 
VAR_NB_IN_CHANNELS 
VAR_NB_OUT_CHANNELS 
VAR_T 
VAR_S 
VAR_VARS_NB 
VAR_W 
VAR_H 
VAR_CW 
VAR_CH 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_VALUE1 
VAR_VALUE2 
VAR_VARS_NB 
VAR_TB 
VAR_PTS 
VAR_START_PTS 
VAR_PREV_PTS 
VAR_PREV_SELECTED_PTS 
VAR_T 
VAR_START_T 
VAR_PREV_T 
VAR_PREV_SELECTED_T 
VAR_PICT_TYPE 
VAR_I 
VAR_P 
VAR_B 
VAR_S 
VAR_SI 
VAR_SP 
VA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_MODE_NB 
EVAL_MODE_INIT 
EVAL_MODE_FRAME 
EVAL_MODE_NB 

Definition at line 101 of file vf_scale.c.

Function Documentation

◆ config_props()

static int config_props ( AVFilterLink outlink)
static

Definition at line 481 of file vf_scale.c.

Referenced by scale_frame(), and scale_parse_expr().

◆ check_exprs()

static int check_exprs ( AVFilterContext ctx)
static

Definition at line 162 of file vf_scale.c.

Referenced by scale_parse_expr().

◆ scale_parse_expr()

static int scale_parse_expr ( AVFilterContext ctx,
char *  str_expr,
AVExpr **  pexpr_ptr,
const char *  var,
const char *  args 
)
static

Definition at line 220 of file vf_scale.c.

Referenced by init_dict(), process_command(), and scale_frame().

◆ init_dict()

static av_cold int init_dict ( AVFilterContext ctx,
AVDictionary **  opts 
)
static

Definition at line 273 of file vf_scale.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 331 of file vf_scale.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 344 of file vf_scale.c.

◆ parse_yuv_type()

static const int* parse_yuv_type ( const char *  s,
enum AVColorSpace  colorspace 
)
static

Definition at line 382 of file vf_scale.c.

Referenced by scale_frame().

◆ scale_eval_dimensions()

static int scale_eval_dimensions ( AVFilterContext ctx)
static

Definition at line 406 of file vf_scale.c.

Referenced by config_props().

◆ config_props_ref()

static int config_props_ref ( AVFilterLink outlink)
static

Definition at line 603 of file vf_scale.c.

Referenced by filter_frame_ref().

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 616 of file vf_scale.c.

◆ request_frame_ref()

static int request_frame_ref ( AVFilterLink outlink)
static

Definition at line 621 of file vf_scale.c.

◆ scale_slice()

static int scale_slice ( AVFilterLink link,
AVFrame out_buf,
AVFrame cur_pic,
struct SwsContext sws,
int  y,
int  h,
int  mul,
int  field 
)
static

Definition at line 626 of file vf_scale.c.

Referenced by scale_frame().

◆ scale_frame()

static int scale_frame ( AVFilterLink link,
AVFrame in,
AVFrame **  frame_out 
)
static

Definition at line 652 of file vf_scale.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 815 of file vf_scale.c.

◆ filter_frame_ref()

static int filter_frame_ref ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 829 of file vf_scale.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 860 of file vf_scale.c.

◆ child_class_next()

static const AVClass* child_class_next ( const AVClass prev)
static

Definition at line 885 of file vf_scale.c.

Variable Documentation

◆ var_names

const char* const var_names[]
static
Initial value:
= {
"in_w", "iw",
"in_h", "ih",
"out_w", "ow",
"out_h", "oh",
"a",
"sar",
"dar",
"hsub",
"vsub",
"ohsub",
"ovsub",
"n",
"t",
"pos",
"main_w",
"main_h",
"main_a",
"main_sar",
"main_dar", "mdar",
"main_hsub",
"main_vsub",
"main_n",
"main_t",
"main_pos",
}

Definition at line 45 of file vf_scale.c.

Referenced by scale_parse_expr().

◆ ff_vf_scale2ref

AVFilter ff_vf_scale2ref
Initial value:
= {
.name = "scale2ref",
.description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format to the given reference."),
.init_dict = init_dict,
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(ScaleContext),
.priv_class = &scale2ref_class,
}

Definition at line 158 of file vf_scale.c.

Referenced by check_exprs(), config_props(), scale_eval_dimensions(), and scale_frame().

◆ scale_options

const AVOption scale_options[]
static

Definition at line 894 of file vf_scale.c.

◆ scale_class

const AVClass scale_class
static
Initial value:
= {
.class_name = "scale",
.item_name = av_default_item_name,
.option = scale_options,
.child_class_next = child_class_next,
}

Definition at line 941 of file vf_scale.c.

◆ avfilter_vf_scale_inputs

const AVFilterPad avfilter_vf_scale_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 950 of file vf_scale.c.

◆ avfilter_vf_scale_outputs

const AVFilterPad avfilter_vf_scale_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
},
{ NULL }
}

Definition at line 959 of file vf_scale.c.

◆ ff_vf_scale

AVFilter ff_vf_scale
Initial value:
= {
.name = "scale",
.description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format."),
.init_dict = init_dict,
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(ScaleContext),
.priv_class = &scale_class,
}

Definition at line 968 of file vf_scale.c.

◆ scale2ref_class

const AVClass scale2ref_class
static
Initial value:
= {
.class_name = "scale2ref",
.item_name = av_default_item_name,
.option = scale_options,
.child_class_next = child_class_next,
}

Definition at line 981 of file vf_scale.c.

◆ avfilter_vf_scale2ref_inputs

const AVFilterPad avfilter_vf_scale2ref_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{
.name = "ref",
.filter_frame = filter_frame_ref,
},
{ NULL }
}

Definition at line 990 of file vf_scale.c.

◆ avfilter_vf_scale2ref_outputs

const AVFilterPad avfilter_vf_scale2ref_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
.request_frame= request_frame,
},
{
.name = "ref",
.config_props = config_props_ref,
.request_frame= request_frame_ref,
},
{ NULL }
}

Definition at line 1004 of file vf_scale.c.

filter_frame_ref
static int filter_frame_ref(AVFilterLink *link, AVFrame *in)
Definition: vf_scale.c:829
config_props_ref
static int config_props_ref(AVFilterLink *outlink)
Definition: vf_scale.c:603
ScaleContext
Definition: vf_scale.c:107
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_scale.c:344
avfilter_vf_scale2ref_outputs
static const AVFilterPad avfilter_vf_scale2ref_outputs[]
Definition: vf_scale.c:1004
request_frame_ref
static int request_frame_ref(AVFilterLink *outlink)
Definition: vf_scale.c:621
scale2ref_class
static const AVClass scale2ref_class
Definition: vf_scale.c:981
request_frame
static int request_frame(AVFilterLink *outlink)
Definition: vf_scale.c:616
avfilter_vf_scale_inputs
static const AVFilterPad avfilter_vf_scale_inputs[]
Definition: vf_scale.c:950
init_dict
static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts)
Definition: vf_scale.c:273
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: vf_scale.c:860
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
inputs
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:243
AV_CLASS_CATEGORY_FILTER
@ AV_CLASS_CATEGORY_FILTER
Definition: log.h:37
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
filter_frame
static int filter_frame(AVFilterLink *link, AVFrame *in)
Definition: vf_scale.c:815
config_props
static int config_props(AVFilterLink *outlink)
Definition: vf_scale.c:481
avfilter_vf_scale_outputs
static const AVFilterPad avfilter_vf_scale_outputs[]
Definition: vf_scale.c:959
child_class_next
static const AVClass * child_class_next(const AVClass *prev)
Definition: vf_scale.c:885
scale_options
static const AVOption scale_options[]
Definition: vf_scale.c:894
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_scale.c:331
avfilter_vf_scale2ref_inputs
static const AVFilterPad avfilter_vf_scale2ref_inputs[]
Definition: vf_scale.c:990
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
scale_class
static const AVClass scale_class
Definition: vf_scale.c:941