From 8599c959fe9334bc4d226faf813166ef8bc8efd5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 30 Aug 2014 23:24:46 +0200 Subject: video: initial Matroska 3D support This inserts an automatic conversion filter if a Matroska file is marked as 3D (StereoMode element). The basic idea is similar to video rotation and colorspace handling: the 3D mode is added as a property to the video params. Depending on this property, a video filter can be inserted. As of this commit, extending mp_image_params is actually completely unnecessary - but the idea is that it will make it easier to integrate with VOs supporting stereo 3D mogrification. Although vo_opengl does support some stereo rendering, it didn't support the mode my sample file used, so I'll leave that part for later. Not that most mappings from Matroska mode to vf_stereo3d mode are probably wrong, and some are missing. Assuming that Matroska modes, and vf_stereo3d in modes, and out modes are all the same might be an oversimplification - we'll see. See issue #1045. --- video/csputils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'video/csputils.h') diff --git a/video/csputils.h b/video/csputils.h index 757ac72cdc..1a559ebfd2 100644 --- a/video/csputils.h +++ b/video/csputils.h @@ -79,6 +79,17 @@ enum mp_render_intent { MP_INTENT_ABSOLUTE_COLORIMETRIC = 3 }; +enum mp_stereo3d_mode { + MP_STEREO3D_INVALID = -1, + MP_STEREO3D_MONO = 0, + MP_STEREO3D_COUNT = 13, // 12 is last valid mode +}; + +extern const char *const mp_stereo3d_names[MP_STEREO3D_COUNT]; + +#define MP_STEREO3D_NAME(x) \ + ((x) >= 0 && (x) < MP_STEREO3D_COUNT ? (char *)mp_stereo3d_names[(x)] : NULL) + struct mp_csp_details { enum mp_csp format; enum mp_csp_levels levels_in; // encoded video -- cgit v1.2.3