summaryrefslogtreecommitdiffstats
path: root/dec_video.c
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-01 15:58:31 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-01 15:58:31 +0000
commit813e82a7eac31680db3ea431cc6758120579ce1c (patch)
tree89b64df8fcc634c53425ed03ef722bfce2250597 /dec_video.c
parenta47ac752e5da5b4d056ca1d8a511c660aedbae4b (diff)
downloadmpv-813e82a7eac31680db3ea431cc6758120579ce1c.tar.bz2
mpv-813e82a7eac31680db3ea431cc6758120579ce1c.tar.xz
New aspect prescale code, parses aspect value from mpeg sequence header or commandline.
Removed X11_FULLSCREEN hack from mplayer.c and moved it to libvo/vo_xv.c. Added support for nominator[:/]denominator float values in cfg-parser, thanks for the code by Steve Davies. All around thanks to Steve for helping me understanding the whole stuff :) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2032 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r--dec_video.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/dec_video.c b/dec_video.c
index 012c4dafa7..ed1bf4e167 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -673,6 +673,26 @@ switch(d_video->demuxer->file_format){
return 0;
}
}
+ // fill aspect info:
+ switch(picture->aspect_ratio_information){
+ case 2: // PAL/NTSC SVCD/DVD 4:3
+ case 8: // PAL VCD 4:3
+ case 12: // NTSC VCD 4:3
+ sh_video->aspect=4.0/3.0;
+ break;
+ case 3: // PAL/NTSC Widescreen SVCD/DVD 16:9
+ sh_video->aspect=16.0/9.0;
+ break;
+ default:
+ fprintf(stderr,"Detected unknown aspect_ratio_information in mpeg sequence header.\n"
+ "Please report the aspect value (%i) along with the movie type (VGA,PAL,NTSC,"
+ "SECAM) and the movie resolution (720x576,352x240,480x480,...) to the MPlayer"
+ " developers, so that we can add support for it!\nAssuming 1:1 aspect for now.\n",
+ picture->aspect_ratio_information);
+ case 1: // VGA 1:1
+ sh_video->aspect=1.0;
+ break;
+ }
// display info:
sh_video->format=picture->mpeg1?0x10000001:0x10000002; // mpeg video
sh_video->fps=frameratecode2framerate[picture->frame_rate_code]*0.0001f;