summaryrefslogtreecommitdiffstats
path: root/sub/sub.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-07 22:02:03 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:33 +0200
commitfd5c4a19849b768986a0e652bb2f398c922f42dd (patch)
tree8a4092652c4e79bc0b01f13bab6d6b3d0984ef26 /sub/sub.c
parent7b203b5e05d9873e279f8432d4ffb3d9facc5e23 (diff)
downloadmpv-fd5c4a19849b768986a0e652bb2f398c922f42dd.tar.bz2
mpv-fd5c4a19849b768986a0e652bb2f398c922f42dd.tar.xz
Remove things related to old OSD
To ease changing all the VOs to the new OSD rendering, fallbacks, conversions, support code etc. was left all over the code. Now that all VOs have been changed, all that code is inactive. Remove it. Strip down spudec.c. We don't need the old grayscale and scaling stuff anymore. (Not removing spudec itself yet - I'm not confident that the libavcodec DVD sub decoder is sufficient, and it would also require some hacks to get DVD palette and resolution information from libdvdread to libavcodec.) The option --spuaa, --spualign, --spugauss were used with the old sub scaling code, and don't do anything anymore.
Diffstat (limited to 'sub/sub.c')
-rw-r--r--sub/sub.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/sub/sub.c b/sub/sub.c
index f175563974..862f5d1f6e 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -219,16 +219,6 @@ static bool render_object(struct osd_state *osd, struct osd_object *obj,
cached |= osd_conv_idx_to_rgba(obj->cache[0], out_imgs);
}
- if (formats[SUBBITMAP_OLD_PLANAR] && out_imgs->format == SUBBITMAP_INDEXED)
- {
- cached |= osd_conv_idx_to_old_p(obj->cache[1], out_imgs,
- osd->res.w, osd->res.h);
- }
-
- if (formats[SUBBITMAP_OLD_PLANAR] && out_imgs->format == SUBBITMAP_LIBASS) {
- cached |= osd_conv_ass_to_old_p(obj->cache[2], out_imgs);
- }
-
if (cached)
obj->cached = *out_imgs;
@@ -325,48 +315,6 @@ bool osd_draw_on_image(struct osd_state *osd, struct mp_image *dest,
return changed;
}
-void osd_draw_text_ext(struct osd_state *osd, int w, int h,
- int ml, int mt, int mr, int mb, int unused0, int unused1,
- void (*draw_alpha)(void *ctx, int x0, int y0, int w,
- int h, unsigned char* src,
- unsigned char *srca,
- int stride),
- void *ctx)
-{
- struct mp_eosd_res dim =
- {.w = w, .h = h, .ml = ml, .mt = mt, .mr = mr, .mb = mb};
- osd_update_ext(osd, dim);
- struct sub_render_params subparams = {
- .pts = osd->vo_sub_pts,
- .dim = dim,
- .normal_scale = 1,
- .vsfilter_scale = 1, // unknown
- };
- for (int n = 0; n < MAX_OSD_PARTS; n++) {
- struct osd_object *obj = osd->objs[n];
- if (obj->is_sub && osd->render_subs_in_filter)
- continue;
- struct sub_bitmaps imgs;
- bool formats[SUBBITMAP_COUNT] = {[SUBBITMAP_OLD_PLANAR] = true};
- if (render_object(osd, obj, &imgs, &subparams, formats)) {
- assert(imgs.num_parts == 1);
- struct sub_bitmap *part = &imgs.parts[0];
- struct old_osd_planar *bmp = part->bitmap;
- draw_alpha(ctx, part->x, part->y, part->w, part->h,
- bmp->bitmap, bmp->alpha, part->stride);
- }
- }
-}
-
-void osd_draw_text(struct osd_state *osd, int w, int h,
- void (*draw_alpha)(void *ctx, int x0, int y0, int w, int h,
- unsigned char* src, unsigned char *srca,
- int stride),
- void *ctx)
-{
- osd_draw_text_ext(osd, w, h, 0, 0, 0, 0, 0, 0, draw_alpha, ctx);
-}
-
void vo_osd_changed(int new_value)
{
struct osd_state *osd = global_osd;