From 738a5af586b996ac70eb6c72e9a2e73d14ea1dbb Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 31 Jan 2013 12:12:36 +0000 Subject: vf_stereo3d: add support for green-magenta and yellow-blue dubois Add more vf_stereo3d output formats. Adds high quality green-magenta and yellow-blue dubois anaglyph 3D output support. Patch by thomas schorpp, thomas.schorpp gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35906 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: video/filter/vf_stereo3d.c --- video/filter/vf_stereo3d.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'video') diff --git a/video/filter/vf_stereo3d.c b/video/filter/vf_stereo3d.c index 37c66e77d9..3b16cf6d8a 100644 --- a/video/filter/vf_stereo3d.c +++ b/video/filter/vf_stereo3d.c @@ -45,6 +45,7 @@ typedef enum stereo_code { ANAGLYPH_GM_GRAY, //anaglyph green/magenta gray ANAGLYPH_GM_HALF, //anaglyph green/magenta half colored ANAGLYPH_GM_COLOR, //anaglyph green/magenta colored + ANAGLYPH_GM_DUBOIS, //anaglyph green/magenta dubois ANAGLYPH_YB_GRAY, //anaglyph yellow/blue gray ANAGLYPH_YB_HALF, //anaglyph yellow/blue half colored ANAGLYPH_YB_COLOR, //anaglyph yellow/blue colored @@ -104,6 +105,10 @@ static const int ana_coeff[][3][6] = { {{ 0, 0, 0, 65536, 0, 0}, { 0, 65536, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 65536}}, + [ANAGLYPH_GM_DUBOIS] = + {{-4063,-10354, -2556, 34669, 46203, 1573}, + {18612, 43778, 9372, -1049, -983, -4260}, + { -983, -1769, 1376, 590, 4915, 61407}}, [ANAGLYPH_YB_GRAY] = {{ 0, 0, 0, 19595, 38470, 7471}, { 0, 0, 0, 19595, 38470, 7471}, @@ -212,6 +217,7 @@ static int config(struct vf_instance *vf, int width, int height, int d_width, case ANAGLYPH_GM_GRAY: case ANAGLYPH_GM_HALF: case ANAGLYPH_GM_COLOR: + case ANAGLYPH_GM_DUBOIS: case ANAGLYPH_YB_GRAY: case ANAGLYPH_YB_HALF: case ANAGLYPH_YB_COLOR: @@ -336,9 +342,11 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi) case ANAGLYPH_GM_GRAY: case ANAGLYPH_GM_HALF: case ANAGLYPH_GM_COLOR: + case ANAGLYPH_GM_DUBOIS: case ANAGLYPH_YB_GRAY: case ANAGLYPH_YB_HALF: - case ANAGLYPH_YB_COLOR: { + case ANAGLYPH_YB_COLOR: + case ANAGLYPH_YB_DUBOIS: { int x,y,il,ir,o; unsigned char *source = mpi->planes[0]; unsigned char *dest = dmpi->planes[0]; @@ -420,6 +428,8 @@ static const struct format_preset { {"anaglyph_green_magenta_half_color",ANAGLYPH_GM_HALF}, {"agmc", ANAGLYPH_GM_COLOR}, {"anaglyph_green_magenta_color", ANAGLYPH_GM_COLOR}, + {"agmd", ANAGLYPH_GM_DUBOIS}, + {"anaglyph_green_magenta_dubois", ANAGLYPH_GM_DUBOIS}, {"aybg", ANAGLYPH_YB_GRAY}, {"anaglyph_yellow_blue_gray", ANAGLYPH_YB_GRAY}, {"aybh", ANAGLYPH_YB_HALF}, -- cgit v1.2.3