From 82c30c6c2d004a406d4f7fa62e6ea59e800dbdf0 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Thu, 19 Nov 2020 18:50:22 +0100 Subject: [PATCH] Flatpak: add fix ass subtitles smooth scaling patch Fix for ass subtitles jittering animations. More info in my GStreamer MR: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1822 --- ...plugins-bad-assrender-smooth-scaling.patch | 30 +++++++++++++++++++ .../gstreamer-1.0/gst-plugins-bad.json | 4 +++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/flatpak/gstreamer-1.0/gst-plugins-bad-assrender-smooth-scaling.patch diff --git a/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad-assrender-smooth-scaling.patch b/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad-assrender-smooth-scaling.patch new file mode 100644 index 00000000..c4b236a4 --- /dev/null +++ b/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad-assrender-smooth-scaling.patch @@ -0,0 +1,30 @@ +From 1c8538d8f8c2181106d626d67784af6db094036e Mon Sep 17 00:00:00 2001 +From: Rafostar +Date: Thu, 19 Nov 2020 18:03:11 +0100 +Subject: [PATCH] assrender: fix smooth scaling by disabling hinting + +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. +--- + ext/assrender/gstassrender.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/assrender/gstassrender.c b/ext/assrender/gstassrender.c +index e99458bf29..111987b9d8 100644 +--- a/ext/assrender/gstassrender.c ++++ b/ext/assrender/gstassrender.c +@@ -916,7 +916,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); +-- +GitLab + diff --git a/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad.json b/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad.json index 06f3d992..1b4184fb 100644 --- a/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad.json +++ b/pkgs/flatpak/gstreamer-1.0/gst-plugins-bad.json @@ -36,6 +36,10 @@ { "type": "patch", "path": "gst-plugins-bad-vah264dec-fix-seeking-errors.patch" + }, + { + "type": "patch", + "path": "gst-plugins-bad-assrender-smooth-scaling.patch" } ] }