libavfilter/vf_pad.c File Reference

video padding filter More...

#include "avfilter.h"
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/pixdesc.h"
#include "libavutil/colorspace.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/parseutils.h"
#include "drawutils.h"

Go to the source code of this file.

Data Structures

struct  PadContext

Enumerations

enum  var_name {
  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_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_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 int query_formats (AVFilterContext *ctx)
static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
static av_cold void uninit (AVFilterContext *ctx)
static int config_input (AVFilterLink *inlink)
static int config_output (AVFilterLink *outlink)
static AVFilterBufferRefget_video_buffer (AVFilterLink *inlink, int perms, int w, int h)
static int does_clip (PadContext *pad, AVFilterBufferRef *outpicref, int plane, int hsub, int vsub, int x, int y)
static void start_frame (AVFilterLink *inlink, AVFilterBufferRef *inpicref)
static void end_frame (AVFilterLink *link)
static void draw_send_bar_slice (AVFilterLink *link, int y, int h, int slice_dir, int before_slice)
static void draw_slice (AVFilterLink *link, int y, int h, int slice_dir)

Variables

static const char * var_names []
AVFilter avfilter_vf_pad


Detailed Description

video padding filter

Definition in file vf_pad.c.


Enumeration Type Documentation

enum var_name

Enumerator:
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_W 
VAR_H 
VAR_VAL 
VAR_MAXVAL 
VAR_MINVAL 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PHI 
VAR_PI 
VAR_AVTB 
VAR_VARS_NB 

Definition at line 53 of file vf_pad.c.


Function Documentation

static int config_input ( AVFilterLink inlink  )  [static]

Definition at line 138 of file vf_pad.c.

static int config_output ( AVFilterLink outlink  )  [static]

Definition at line 243 of file vf_pad.c.

static int does_clip ( PadContext pad,
AVFilterBufferRef outpicref,
int  plane,
int  hsub,
int  vsub,
int  x,
int  y 
) [static]

Definition at line 275 of file vf_pad.c.

Referenced by start_frame().

static void draw_send_bar_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir,
int  before_slice 
) [static]

Definition at line 347 of file vf_pad.c.

Referenced by draw_slice().

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

Definition at line 371 of file vf_pad.c.

static void end_frame ( AVFilterLink link  )  [static]

Definition at line 341 of file vf_pad.c.

static AVFilterBufferRef* get_video_buffer ( AVFilterLink inlink,
int  perms,
int  w,
int  h 
) [static]

Definition at line 252 of file vf_pad.c.

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

Definition at line 107 of file vf_pad.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 69 of file vf_pad.c.

static void start_frame ( AVFilterLink inlink,
AVFilterBufferRef inpicref 
) [static]

Definition at line 298 of file vf_pad.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 127 of file vf_pad.c.


Variable Documentation

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),
    .init          = init,
    .uninit        = uninit,
    .query_formats = query_formats,

    .inputs    = (AVFilterPad[]) {{ .name             = "default",
                                    .type             = AVMEDIA_TYPE_VIDEO,
                                    .config_props     = config_input,
                                    .get_video_buffer = get_video_buffer,
                                    .start_frame      = start_frame,
                                    .draw_slice       = draw_slice,
                                    .end_frame        = end_frame, },
                                  { .name = NULL}},

    .outputs   = (AVFilterPad[]) {{ .name             = "default",
                                    .type             = AVMEDIA_TYPE_VIDEO,
                                    .config_props     = config_output, },
                                  { .name = NULL}},
}

Definition at line 406 of file vf_pad.c.

const char* var_names[] [static]

Initial value:

 {
    "PI",
    "PHI",
    "E",
    "in_w",   "iw",
    "in_h",   "ih",
    "out_w",  "ow",
    "out_h",  "oh",
    "x",
    "y",
    "a",
    "hsub",
    "vsub",
    NULL
}

Definition at line 37 of file vf_pad.c.


Generated on Fri Oct 26 02:39:48 2012 for FFmpeg by  doxygen 1.5.8