assrender: fix smooth scaling by disabling hinting
authorRafał Dzięgiel <rafostar.github@gmail.com>
Thu, 19 Nov 2020 17:03:11 +0000 (18:03 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 20 Oct 2021 09:57:43 +0000 (09:57 +0000)
When ass hinting value is set to anything other than NONE,
subtitles cannot use smooth scaling, thus all animations will jitter.

The libass author warns about possibility of breaking some scripts when it is enabled,
so lets do what is recommended and disable it to get the smooth scaling working.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1201>

subprojects/gst-plugins-bad/ext/assrender/gstassrender.c

index d921ae4..175fc06 100644 (file)
@@ -923,7 +923,7 @@ gst_ass_render_negotiate (GstAssRender * render, GstCaps * caps)
     ass_set_pixel_aspect (render->ass_renderer,
         (gdouble) render->info.par_n / (gdouble) render->info.par_d);
     ass_set_font_scale (render->ass_renderer, 1.0);
-    ass_set_hinting (render->ass_renderer, ASS_HINTING_LIGHT);
+    ass_set_hinting (render->ass_renderer, ASS_HINTING_NONE);
 
     ass_set_fonts (render->ass_renderer, "Arial", "sans-serif", 1, NULL, 1);
     ass_set_fonts (render->ass_renderer, NULL, "Sans", 1, NULL, 1);