FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mp_image.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mp_msg.h"
#include "libavutil/avutil.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  mp_image_t
 

Macros

#define ASMALIGN(ZEROBITS)   ".p2align " #ZEROBITS "\n\t"
 
#define CODEC_FLAG2_MEMC_ONLY   0x00001000
 Only do ME/MC (I frames -> ref, P frame -> ME+MC).
 
#define MP_IMGFLAG_PRESERVE   0x01
 
#define MP_IMGFLAG_READABLE   0x02
 
#define MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE   0x4
 
#define MP_IMGFLAG_PREFER_ALIGNED_STRIDE   0x8
 
#define MP_IMGFLAG_ACCEPT_STRIDE   0x10
 
#define MP_IMGFLAG_ACCEPT_WIDTH   0x20
 
#define MP_IMGFLAG_COMMON_STRIDE   0x40
 
#define MP_IMGFLAG_COMMON_PLANE   0x80
 
#define MP_IMGFLAGMASK_RESTRICTIONS   0xFF
 
#define MP_IMGFLAG_PLANAR   0x100
 
#define MP_IMGFLAG_YUV   0x200
 
#define MP_IMGFLAG_SWAPPED   0x400
 
#define MP_IMGFLAG_RGB_PALETTE   0x800
 
#define MP_IMGFLAGMASK_COLORS   0xF00
 
#define MP_IMGFLAG_DRAW_CALLBACK   0x1000
 
#define MP_IMGFLAG_DIRECT   0x2000
 
#define MP_IMGFLAG_ALLOCATED   0x4000
 
#define MP_IMGFLAG_TYPE_DISPLAYED   0x8000
 
#define MP_IMGTYPE_EXPORT   0
 
#define MP_IMGTYPE_STATIC   1
 
#define MP_IMGTYPE_TEMP   2
 
#define MP_IMGTYPE_IP   3
 
#define MP_IMGTYPE_IPB   4
 
#define MP_IMGTYPE_NUMBERED   5
 
#define MP_IMGTYPE_INCOMPLETE   6
 
#define MP_MAX_PLANES   4
 
#define MP_IMGFIELD_ORDERED   0x01
 
#define MP_IMGFIELD_TOP_FIRST   0x02
 
#define MP_IMGFIELD_REPEAT_FIRST   0x04
 
#define MP_IMGFIELD_TOP   0x08
 
#define MP_IMGFIELD_BOTTOM   0x10
 
#define MP_IMGFIELD_INTERLACED   0x20
 

Functions

enum AVPixelFormat ff_mp2ff_pix_fmt (int mp)
 
void ff_mp_image_setfmt (mp_image_t *mpi, unsigned int out_fmt)
 
mp_image_tff_new_mp_image (int w, int h)
 
void ff_free_mp_image (mp_image_t *mpi)
 
mp_image_tff_alloc_mpi (int w, int h, unsigned long int fmt)
 
void ff_mp_image_alloc_planes (mp_image_t *mpi)
 
void ff_copy_mpi (mp_image_t *dmpi, mp_image_t *mpi)
 

Macro Definition Documentation

#define ASMALIGN (   ZEROBITS)    ".p2align " #ZEROBITS "\n\t"

Definition at line 37 of file mp_image.h.

#define CODEC_FLAG2_MEMC_ONLY   0x00001000

Only do ME/MC (I frames -> ref, P frame -> ME+MC).

Definition at line 38 of file mp_image.h.

#define MP_IMGFLAG_PRESERVE   0x01

Definition at line 46 of file mp_image.h.

Referenced by filter_frame(), get_image(), and put_image().

#define MP_IMGFLAG_READABLE   0x02

Definition at line 55 of file mp_image.h.

Referenced by ff_vf_get_image(), filter_frame(), and get_image().

#define MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE   0x4

Definition at line 59 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGFLAG_PREFER_ALIGNED_STRIDE   0x8

Definition at line 61 of file mp_image.h.

Referenced by ff_vf_get_image(), and put_image().

#define MP_IMGFLAG_ACCEPT_STRIDE   0x10

Definition at line 63 of file mp_image.h.

Referenced by put_image().

#define MP_IMGFLAG_ACCEPT_WIDTH   0x20

Definition at line 65 of file mp_image.h.

#define MP_IMGFLAG_COMMON_STRIDE   0x40

