diff options
author | wm4 <wm4@nowhere> | 2013-06-08 01:35:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-28 20:34:46 +0200 |
commit | 3382a6f6e48c7e093c2b7e0e4a0e28b60a084358 (patch) | |
tree | cc50df6d6ae5ffa6b1f7d3eb4e816a3afcfd1641 /video/mp_image.h | |
parent | 823e0c511bea235be06d5e2037ef9d0b345d9405 (diff) | |
download | mpv-3382a6f6e48c7e093c2b7e0e4a0e28b60a084358.tar.bz2 mpv-3382a6f6e48c7e093c2b7e0e4a0e28b60a084358.tar.xz |
video: add a new method to configure filters and VOs
The filter chain and the video ouputs have config() functions. They are
strictly limited to transfering the video size and format. Other
parameters (like color levels) have to be transferred separately.
Improve upon this by introducing a separate set of reconfig() functions,
which use mp_image_params to carry format parameters. This struct
contains all image format related parameters from config(), plus
additional parameters such as colorspace.
Change vf_rotate to use it, as well as vo_opengl. vf_rotate is just
an example/test case, but vo_opengl will need it later.
The intention is also to get rid of VOCTRL_SET_YUV_COLORSPACE. This
information is now handed to the VOs via reconfig(). The getter,
VOCTRL_GET_YUV_COLORSPACE, will still be needed though.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r-- | video/mp_image.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/video/mp_image.h b/video/mp_image.h index ca536a1e91..643b70b949 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -37,6 +37,14 @@ #define MP_IMGFIELD_BOTTOM 0x10 #define MP_IMGFIELD_INTERLACED 0x20 +struct mp_image_params { + enum mp_imgfmt imgfmt; // pixel format + int w, h; // image dimensions + int d_w, d_h; // define display aspect ratio (never 0/0) + enum mp_csp colorspace; + enum mp_csp_levels colorlevels; +}; + /* Memory management: * - mp_image is a light-weight reference to the actual image data (pixels). * The actual image data is reference counted and can outlive mp_image @@ -58,7 +66,7 @@ typedef struct mp_image { struct mp_imgfmt_desc fmt; // fields redundant to fmt, for convenience or compatibility - unsigned int imgfmt; + enum mp_imgfmt imgfmt; int num_planes; int chroma_x_shift; // horizontal int chroma_y_shift; // vertical |