summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormplayer-svn <svn@mplayerhq.hu>2011-07-11 21:54:53 +0000
committerwm4 <wm4@nowhere>2012-08-03 01:09:18 +0200
commit060e581f063f58d04b4da0affb2a971bb3d6000c (patch)
treea32962c093b42c13e8b1678c94615d505ab2de98 /libmpcodecs
parentdebca222121fbbe5c615281958bc5a72fac3268f (diff)
downloadmpv-060e581f063f58d04b4da0affb2a971bb3d6000c.tar.bz2
mpv-060e581f063f58d04b4da0affb2a971bb3d6000c.tar.xz
vf_stereo3d.c: half-width side-by-side formats for stereo3d
Half-width side-by-side formats for stereo3d. Patch by Steaphan Greene [sgreene cs.binghamton.edu] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33877 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_stereo3d.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libmpcodecs/vf_stereo3d.c b/libmpcodecs/vf_stereo3d.c
index 2c6f289e5d..417ca23042 100644
--- a/libmpcodecs/vf_stereo3d.c
+++ b/libmpcodecs/vf_stereo3d.c
@@ -52,6 +52,8 @@ typedef enum stereo_code {
MONO_R, //mono output for debugging (right eye only)
SIDE_BY_SIDE_LR, //side by side parallel (left eye left, right eye right)
SIDE_BY_SIDE_RL, //side by side crosseye (right eye left, left eye right)
+ SIDE_BY_SIDE_2_LR, //side by side parallel with half width resolution
+ SIDE_BY_SIDE_2_RL, //side by side crosseye with half width resolution
ABOVE_BELOW_LR, //above-below (left eye above, right eye below)
ABOVE_BELOW_RL, //above-below (right eye above, left eye below)
ABOVE_BELOW_2_LR, //above-below with half height resolution
@@ -150,10 +152,14 @@ static int config(struct vf_instance *vf, int width, int height, int d_width,
//check input format
switch (vf->priv->in.fmt) {
+ case SIDE_BY_SIDE_2_LR:
+ d_width *= 2;
case SIDE_BY_SIDE_LR:
vf->priv->width = width / 2;
vf->priv->in.off_right = vf->priv->width * 3;
break;
+ case SIDE_BY_SIDE_2_RL:
+ d_width *= 2;
case SIDE_BY_SIDE_RL:
vf->priv->width = width / 2;
vf->priv->in.off_left = vf->priv->width * 3;
@@ -199,10 +205,14 @@ static int config(struct vf_instance *vf, int width, int height, int d_width,
memcpy(vf->priv->ana_matrix, ana_coeff[vf->priv->out.fmt],
sizeof(vf->priv->ana_matrix));
break;
+ case SIDE_BY_SIDE_2_LR:
+ d_width /= 2;
case SIDE_BY_SIDE_LR:
vf->priv->out.width = vf->priv->width * 2;
vf->priv->out.off_right = vf->priv->width * 3;
break;
+ case SIDE_BY_SIDE_2_RL:
+ d_width /= 2;
case SIDE_BY_SIDE_RL:
vf->priv->out.width = vf->priv->width * 2;
vf->priv->out.off_left = vf->priv->width * 3;
@@ -276,6 +286,8 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
switch (vf->priv->out.fmt) {
case SIDE_BY_SIDE_LR:
case SIDE_BY_SIDE_RL:
+ case SIDE_BY_SIDE_2_LR:
+ case SIDE_BY_SIDE_2_RL:
case ABOVE_BELOW_LR:
case ABOVE_BELOW_RL:
case ABOVE_BELOW_2_LR:
@@ -409,6 +421,10 @@ static const struct format_preset {
{"side_by_side_left_first", SIDE_BY_SIDE_LR},
{"sbsr", SIDE_BY_SIDE_RL},
{"side_by_side_right_first", SIDE_BY_SIDE_RL},
+ {"sbs2l", SIDE_BY_SIDE_2_LR},
+ {"side_by_side_half_width_left_first", SIDE_BY_SIDE_2_LR},
+ {"sbs2r", SIDE_BY_SIDE_2_RL},
+ {"side_by_side_half_width_right_first",SIDE_BY_SIDE_2_RL},
{"abl", ABOVE_BELOW_LR},
{"above_below_left_first", ABOVE_BELOW_LR},
{"abr", ABOVE_BELOW_RL},