mirror of https://github.com/mpv-player/mpv
video: remove internal stereo_out flag
Also rename stereo3d to stereo_in. The only real change is that the vo_gpu OSD code now uses the actual stereo 3D mode, instead of the --video-steroe-mode value. (Why does this vo_gpu code even exist?)
This commit is contained in:
parent
c767451796
commit
c6b9288465
|
@ -272,14 +272,13 @@ static void fix_image_params(struct priv *p,
|
|||
m.p_w = m.p_h = 1;
|
||||
|
||||
m.rotate = p->codec->rotate;
|
||||
m.stereo_in = p->codec->stereo_mode;
|
||||
m.stereo3d = p->codec->stereo_mode;
|
||||
|
||||
if (opts->video_rotate < 0) {
|
||||
m.rotate = 0;
|
||||
} else {
|
||||
m.rotate = (m.rotate + opts->video_rotate) % 360;
|
||||
}
|
||||
m.stereo_out = opts->video_stereo_mode;
|
||||
|
||||
mp_colorspace_merge(&m.color, &c->color);
|
||||
|
||||
|
|
|
@ -2627,9 +2627,7 @@ static int property_imgparams(struct mp_image_params p, int action, void *arg)
|
|||
{"chroma-location",
|
||||
SUB_PROP_STR(m_opt_choice_str(mp_chroma_names, p.chroma_location))},
|
||||
{"stereo-in",
|
||||
SUB_PROP_STR(m_opt_choice_str(mp_stereo3d_names, p.stereo_in))},
|
||||
{"stereo-out",
|
||||
SUB_PROP_STR(m_opt_choice_str(mp_stereo3d_names, p.stereo_out))},
|
||||
SUB_PROP_STR(m_opt_choice_str(mp_stereo3d_names, p.stereo3d))},
|
||||
{"rotate", SUB_PROP_INT(p.rotate)},
|
||||
{0}
|
||||
};
|
||||
|
|
|
@ -50,7 +50,6 @@ struct vf_format_opts {
|
|||
int light;
|
||||
int chroma_location;
|
||||
int stereo_in;
|
||||
int stereo_out;
|
||||
int rotate;
|
||||
int dw, dh;
|
||||
double dar;
|
||||
|
@ -108,9 +107,7 @@ static void vf_format_process(struct mp_filter *f)
|
|||
if (p->chroma_location)
|
||||
out->chroma_location = p->chroma_location;
|
||||
if (p->stereo_in)
|
||||
out->stereo_in = p->stereo_in;
|
||||
if (p->stereo_out)
|
||||
out->stereo_out = p->stereo_out;
|
||||
out->stereo3d = p->stereo_in;
|
||||
if (p->rotate >= 0)
|
||||
out->rotate = p->rotate;
|
||||
|
||||
|
@ -183,7 +180,6 @@ static const m_option_t vf_opts_fields[] = {
|
|||
OPT_CHOICE_C("light", light, 0, mp_csp_light_names),
|
||||
OPT_CHOICE_C("chroma-location", chroma_location, 0, mp_chroma_names),
|
||||
OPT_CHOICE_C("stereo-in", stereo_in, 0, mp_stereo3d_names),
|
||||
OPT_CHOICE_C("stereo-out", stereo_out, 0, mp_stereo3d_names),
|
||||
OPT_INTRANGE("rotate", rotate, 0, -1, 359),
|
||||
OPT_INT("dw", dw, 0),
|
||||
OPT_INT("dh", dh, 0),
|
||||
|
|
|
@ -501,8 +501,7 @@ void mp_image_copy_attributes(struct mp_image *dst, struct mp_image *src)
|
|||
dst->dts = src->dts;
|
||||
dst->pkt_duration = src->pkt_duration;
|
||||
dst->params.rotate = src->params.rotate;
|
||||
dst->params.stereo_in = src->params.stereo_in;
|
||||
dst->params.stereo_out = src->params.stereo_out;
|
||||
dst->params.stereo3d = src->params.stereo3d;
|
||||
dst->params.p_w = src->params.p_w;
|
||||
dst->params.p_h = src->params.p_h;
|
||||
dst->params.color = src->params.color;
|
||||
|
@ -642,10 +641,9 @@ char *mp_image_params_to_str_buf(char *b, size_t bs,
|
|||
m_opt_choice_str(mp_chroma_names, p->chroma_location));
|
||||
if (p->rotate)
|
||||
mp_snprintf_cat(b, bs, " rot=%d", p->rotate);
|
||||
if (p->stereo_in > 0 || p->stereo_out > 0) {
|
||||
mp_snprintf_cat(b, bs, " stereo=%s/%s",
|
||||
MP_STEREO3D_NAME_DEF(p->stereo_in, "?"),
|
||||
MP_STEREO3D_NAME_DEF(p->stereo_out, "?"));
|
||||
if (p->stereo3d > 0) {
|
||||
mp_snprintf_cat(b, bs, " stereo=%s",
|
||||
MP_STEREO3D_NAME_DEF(p->stereo3d, "?"));
|
||||
}
|
||||
if (p->spherical.type != MP_SPHERICAL_NONE) {
|
||||
const float *a = p->spherical.ref_angles;
|
||||
|
@ -708,8 +706,7 @@ bool mp_image_params_equal(const struct mp_image_params *p1,
|
|||
mp_colorspace_equal(p1->color, p2->color) &&
|
||||
p1->chroma_location == p2->chroma_location &&
|
||||
p1->rotate == p2->rotate &&
|
||||
p1->stereo_in == p2->stereo_in &&
|
||||
p1->stereo_out == p2->stereo_out &&
|
||||
p1->stereo3d == p2->stereo3d &&
|
||||
mp_spherical_equal(&p1->spherical, &p2->spherical);
|
||||
}
|
||||
|
||||
|
@ -877,8 +874,7 @@ struct mp_image *mp_image_from_av_frame(struct AVFrame *src)
|
|||
if (src->opaque_ref) {
|
||||
struct mp_image_params *p = (void *)src->opaque_ref->data;
|
||||
dst->params.rotate = p->rotate;
|
||||
dst->params.stereo_in = p->stereo_in;
|
||||
dst->params.stereo_out = p->stereo_out;
|
||||
dst->params.stereo3d = p->stereo3d;
|
||||
dst->params.spherical = p->spherical;
|
||||
// Might be incorrect if colorspace changes.
|
||||
dst->params.color.light = p->color.light;
|
||||
|
|
|
@ -64,8 +64,7 @@ struct mp_image_params {
|
|||
enum mp_chroma_location chroma_location;
|
||||
// The image should be rotated clockwise (0-359 degrees).
|
||||
int rotate;
|
||||
enum mp_stereo3d_mode stereo_in; // image is encoded with this mode
|
||||
enum mp_stereo3d_mode stereo_out; // should be displayed with this mode
|
||||
enum mp_stereo3d_mode stereo3d; // image is encoded with this mode
|
||||
struct mp_spherical_params spherical;
|
||||
};
|
||||
|
||||
|
|
|
@ -2628,7 +2628,7 @@ static void pass_draw_osd(struct gl_video *p, int draw_flags, double pts,
|
|||
if ((draw_flags & OSD_DRAW_SUB_ONLY) && (draw_flags & OSD_DRAW_OSD_ONLY))
|
||||
return;
|
||||
|
||||
mpgl_osd_generate(p->osd, rect, pts, p->image_params.stereo_out, draw_flags);
|
||||
mpgl_osd_generate(p->osd, rect, pts, p->image_params.stereo3d, draw_flags);
|
||||
|
||||
timer_pool_start(p->osd_timer);
|
||||
for (int n = 0; n < MAX_OSD_PARTS; n++) {
|
||||
|
@ -3294,7 +3294,7 @@ void gl_video_resize(struct gl_video *p,
|
|||
gl_video_reset_surfaces(p);
|
||||
|
||||
if (p->osd)
|
||||
mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo_out);
|
||||
mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo3d);
|
||||
}
|
||||
|
||||
static void frame_perf_data(struct pass_info pass[], struct mp_frame_perf *out)
|
||||
|
|
Loading…
Reference in New Issue