summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-18 17:31:00 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:33 +0200
commit98f74335d509320f19db2da8786273f95cad2a69 (patch)
treefe0e36c96a26208ea87464a333ed89d056596ddb /libvo/video_out.h
parentd5def80afbdc7d20a22f2f630cdd34c60a0b99a9 (diff)
downloadmpv-98f74335d509320f19db2da8786273f95cad2a69.tar.bz2
mpv-98f74335d509320f19db2da8786273f95cad2a69.tar.xz
sub: fix text subtitle aspect ratio with vo_xv and vo_lavc, refactor
This fixes that vo_xv didn't display text subtitles correctly when using anamorphic video. It didn't pass the aspect information to the subtitle renderer. Also, try to render OSD correctly with respect to aspect ratio settings: on vo_xv, the OSD is rendered into the video, and needs to be "stretched" too when playing anamorphic video. When the -monitorpixelaspect option is used, even with VOs such as vo_opengl the OSD has to be rendered with that aspect ratio. As preparation for future commits, replace the weird vsfilter_scale value with a somewhat more sensible video_par member. Also, struct mp_eosd_res is a better place for the aspect ratio parameters, as OSD needs this too. Use osd_draw_on_image() directly in vo_lavc, which fixes aspect ratio issues as well.
Diffstat (limited to 'libvo/video_out.h')
-rw-r--r--libvo/video_out.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 5bd84ab4af..2689c244a8 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -265,12 +265,13 @@ struct vo {
int panscan_x;
int panscan_y;
float panscan_amount;
- float monitor_aspect;
+ float monitor_par;
struct aspect_data {
int orgw; // real width
int orgh; // real height
int prew; // prescaled width
int preh; // prescaled height
+ float par; // pixel aspect ratio out of orgw/orgh and prew/preh
int scrw; // horizontal resolution
int scrh; // vertical resolution
float asp;