summaryrefslogtreecommitdiffstats
path: root/sub/img_convert.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:36:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:36:56 +0000
commit51de1d8436100f725f3576aefa24a2bd2057bc28 (patch)
treec6d1d5264b6d40a8d7ca34129f36b7d61e188af3 /sub/img_convert.h
parentInitial commit. (diff)
downloadmpv-51de1d8436100f725f3576aefa24a2bd2057bc28.tar.xz
mpv-51de1d8436100f725f3576aefa24a2bd2057bc28.zip
Adding upstream version 0.37.0.upstream/0.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sub/img_convert.h')
-rw-r--r--sub/img_convert.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sub/img_convert.h b/sub/img_convert.h
new file mode 100644
index 0000000..e03c155
--- /dev/null
+++ b/sub/img_convert.h
@@ -0,0 +1,23 @@
+#ifndef MPLAYER_SUB_IMG_CONVERT_H
+#define MPLAYER_SUB_IMG_CONVERT_H
+
+#include <stdbool.h>
+
+struct sub_bitmaps;
+struct sub_bitmap;
+struct mp_rect;
+
+// Sub postprocessing
+void mp_blur_rgba_sub_bitmap(struct sub_bitmap *d, double gblur);
+
+bool mp_sub_bitmaps_bb(struct sub_bitmaps *imgs, struct mp_rect *out_bb);
+
+// Intentionally limit the maximum number of bounding rects to something low.
+// This prevents the algorithm from degrading to O(N^2).
+// Most subtitles yield a very low number of bounding rects (<5).
+#define MP_SUB_BB_LIST_MAX 15
+
+int mp_get_sub_bb_list(struct sub_bitmaps *sbs, struct mp_rect *out_rc_list,
+ int rc_list_count);
+
+#endif