diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-08-06 17:32:07 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-08-06 17:32:07 +0000 |
commit | 71941e7a9cbf024036c1896e7bc954d78401bc2e (patch) | |
tree | 1ebd28e3bc6f722a3af5615231fc643d0eef7887 /Game/Code/Classes | |
parent | 91b8d206affb6c40cd874d17174a789414f6d4a9 (diff) | |
download | usdx-71941e7a9cbf024036c1896e7bc954d78401bc2e.tar.gz usdx-71941e7a9cbf024036c1896e7bc954d78401bc2e.tar.xz usdx-71941e7a9cbf024036c1896e7bc954d78401bc2e.zip |
RenderAspect is not needed
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1222 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/UVideo.pas | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Game/Code/Classes/UVideo.pas b/Game/Code/Classes/UVideo.pas index 9b55aa35..e03eb894 100644 --- a/Game/Code/Classes/UVideo.pas +++ b/Game/Code/Classes/UVideo.pas @@ -611,6 +611,12 @@ begin Exit; end; + // TODO: support for pan&scan + //if (AVFrame.pan_scan <> nil) then + //begin + // Writeln(Format('PanScan: %d/%d', [AVFrame.pan_scan.width, AVFrame.pan_scan.height])); + //end; + // otherwise we convert the pixeldata from YUV to RGB {$IFDEF UseSWScale} errnum := sws_scale(SoftwareScaleContext, @(AVFrame.data), @(AVFrame.linesize), @@ -661,7 +667,7 @@ var ScreenUpperPos, ScreenLowerPos: Single; ScaledVideoWidth, ScaledVideoHeight: Single; ScreenMidPosX, ScreenMidPosY: Single; - ScreenAspect, RenderAspect: Single; + ScreenAspect: Single; begin // have a nice black background to draw on (even if there were errors opening the vid) if (Screen = 1) then @@ -683,14 +689,13 @@ begin // correction because of the white bars at the top and bottom. ScreenAspect := ScreenW / ScreenH; - RenderAspect := RenderW / RenderH; ScaledVideoWidth := RenderW; - ScaledVideoHeight := ScaledVideoWidth/VideoAspect * ScreenAspect/RenderAspect; + ScaledVideoHeight := RenderH * ScreenAspect/VideoAspect; // Note: Scaling the width does not look good because the video might contain // black borders at the top already //ScaledVideoHeight := RenderH; - //ScaledVideoWidth := ScaledVideoHeight*VideoAspect * RenderAspect/ScreenAspect; + //ScaledVideoWidth := RenderW * VideoAspect/ScreenAspect; // center the video ScreenMidPosX := RenderW/2; |