mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 03:32:50 +00:00
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
This commit is contained in:
parent
debca22212
commit
060e581f06
@ -7343,6 +7343,14 @@ side by side parallel (left eye left, right eye right)
|
||||
.RS
|
||||
side by side crosseye (right eye left, left eye right)
|
||||
.RE
|
||||
.B sbs2l or side_by_side_half_width_left_first
|
||||
.RS
|
||||
side by side with half width resolution (left eye left, right eye right)
|
||||
.RE
|
||||
.B sbs2r or side_by_side_half_width_right_first
|
||||
.RS
|
||||
side by side with half width resolution (right eye left, left eye right)
|
||||
.RE
|
||||
.B abl or above_below_left_first
|
||||
.RS
|
||||
above-below (left eye above, right eye below)
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user