1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-11 08:37:59 +00:00

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.
This commit is contained in:
wm4 2013-11-24 13:07:49 +01:00
parent e5311586ab
commit 4012c4a96e
10 changed files with 2 additions and 12 deletions

View File

@ -283,7 +283,6 @@ static void add_subs(struct MPContext *mpctx, struct mp_image *image)
.w = image->w, .w = image->w,
.h = image->h, .h = image->h,
.display_par = sar / dar, .display_par = sar / dar,
.video_par = dar / sar,
}; };
osd_draw_on_image(mpctx->osd, res, mpctx->osd->vo_pts, osd_draw_on_image(mpctx->osd, res, mpctx->osd->vo_pts,

View File

@ -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 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.mr == b.mr && a.mb == b.mb
&& a.display_par == b.display_par && a.display_par == b.display_par;
&& a.video_par == b.video_par;
} }
struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib) struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib)

View File

@ -80,7 +80,6 @@ struct mp_osd_res {
int w, h; // screen dimensions, including black borders int w, h; // screen dimensions, including black borders
int mt, mb, ml, mr; // borders (top, bottom, left, right) int mt, mb, ml, mr; // borders (top, bottom, left, right)
double display_par; double display_par;
double video_par; // PAR of the original video (for some sub decoders)
}; };
enum mp_osdtype { enum mp_osdtype {

View File

@ -73,7 +73,6 @@ static int config(struct vf_instance *vf,
.mt = vf->priv->opt_top_margin, .mt = vf->priv->opt_top_margin,
.mb = vf->priv->opt_bottom_margin, .mb = vf->priv->opt_bottom_margin,
.display_par = sar / dar, .display_par = sar / dar,
.video_par = dar / sar,
}; };
return vf_next_config(vf, vf->priv->outw, vf->priv->outh, d_width, return vf_next_config(vf, vf->priv->outw, vf->priv->outh, d_width,

View File

@ -562,7 +562,6 @@ void vo_get_src_dst_rects(struct vo *vo, struct mp_rect *out_src,
.w = vo->dwidth, .w = vo->dwidth,
.h = vo->dheight, .h = vo->dheight,
.display_par = vo->aspdat.monitor_par, .display_par = vo->aspdat.monitor_par,
.video_par = vo->aspdat.par,
}; };
if (opts->keepaspect) { if (opts->keepaspect) {
int scaled_width, scaled_height; int scaled_width, scaled_height;

View File

@ -95,7 +95,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = asp.orgw, .w = asp.orgw,
.h = asp.orgh, .h = asp.orgh,
.display_par = sar / dar, .display_par = sar / dar,
.video_par = dar / sar,
}; };
osd_draw_on_image(osd, dim, osd->vo_pts, OSD_DRAW_SUB_ONLY, p->current); osd_draw_on_image(osd, dim, osd->vo_pts, OSD_DRAW_SUB_ONLY, p->current);

View File

@ -493,7 +493,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = asp.orgw, .w = asp.orgw,
.h = asp.orgh, .h = asp.orgh,
.display_par = sar / dar, .display_par = sar / dar,
.video_par = dar / sar,
}; };
mp_image_set_colorspace_details(vc->lastimg, &vc->colorspace); mp_image_set_colorspace_details(vc->lastimg, &vc->colorspace);

View File

@ -1461,8 +1461,7 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
res = (struct mp_osd_res) { res = (struct mp_osd_res) {
.w = p->image_width, .w = p->image_width,
.h = p->image_height, .h = p->image_height,
.display_par = 1.0 / p->osd_res.video_par, .display_par = 1.0 / vo->aspdat.par,
.video_par = p->osd_res.video_par,
}; };
gl->MatrixMode(GL_MODELVIEW); gl->MatrixMode(GL_MODELVIEW);
gl->PushMatrix(); gl->PushMatrix();

View File

@ -427,7 +427,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = p->image_params.w, .w = p->image_params.w,
.h = p->image_params.h, .h = p->image_params.h,
.display_par = 1.0 / vo->aspdat.par, .display_par = 1.0 / vo->aspdat.par,
.video_par = vo->aspdat.par,
}; };
struct mp_osd_res *res; struct mp_osd_res *res;

View File

@ -620,7 +620,6 @@ static void draw_osd(struct vo *vo, struct osd_state *osd)
.w = ctx->image_width, .w = ctx->image_width,
.h = ctx->image_height, .h = ctx->image_height,
.display_par = 1.0 / vo->aspdat.par, .display_par = 1.0 / vo->aspdat.par,
.video_par = vo->aspdat.par,
}; };
osd_draw_on_image(osd, res, osd->vo_pts, 0, &img); osd_draw_on_image(osd, res, osd->vo_pts, 0, &img);