summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-24 13:07:49 +0100
committerwm4 <wm4@nowhere>2013-11-24 14:44:58 +0100
commit4012c4a96ee1786bb0d17bd2a3368d20fbb870c9 (patch)
treedc5e2929739597189ff7cfe85bd6d5ec2b712d07
parente5311586ab7641e0e1936473594bd9fbaa67bb2d (diff)
downloadmpv-4012c4a96ee1786bb0d17bd2a3368d20fbb870c9.tar.bz2
mpv-4012c4a96ee1786bb0d17bd2a3368d20fbb870c9.tar.xz
osd: remove mp_osd_res.video_par field
This is not needed anymore, because we decided that the PAR of the decoded video matters, and not the PAR of the filtered video that arrives at the VO.
-rw-r--r--mpvcore/player/screenshot.c1
-rw-r--r--sub/osd.c3
-rw-r--r--sub/osd.h1
-rw-r--r--video/filter/vf_sub.c1
-rw-r--r--video/out/vo.c1
-rw-r--r--video/out/vo_image.c1
-rw-r--r--video/out/vo_lavc.c1
-rw-r--r--video/out/vo_opengl_old.c3
-rw-r--r--video/out/vo_vaapi.c1
-rw-r--r--video/out/vo_xv.c1
10 files changed, 2 insertions, 12 deletions
diff --git a/mpvcore/player/screenshot.c b/mpvcore/player/screenshot.c
index 47f76f2a1e..6a3c258094 100644
--- a/mpvcore/player/screenshot.c
+++ b/mpvcore/player/screenshot.c
@@ -283,7 +283,6 @@ static void add_subs(struct MPContext *mpctx, struct mp_image *image)
.w = image->w,
.h = image->h,
.display_par = sar / dar,
- .video_par = dar / sar,
};
osd_draw_on_image(mpctx->osd, res, mpctx->osd->vo_pts,
diff --git a/sub/osd.c b/sub/osd.c
index 4c1b2ff322..11bf50d8d9 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -76,8 +76,7 @@ static bool osd_res_equals(struct mp_osd_res a, struct mp_osd_res b)
{
return a.w == b.w && a.h == b.h && a.ml == b.ml && a.mt == b.mt
&& a.mr == b.mr && a.mb == b.mb
- && a.display_par == b.display_par
- && a.video_par == b.video_par;
+ && a.display_par == b.display_par;
}
struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib)
diff --git a/sub/osd.h b/sub/osd.h
index 64e10193ea..cdd681b339 100644
--- a/sub/osd.h
+++ b/sub/osd.h
@@ -80,7 +80,6 @@ struct mp_osd_res {
int w, h; // screen dimensions, including black borders
int mt, mb, ml, mr; // borders (top, bottom, left, right)
double display_par;
- double video_par; // PAR of the original video (for some sub decoders)
};
enum mp_osdtype {
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 646216967b..1b344ab3f5 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -73,7 +73,6 @@ static int config(struct vf_instance *vf,
.mt = vf->priv->opt_top_margin,
.mb = vf->priv->opt_bottom_margin,
.display_par = sar / dar,
- .video_par = dar / sar,
};
return vf_next_config(vf, vf->priv->outw, vf->priv->outh, d_width,
diff --git a/video/out/vo.c b/video/out/vo.c
index 9fc4db1418..41a1b2a8ca 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -562,7 +562,6 @@ void vo_get_src_dst_rects(struct vo *vo, struct mp_rect *out_src,
.w = vo->dwidth,
.h = vo->dheight,
.display_par = vo->aspdat.monitor_par,
- .video_par = vo->aspdat.par,
};
if (opts->keepaspect) {
int scaled_width, scaled_height;
diff --git a/video/out/vo_image.c b/video/out/vo_image.c
index 6fcf77e5d6..fd694e77dd 100644
--- a/video/out/vo_image.c
+++ b/video/out/vo_image.c
@@ -95,7 +95,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = asp.orgw,
.h = asp.orgh,
.display_par = sar / dar,
- .video_par = dar / sar,
};
osd_draw_on_image(osd, dim, osd->vo_pts, OSD_DRAW_SUB_ONLY, p->current);
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c
index 0080126c7d..77c9f9f875 100644
--- a/video/out/vo_lavc.c
+++ b/video/out/vo_lavc.c
@@ -493,7 +493,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = asp.orgw,
.h = asp.orgh,
.display_par = sar / dar,
- .video_par = dar / sar,
};
mp_image_set_colorspace_details(vc->lastimg, &vc->colorspace);
diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c
index 3c11f3cac2..cd4b6915ca 100644
--- a/video/out/vo_opengl_old.c
+++ b/video/out/vo_opengl_old.c
@@ -1461,8 +1461,7 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
res = (struct mp_osd_res) {
.w = p->image_width,
.h = p->image_height,
- .display_par = 1.0 / p->osd_res.video_par,
- .video_par = p->osd_res.video_par,
+ .display_par = 1.0 / vo->aspdat.par,
};
gl->MatrixMode(GL_MODELVIEW);
gl->PushMatrix();
diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c
index df9ff2ce5d..9a9097acf1 100644
--- a/video/out/vo_vaapi.c
+++ b/video/out/vo_vaapi.c
@@ -427,7 +427,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = p->image_params.w,
.h = p->image_params.h,
.display_par = 1.0 / vo->aspdat.par,
- .video_par = vo->aspdat.par,
};
struct mp_osd_res *res;
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index b86f0e5f6b..00d5217219 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -620,7 +620,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = ctx->image_width,
.h = ctx->image_height,
.display_par = 1.0 / vo->aspdat.par,
- .video_par = vo->aspdat.par,
};
osd_draw_on_image(osd, res, osd->vo_pts, 0, &img);