diff options
author | wm4 <wm4@nowhere> | 2012-12-12 23:55:41 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 20:04:10 +0100 |
commit | 1b9d4a771a27d6017d826ed03dfbbc7ee976bf77 (patch) | |
tree | 072cf35d588a85b5ea1939d9663770a927226deb /video/mp_image.h | |
parent | c54fc507da8edcc2c5d3bc3f50b0881d1c1406d7 (diff) | |
download | mpv-1b9d4a771a27d6017d826ed03dfbbc7ee976bf77.tar.bz2 mpv-1b9d4a771a27d6017d826ed03dfbbc7ee976bf77.tar.xz |
video: remove things related to old DR code
Remove mp_image.width/height. The w/h members are the ones to use.
width/height were used internally by vf_get_image(), and sometimes for
other purposes.
Remove some image flags, most of which are now useless or completely
unused. This includes VFCAP_ACCEPT_STRIDE: the vf_expand insertion in
vf.c does nothing.
Remove some other unused mp_image fields.
Some rather messy changes in vo_opengl[_old] to get rid of legacy
mp_image flags and fields. This is left from when vo_gl supported DR.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r-- | video/mp_image.h | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/video/mp_image.h b/video/mp_image.h index 989f3ba909..c8bf113fd2 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -30,38 +30,6 @@ // Minimum stride alignment in pixels #define MP_STRIDE_ALIGNMENT 32 -//--------- codec's requirements (filled by the codec/vf) --------- - -//--- buffer content restrictions: -// set if buffer content shouldn't be modified: -#define MP_IMGFLAG_PRESERVE 0x01 -// set if buffer content will be READ. -// This can be e.g. for next frame's MC: (I/P mpeg frames) - -// then in combination with MP_IMGFLAG_PRESERVE - or it -// can be because a video filter or codec will read a significant -// amount of data while processing that frame (e.g. blending something -// onto the frame, MV based intra prediction). -// A frame marked like this should not be placed in to uncachable -// video RAM for example. -#define MP_IMGFLAG_READABLE 0x02 - -//--- buffer width/stride/plane restrictions: (used for direct rendering) -// stride _have_to_ be aligned to MB boundary: [for DR restrictions] -#define MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE 0x4 -// stride should be aligned to MB boundary: [for buffer allocation] -#define MP_IMGFLAG_PREFER_ALIGNED_STRIDE 0x8 -// codec accept any stride (>=width): -#define MP_IMGFLAG_ACCEPT_STRIDE 0x10 -// codec accept any width (width*bpp=stride -> stride%bpp==0) (>=width): -#define MP_IMGFLAG_ACCEPT_WIDTH 0x20 -//--- for planar formats only: -// uses only stride[0], and stride[1]=stride[2]=stride[0]>>mpi->chroma_x_shift -#define MP_IMGFLAG_COMMON_STRIDE 0x40 -// uses only planes[0], and calculates planes[1,2] from width,height,imgfmt -#define MP_IMGFLAG_COMMON_PLANE 0x80 - -#define MP_IMGFLAGMASK_RESTRICTIONS 0xFF - //--------- color info (filled by mp_image_setfmt() ) ----------- // set if number of planes > 1 #define MP_IMGFLAG_PLANAR 0x100 @@ -72,30 +40,10 @@ // set if you want memory for palette allocated and managed by vf_get_image etc. #define MP_IMGFLAG_RGB_PALETTE 0x800 -#define MP_IMGFLAGMASK_COLORS 0xF00 -// set if it's in video buffer/memory: [set by vo/vf's get_image() !!!] -#define MP_IMGFLAG_DIRECT 0x2000 // set if buffer is allocated (used in destination images): #define MP_IMGFLAG_ALLOCATED 0x4000 -// buffer type was printed (do NOT set this flag - it's for INTERNAL USE!!!) -#define MP_IMGFLAG_TYPE_DISPLAYED 0x8000 - -// codec doesn't support any form of direct rendering - it has own buffer -// allocation. so we just export its buffer pointers: -#define MP_IMGTYPE_EXPORT 0 -// codec requires a static WO buffer, but it does only partial updates later: -#define MP_IMGTYPE_STATIC 1 -// codec just needs some WO memory, where it writes/copies the whole frame to: -#define MP_IMGTYPE_TEMP 2 -// I+P type, requires 2+ independent static R/W buffers -#define MP_IMGTYPE_IP 3 -// I+P+B type, requires 2+ independent static R/W and 1+ temp WO buffers -#define MP_IMGTYPE_IPB 4 -// Upper 16 bits give desired buffer number, -1 means get next available -#define MP_IMGTYPE_NUMBERED 5 - #define MP_MAX_PLANES 4 #define MP_IMGFIELD_ORDERED 0x01 @@ -123,10 +71,8 @@ */ typedef struct mp_image { unsigned int flags; - unsigned char type; unsigned char bpp; // bits/pixel. NOT depth! for RGB it will be n*8 unsigned int imgfmt; - int width,height; // internal to vf.c, do not use (stored dimensions) int w,h; // visible dimensions int display_w,display_h; // if set (!= 0), anamorphic size uint8_t *planes[MP_MAX_PLANES]; @@ -147,9 +93,8 @@ typedef struct mp_image { /* only inside filter chain */ double pts; /* memory management */ - int number, usage_count; struct m_refcount *refcount; - /* for private use by filter or vo driver (to store buffer id or dmpi) */ + /* for private use */ void* priv; } mp_image_t; |