FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_perspective.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <assert.h>
#include <math.h>
#include "config.h"
#include "mp_msg.h"
#include "libavutil/mem.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 

Macros

#define SUB_PIXEL_BITS   8
 
#define SUB_PIXELS   (1<<SUB_PIXEL_BITS)
 
#define COEFF_BITS   11
 

Functions

static void initPv (struct vf_priv_s *priv, int W, int H)
 
static double getCoeff (double d)
 
static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
 
static void uninit (struct vf_instance *vf)
 
static void resampleCubic (uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, struct vf_priv_s *privParam, int xShift, int yShift)
 
static void resampleLinear (uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, struct vf_priv_s *privParam, int xShift, int yShift)
 
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
 
static int query_format (struct vf_instance *vf, unsigned int fmt)
 
static int vf_open (vf_instance_t *vf, char *args)
 

Variables

const vf_info_t ff_vf_info_perspective
 

Macro Definition Documentation

#define SUB_PIXEL_BITS   8

Definition at line 41 of file vf_perspective.c.

Referenced by resampleCubic(), and resampleLinear().

#define SUB_PIXELS   (1<<SUB_PIXEL_BITS)

Definition at line 42 of file vf_perspective.c.

Referenced by config(), initPv(), resampleCubic(), and resampleLinear().

#define COEFF_BITS   11

Definition at line 43 of file vf_perspective.c.

Referenced by config(), and resampleCubic().

Function Documentation

static void initPv ( struct vf_priv_s priv,
int  W,
int  H 
)
static

Definition at line 58 of file vf_perspective.c.

Referenced by config().

static double getCoeff ( double  d)
static

Definition at line 90 of file vf_perspective.c.

Referenced by config().

static int config ( struct vf_instance *  vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  flags,
unsigned int  outfmt 
)
static

Definition at line 107 of file vf_perspective.c.

Referenced by vf_open().

static void uninit ( struct vf_instance *  vf)
static

Definition at line 134 of file vf_perspective.c.

Referenced by vf_open().

static void resampleCubic ( uint8_t dst,
uint8_t src,
int  w,
int  h,
int  dstStride,
int  srcStride,
struct vf_priv_s privParam,
int  xShift,
int  yShift 
)
inlinestatic

Definition at line 144 of file vf_perspective.c.

Referenced by put_image().

static void resampleLinear ( uint8_t dst,
uint8_t src,
int  w,
int  h,
int  dstStride,
int  srcStride,
struct vf_priv_s privParam,
int  xShift,
int  yShift 
)
inlinestatic

Definition at line 205 of file vf_perspective.c.

Referenced by put_image().

static int put_image ( struct vf_instance *  vf,
mp_image_t mpi,
double  pts 
)
static

Definition at line 263 of file vf_perspective.c.

Referenced by vf_open().

static int query_format ( struct vf_instance *  vf,
unsigned int  fmt 
)
static

Definition at line 294 of file vf_perspective.c.

Referenced by vf_open().

static int vf_open ( vf_instance_t vf,
char *  args 
)
static

Definition at line 309 of file vf_perspective.c.

Variable Documentation

const vf_info_t ff_vf_info_perspective
Initial value:
= {
"perspective correcture",
"perspective",
"Michael Niedermayer",
"",
NULL
}

Definition at line 336 of file vf_perspective.c.