summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-19 20:13:48 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-26 20:38:53 +0200
commit966340b31a7bc53e922118da1cd4783d6a06483d (patch)
tree42baeb10ecd31e591b6c893269451adffe4eff0e /libvo
parent8612c771fcb7321a2d6e0ba79f6f3cf26ee7f70c (diff)
downloadmpv-966340b31a7bc53e922118da1cd4783d6a06483d.tar.bz2
mpv-966340b31a7bc53e922118da1cd4783d6a06483d.tar.xz
subs: use correct font aspect ratio for libass + converted subs
Rendering of ASS subtitles tries to be bug compatible with VSFilter and stretches fonts when the video is anamorphic (some scripts try to compensate for this VSFilter behavior, so trying to render them "correctly" would give the wrong result). However this behavior is not appropriate for subtitles we converted to ASS format ourselves for libass rendering, as they certainly don't have VSFilter bug workarounds. Change the code to use different behavior for "native" ASS tracks and converted ones. It's questionable whether the VSFilter-compatible behavior is appropriate for external .ass files either, as there could be anamorphic and non-anamorphic versions of the same video and the bug-compatible behavior can only be correct for one alternative at most. However it's probably better to keep it as a default at least, so that extracting a muxed subtitle track and using that does not give behavior different from the original muxed one. The aspect ratio setting is per ASS_Renderer, and changing it resets libass caches. For that reason this commit adds separate renderer instances to use for the "correct" and "VSFilter bug compatible" cases.
Diffstat (limited to 'libvo')
-rw-r--r--libvo/sub.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libvo/sub.h b/libvo/sub.h
index 12d5474e5f..8309613ea6 100644
--- a/libvo/sub.h
+++ b/libvo/sub.h
@@ -19,6 +19,8 @@
#ifndef MPLAYER_SUB_H
#define MPLAYER_SUB_H
+#include <stdbool.h>
+
typedef struct mp_osd_bbox_s {
int x1,y1,x2,y2;
} mp_osd_bbox_t;
@@ -70,6 +72,8 @@ struct osd_state {
unsigned char osd_text[128];
struct font_desc *sub_font;
struct ass_track *ass_track;
+ bool ass_track_changed;
+ bool vsfilter_aspect;
};
#include "subreader.h"