vf_scale.c File Reference

scale video filter More...

#include "avfilter.h"
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libswscale/swscale.h"

Go to the source code of this file.

Data Structures

struct  ScaleContext

Enumerations

enum  var_name {
  VAR_W, VAR_H, VAR_CW, VAR_CH,
  VAR_HSUB, VAR_VSUB, VARS_NB, VAR_E,
  VAR_PHI, VAR_PI, 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_N, VAR_POS, VAR_T, VAR_VARS_NB,
  VAR_E, VAR_PHI, VAR_PI, VAR_MAIN_W,
  VAR_MW, VAR_MAIN_H, VAR_MH, VAR_TEXT_W,
  VAR_TW, VAR_TEXT_H, VAR_TH, VAR_X,
  VAR_Y, VAR_N, VAR_T, VAR_VARS_NB,
  VAR_E, VAR_PHI, VAR_PI, VAR_W,
  VAR_H, VAR_VAL, VAR_MAXVAL, VAR_MINVAL,
  VAR_NEGVAL, VAR_CLIPVAL, VAR_VARS_NB, VAR_E,
  VAR_PHI, VAR_PI, VAR_MAIN_W, VAR_MW,
  VAR_MAIN_H, VAR_MH, VAR_OVERLAY_W, VAR_OW,
  VAR_OVERLAY_H, VAR_OH, VAR_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_X, VAR_Y,
  VAR_A, VAR_HSUB, VAR_VSUB, 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, VAR_HSUB, VAR_VSUB,
  VARS_NB, VAR_E, VAR_PHI, VAR_PI,
  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_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_N, VAR_SELECTED_N, VAR_PREV_SELECTED_N,
  VAR_KEY, VAR_POS, VAR_VARS_NB, VAR_E,
  VAR_INTERLACED, VAR_N, VAR_PHI, VAR_PI,
  VAR_POS, VAR_PREV_INPTS, VAR_PREV_OUTPTS, VAR_PTS,
  VAR_STARTPTS, VAR_TB, VAR_VARS_NB, VAR_E,
  VAR_PHI, VAR_PI, VAR_AVTB, VAR_INTB,
  VAR_VARS_NB, VAR_E, VAR_PHI, VAR_PI,
  VAR_AVTB, VAR_VARS_NB
}

Functions

static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
static av_cold void uninit (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static int config_props (AVFilterLink *outlink)
static void start_frame (AVFilterLink *link, AVFilterBufferRef *picref)
static void draw_slice (AVFilterLink *link, int y, int h, int slice_dir)

Variables

static const char * var_names []
AVFilter avfilter_vf_scale

Detailed Description

scale video filter

Definition in file vf_scale.c.

Enumeration Type Documentation

enum var_name
Enumerator:
VAR_W 
VAR_H 
VAR_CW 
VAR_CH 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
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_N 
VAR_POS 
VAR_T 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_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POS 
VAR_VARS_NB 
VAR_E 
VAR_INTERLACED 
VAR_N 
VAR_PHI 
VAR_PI 
VAR_POS 
VAR_PREV_INPTS 
VAR_PREV_OUTPTS 
VAR_PTS 
VAR_STARTPTS 
VAR_TB 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_AVTB 
VAR_INTB 
VAR_VARS_NB 
VAR_E 
VAR_PHI 
VAR_PI 
VAR_AVTB 
VAR_VARS_NB 

Definition at line 48 of file vf_scale.c.

Function Documentation

static int config_props ( AVFilterLink outlink)
static

Definition at line 137 of file vf_scale.c.

static void draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
)
static

Definition at line 262 of file vf_scale.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args,
void opaque 
)
static

Definition at line 82 of file vf_scale.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 107 of file vf_scale.c.

static void start_frame ( AVFilterLink link,
AVFilterBufferRef picref 
)
static

Definition at line 237 of file vf_scale.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 100 of file vf_scale.c.

Variable Documentation

AVFilter avfilter_vf_scale
Initial value:
{
.name = "scale",
.description = NULL_IF_CONFIG_SMALL("Scale the input video to width:height size and/or convert the image format."),
.init = init,
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(ScaleContext),
.inputs = (AVFilterPad[]) {{ .name = "default",
.start_frame = start_frame,
.draw_slice = draw_slice,
.min_perms = AV_PERM_READ, },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
.config_props = config_props, },
{ .name = NULL}},
}

Definition at line 290 of file vf_scale.c.

const char* var_names[]
static
Initial value:
{
"PI",
"PHI",
"E",
"in_w", "iw",
"in_h", "ih",
"out_w", "ow",
"out_h", "oh",
"a", "dar",
"sar",
"hsub",
"vsub",
}

Definition at line 33 of file vf_scale.c.

Referenced by config_props().