Definition at line 68 of file mp_image.h.

#define MP_IMGFLAG_COMMON_PLANE   0x80

Definition at line 70 of file mp_image.h.

#define MP_IMGFLAGMASK_RESTRICTIONS   0xFF

Definition at line 72 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGFLAG_PLANAR   0x100
#define MP_IMGFLAG_YUV   0x200

Definition at line 78 of file mp_image.h.

Referenced by ff_mp_image_setfmt(), ff_vf_get_image(), and ff_vf_mpi_clear().

#define MP_IMGFLAG_SWAPPED   0x400
#define MP_IMGFLAG_RGB_PALETTE   0x800

Definition at line 82 of file mp_image.h.

Referenced by ff_free_mp_image(), ff_mp_image_alloc_planes(), and ff_vf_get_image().

#define MP_IMGFLAGMASK_COLORS   0xF00

Definition at line 84 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGFLAG_DRAW_CALLBACK   0x1000

Definition at line 89 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGFLAG_DIRECT   0x2000

Definition at line 91 of file mp_image.h.

Referenced by ff_vf_get_image(), get_image(), and put_image().

#define MP_IMGFLAG_ALLOCATED   0x4000

Definition at line 93 of file mp_image.h.

Referenced by ff_free_mp_image(), ff_mp_image_alloc_planes(), and ff_vf_get_image().

#define MP_IMGFLAG_TYPE_DISPLAYED   0x8000

Definition at line 96 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGTYPE_EXPORT   0

Definition at line 100 of file mp_image.h.

Referenced by ff_vf_get_image(), and put_image().

#define MP_IMGTYPE_STATIC   1

Definition at line 102 of file mp_image.h.

Referenced by ff_vf_get_image(), and put_image().

#define MP_IMGTYPE_TEMP   2

Definition at line 104 of file mp_image.h.

Referenced by ff_vf_get_image(), and put_image().

#define MP_IMGTYPE_IP   3

Definition at line 106 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGTYPE_IPB   4

Definition at line 108 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGTYPE_NUMBERED   5

Definition at line 110 of file mp_image.h.

Referenced by ff_vf_get_image().

#define MP_IMGTYPE_INCOMPLETE   6

Definition at line 114 of file mp_image.h.

#define MP_MAX_PLANES   4

Definition at line 116 of file mp_image.h.

#define MP_IMGFIELD_ORDERED   0x01

Definition at line 118 of file mp_image.h.

#define MP_IMGFIELD_TOP_FIRST   0x02

Definition at line 119 of file mp_image.h.

Referenced by filter_frame(), and put_image().

#define MP_IMGFIELD_REPEAT_FIRST   0x04

Definition at line 120 of file mp_image.h.

Referenced by filter_frame(), and put_image().

#define MP_IMGFIELD_TOP   0x08

Definition at line 121 of file mp_image.h.

#define MP_IMGFIELD_BOTTOM   0x10

Definition at line 122 of file mp_image.h.

#define MP_IMGFIELD_INTERLACED   0x20

Definition at line 123 of file mp_image.h.

Referenced by filter_frame().

Function Documentation

enum AVPixelFormat ff_mp2ff_pix_fmt ( int  mp)

Definition at line 169 of file vf_mp.c.

Referenced by ff_mp_image_alloc_planes().

void ff_mp_image_setfmt ( mp_image_t mpi,
unsigned int  out_fmt 
)

Definition at line 105 of file mp_image.c.

Referenced by ff_alloc_mpi(), ff_vf_get_image(), and filter_frame().

mp_image_t* ff_new_mp_image ( int  w,
int  h 
)

Definition at line 238 of file mp_image.c.

Referenced by ff_alloc_mpi(), ff_vf_get_image(), and filter_frame().

void ff_free_mp_image ( mp_image_t mpi)

Definition at line 247 of file mp_image.c.

Referenced by filter_frame(), and uninit().

mp_image_t* ff_alloc_mpi ( int  w,
int  h,
unsigned long int  fmt 
)

Definition at line 81 of file mp_image.c.

void ff_mp_image_alloc_planes ( mp_image_t mpi)

Definition at line 36 of file mp_image.c.

Referenced by ff_alloc_mpi(), and ff_vf_get_image().

void ff_copy_mpi ( mp_image_t dmpi,
mp_image_t mpi 
)

Definition at line 90 of file mp_image.c.