[Scummvm-cvs-logs] scummvm master -> 5b3705660dd075ed249b3f18ef106e71f259af21

bluegr bluegr at gmail.com
Sun Jan 11 03:52:28 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5b3705660d ZVISION: Avoid using floating point math when upscaling subtitle timing


Commit: 5b3705660dd075ed249b3f18ef106e71f259af21
    https://github.com/scummvm/scummvm/commit/5b3705660dd075ed249b3f18ef106e71f259af21
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-01-11T04:51:07+02:00

Commit Message:
ZVISION: Avoid using floating point math when upscaling subtitle timing

Spotted by clone2727

Changed paths:
    engines/zvision/text/subtitles.cpp



diff --git a/engines/zvision/text/subtitles.cpp b/engines/zvision/text/subtitles.cpp
index d549e2a..ffc9e2b 100644
--- a/engines/zvision/text/subtitles.cpp
+++ b/engines/zvision/text/subtitles.cpp
@@ -71,8 +71,8 @@ Subtitle::Subtitle(ZVision *engine, const Common::String &subname, bool upscaleT
 					if (sb <= (int32)_subs.size()) {
 						if (upscaleToHires) {
 							// Convert from 15FPS (AVI) to 29.97FPS (VOB)
-							st = st * 29.97 / 15;
-							en = en * 29.97 / 15;
+							st = st * 2997 / 1500;
+							en = en * 2997 / 1500;
 						}
 						_subs[sb].start = st;
 						_subs[sb].stop = en;






More information about the Scummvm-git-logs mailing list