videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp
changeset 41 229f037ce963
parent 38 ff53afa8ad05
child 42 17f382c040b1
--- a/videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp	Fri Jun 11 09:44:20 2010 +0300
+++ b/videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp	Thu Jun 24 09:49:13 2010 +0300
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version:  21 %
+// Version : %version:  22 %
 
 #include <sysutil.h>
 #include <s32file.h>
@@ -275,18 +275,22 @@
 
         //
         //  if can't find out match aspect ratio in dat file,
-        //  choose the scaling type through the rule
-        //      videoAspectRatio - aDisplayAspectRatio > 0.1 ==> zoom
-        //      videoAspectRatio - aDisplayAspectRatio < 0.1 ==> stretch
-        //      videoAspectRatio = aDisplayAspectRatio ==> natural
+        //  choose the scaling type through the rule        
+        //      aspectRatioDiff =  videoAspectRatio - aDisplayAspectRatio
+        //      aspectRatioDiff ==  0        ==> natural
+        //      aspectRatioDiff > 0.1        ==> zoom
+        //      aspectRatioDiff < - 0.3      ==> natural
+        //      aspectRatioDiff >= - 0.3 and <= 0.1   ==> stretch
         //
+        
         if ( i == cnt )
         {
             if ( videoAspectRatio - aDisplayAspectRatio > 0.1 )
             {
                 scalingType = EMMFZoom;
             }
-            else if ( videoAspectRatio != aDisplayAspectRatio )
+            else if ( ( videoAspectRatio != aDisplayAspectRatio ) &&
+                      ( videoAspectRatio - aDisplayAspectRatio > (- 0.3) ) )
             {
                 scalingType = EMMFStretch;
             }