aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2016-03-07 22:20:35 +0100
committerGravatar wm4 <wm4@nowhere>2016-03-07 22:20:35 +0100
commitb7617f42d873adceebd3904d906e4eff818240ed (patch)
tree7ad9d5cd5eaa7a5124c20b5da8ad426b17f1bdd6
parentc53c6bbd387ca582091a8bfca33140d65c200be0 (diff)
osd: remove unused osd_coords_to_video()
Used to be used for dvdnav.
-rw-r--r--sub/osd.c19
-rw-r--r--sub/osd.h3
2 files changed, 0 insertions, 22 deletions
diff --git a/sub/osd.c b/sub/osd.c
index fd821923e5..81cfb7daa6 100644
--- a/sub/osd.c
+++ b/sub/osd.c
@@ -437,25 +437,6 @@ void osd_object_get_scale_factor(struct osd_state *osd, int obj,
*sh = voh ? nh / (double)voh : 0;
}
-// Turn *x and *y, which are given in OSD coordinates, to video coordinates.
-// frame_w and frame_h give the dimensions of the original, unscaled video.
-// (This gives correct results only after the OSD has been updated after a
-// resize or video reconfig.)
-void osd_coords_to_video(struct osd_state *osd, int frame_w, int frame_h,
- int *x, int *y)
-{
- pthread_mutex_lock(&osd->lock);
- struct mp_osd_res res = osd->objs[OSDTYPE_OSD]->vo_res;
- int vidw = res.w - res.ml - res.mr;
- int vidh = res.h - res.mt - res.mb;
- double xscale = (double)vidw / frame_w;
- double yscale = (double)vidh / frame_h;
- // The OSD size + margins make up the scaled rectangle of the video.
- *x = (*x - res.ml) / xscale;
- *y = (*y - res.mt) / yscale;
- pthread_mutex_unlock(&osd->lock);
-}
-
struct mp_osd_res osd_get_vo_res(struct osd_state *osd, int obj)
{
pthread_mutex_lock(&osd->lock);
diff --git a/sub/osd.h b/sub/osd.h
index b41a2eec7a..4e18ce7f7c 100644
--- a/sub/osd.h
+++ b/sub/osd.h
@@ -193,9 +193,6 @@ struct mp_osd_res osd_res_from_image_params(const struct mp_image_params *p);
void osd_object_get_scale_factor(struct osd_state *osd, int obj,
double *sw, double *sh);
-void osd_coords_to_video(struct osd_state *osd, int frame_w, int frame_h,
- int *x, int *y);
-
struct mp_osd_res osd_get_vo_res(struct osd_state *osd, int obj);
void osd_rescale_bitmaps(struct sub_bitmaps *imgs, int frame_w, int frame_h,