libavfilter/vf_crop.c File Reference

video crop filter More...

#include "avfilter.h"
#include "video.h"
#include "libavutil/eval.h"
#include "libavutil/avstring.h"
#include "libavutil/libm.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"

Go to the source code of this file.

Data Structures

struct  CropContext

Enumerations

enum  var_name {
  VAR_B1, VAR_B2, VAR_S1, VAR_S2,
  VAR_T1, VAR_T2, VAR_NB, VAR_N,
  VAR_T, VAR_S, VAR_VARS_NB, VAR_W,
  VAR_H, VAR_CW, VAR_CH, 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_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_VARS_NB,
  VAR_W, VAR_H, VAR_VAL, VAR_MAXVAL,
  VAR_MINVAL, VAR_NEGVAL, VAR_CLIPVAL, VAR_VARS_NB,
  VAR_MAIN_W, VAR_MW, VAR_MAIN_H, VAR_MH,
  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_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, 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_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_INTERLACED, VAR_N,
  VAR_POS, VAR_PREV_INPTS, VAR_PREV_OUTPTS, VAR_PTS,
  VAR_STARTPTS, VAR_TB, VAR_VARS_NB, VAR_AVTB,
  VAR_INTB, VAR_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
}

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 normalize_double (int *n, double d)
static int config_input (AVFilterLink *link)
static int config_output (AVFilterLink *link)
static void start_frame (AVFilterLink *link, AVFilterBufferRef *picref)
static void draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
static void end_frame (AVFilterLink *link)

Variables

static const char *const var_names []
AVFilter avfilter_vf_crop


Detailed Description

video crop filter

Definition in file vf_crop.c.


Enumeration Type Documentation

enum var_name

Enumerator:
VAR_B1 
VAR_B2 
VAR_S1 
VAR_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AR_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_INTERLACED 
VAR_N 
VAR_POS 
VAR_PREV_INPTS 
VAR_PREV_OUTPTS 
VAR_PTS 
VAR_STARTPTS 
VAR_TB 
VAR_VARS_NB 
VAR_AVTB 
VAR_INTB 
VAR_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 

Definition at line 54 of file vf_crop.c.


Function Documentation

static int config_input ( AVFilterLink link  )  [static]

Definition at line 159 of file vf_crop.c.

static int config_output ( AVFilterLink link  )  [static]

Definition at line 249 of file vf_crop.c.

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

Definition at line 314 of file vf_crop.c.

static void end_frame ( AVFilterLink link  )  [static]

Definition at line 332 of file vf_crop.c.

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

Definition at line 121 of file vf_crop.c.

static int normalize_double ( int *  n,
double  d 
) [inline, static]

Definition at line 144 of file vf_crop.c.

Referenced by config_input(), and start_frame().

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 88 of file vf_crop.c.

static void start_frame ( AVFilterLink link,
AVFilterBufferRef picref 
) [static]

Definition at line 260 of file vf_crop.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 136 of file vf_crop.c.


Variable Documentation

Initial value:

 {
    .name      = "crop",
    .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."),

    .priv_size = sizeof(CropContext),

    .query_formats = query_formats,
    .init          = init,
    .uninit        = uninit,

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

Definition at line 341 of file vf_crop.c.

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",
    "x",
    "y",
    "n",            
    "pos",          
    "t",            
    NULL
}

Definition at line 36 of file vf_crop.c.


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