FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_mp.c File Reference
#include "avfilter.h"
#include "video.h"
#include "formats.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/pixdesc.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libmpcodecs/vf.h"
#include "libmpcodecs/img_format.h"
#include "libmpcodecs/cpudetect.h"
#include "libmpcodecs/av_helpers.h"
#include "libmpcodecs/libvo/fastmemcpy.h"
#include "libswscale/swscale.h"

Go to the source code of this file.

Data Structures

struct  MPContext
 

Macros

#define OFFSET(x)   offsetof(MPContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define CLEAR_PACKEDYUV_PATTERN   0x80008000
 
#define CLEAR_PACKEDYUV_PATTERN_SWAPPED   0x00800080
 

Functions

enum AVPixelFormat ff_mp2ff_pix_fmt (int mp)
 
 AVFILTER_DEFINE_CLASS (mp)
 
void ff_mp_msg (int mod, int lev, const char *format,...)
 
int ff_mp_msg_test (int mod, int lev)
 
void ff_init_avcodec (void)
 
void ff_vf_clone_mpi_attributes (mp_image_t *dst, mp_image_t *src)
 
void ff_vf_next_draw_slice (struct vf_instance *vf, unsigned char **src, int *stride, int w, int h, int x, int y)
 
void ff_vf_mpi_clear (mp_image_t *mpi, int x0, int y0, int w, int h)
 
int ff_vf_next_query_format (struct vf_instance *vf, unsigned int fmt)
 
unsigned int ff_vf_match_csp (vf_instance_t **vfp, const unsigned int *list, unsigned int preferred)
 
mp_image_tff_vf_get_image (vf_instance_t *vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h)
 
int ff_vf_next_put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
 
int ff_vf_next_config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int voflags, unsigned int outfmt)
 
int ff_vf_next_control (struct vf_instance *vf, int request, void *data)
 
static int vf_default_query_format (struct vf_instance *vf, unsigned int fmt)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_inprops (AVFilterLink *inlink)
 
static int config_outprops (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *inpic)
 

Variables

struct {
   int   fmt
 
   enum AVPixelFormat   pix_fmt
 
conversion_map []
 
const vf_info_t ff_vf_info_eq2
 
const vf_info_t ff_vf_info_eq
 
const vf_info_t ff_vf_info_fspp
 
const vf_info_t ff_vf_info_ilpack
 
const vf_info_t ff_vf_info_pp7
 
const vf_info_t ff_vf_info_softpulldown
 
const vf_info_t ff_vf_info_uspp
 
static const vf_info_t *const filters []
 
CpuCaps ff_gCpuCaps
 
static const AVOption mp_options []
 
static const AVFilterPad mp_inputs []
 
static const AVFilterPad mp_outputs []
 
AVFilter avfilter_vf_mp
 

Macro Definition Documentation

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

Definition at line 187 of file vf_mp.c.

Definition at line 188 of file vf_mp.c.

#define CLEAR_PACKEDYUV_PATTERN   0x80008000

Referenced by ff_vf_mpi_clear().

#define CLEAR_PACKEDYUV_PATTERN_SWAPPED   0x00800080

Referenced by ff_vf_mpi_clear().

Function Documentation

enum AVPixelFormat ff_mp2ff_pix_fmt ( int  mp)

Definition at line 170 of file vf_mp.c.

Referenced by ff_mp_image_alloc_planes().

AVFILTER_DEFINE_CLASS ( mp  )
void ff_mp_msg ( int  mod,
int  lev,
const char *  format,
  ... 
)
int ff_mp_msg_test ( int  mod,
int  lev 
)

Definition at line 204 of file vf_mp.c.

void ff_init_avcodec ( void  )

Definition at line 208 of file vf_mp.c.

Referenced by vf_open().

void ff_vf_clone_mpi_attributes ( mp_image_t dst,
mp_image_t src 
)

Definition at line 214 of file vf_mp.c.

Referenced by put_image().

void ff_vf_next_draw_slice ( struct vf_instance *  vf,
unsigned char **  src,
int *  stride,
int  w,
int  h,
int  x,
int  y 
)

Definition at line 225 of file vf_mp.c.

void ff_vf_mpi_clear ( mp_image_t mpi,
int  x0,
int  y0,
int  w,
int  h 
)

Definition at line 248 of file vf_mp.c.

Referenced by ff_vf_get_image().

int ff_vf_next_query_format ( struct vf_instance *  vf,
unsigned int  fmt 
)

Definition at line 292 of file vf_mp.c.

Referenced by query_format().

unsigned int ff_vf_match_csp ( vf_instance_t **  vfp,
const unsigned int *  list,
unsigned int  preferred 
)

Definition at line 297 of file vf_mp.c.

mp_image_t* ff_vf_get_image ( vf_instance_t vf,
unsigned int  outfmt,
int  mp_imgtype,
int  mp_imgflag,
int  w,
int  h 
)

Definition at line 301 of file vf_mp.c.

Referenced by get_image(), and put_image().

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

Definition at line 458 of file vf_mp.c.

Referenced by init(), and put_image().

int ff_vf_next_config ( struct vf_instance *  vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  voflags,
unsigned int  outfmt 
)

Definition at line 507 of file vf_mp.c.

Referenced by config(), and init().

int ff_vf_next_control ( struct vf_instance *  vf,
int  request,
void data 
)

Definition at line 536 of file vf_mp.c.

Referenced by control(), and init().

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

Definition at line 542 of file vf_mp.c.

Referenced by init().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 555 of file vf_mp.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 635 of file vf_mp.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 652 of file vf_mp.c.

static int config_inprops ( AVFilterLink inlink)
static

Definition at line 678 of file vf_mp.c.

static int config_outprops ( AVFilterLink outlink)
static

Definition at line 697 of file vf_mp.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 707 of file vf_mp.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame inpic 
)
static

Definition at line 724 of file vf_mp.c.

Variable Documentation

int fmt

Definition at line 49 of file vf_mp.c.

enum AVPixelFormat pix_fmt

Definition at line 50 of file vf_mp.c.

struct { ... } conversion_map[]
const vf_info_t ff_vf_info_eq2

Definition at line 512 of file vf_eq2.c.

const vf_info_t ff_vf_info_eq

Definition at line 234 of file vf_eq.c.

const vf_info_t ff_vf_info_fspp

Definition at line 683 of file vf_fspp.c.

const vf_info_t ff_vf_info_ilpack

Definition at line 451 of file vf_ilpack.c.

const vf_info_t ff_vf_info_pp7

Definition at line 484 of file vf_pp7.c.

const vf_info_t ff_vf_info_softpulldown

Definition at line 156 of file vf_softpulldown.c.

const vf_info_t ff_vf_info_uspp

Definition at line 386 of file vf_uspp.c.

const vf_info_t* const filters[]
static
CpuCaps ff_gCpuCaps

Definition at line 168 of file vf_mp.c.

Referenced by check_values(), put_image(), and vf_open().

const AVOption mp_options[]
static
Initial value:
= {
{ "filter", "set MPlayer filter name and parameters", OFFSET(filter), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ NULL }
}

Definition at line 189 of file vf_mp.c.

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

Definition at line 761 of file vf_mp.c.

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

Definition at line 771 of file vf_mp.c.

AVFilter avfilter_vf_mp
Initial value:
= {
.name = "mp",
.description = NULL_IF_CONFIG_SMALL("Apply a libmpcodecs filter to the input video."),
.init = init,
.uninit = uninit,
.priv_size = sizeof(MPContext),
.priv_class = &mp_class,
}

Definition at line 781 of file vf_mp.c.