comparison mm7_2.cpp @ 1600:0016b08ab621

stru350::sub_451007_scale_image_bicubic - fixing a memory access bug
author Grumpy7
date Wed, 11 Sep 2013 04:27:36 +0200
parents 9a6567c6c76c
children c58916c53d8e
comparison
equal deleted inserted replaced
1599:bb2378f58767 1600:0016b08ab621
921 result = (int)pDst; 921 result = (int)pDst;
922 v193 = pDst; 922 v193 = pDst;
923 v231 = 0; 923 v231 = 0;
924 if ( dstHeight <= 0 ) 924 if ( dstHeight <= 0 )
925 return result; 925 return result;
926
926 do 927 do
927 { 928 {
928 for (int counter = 0; counter < dstWidth; counter++) 929 for (int counter = 0; counter < dstWidth; counter++)
929 { 930 {
930 a6s = (double)counter / (double)dstWidth * (double)srcWidth; 931 a6s = (double)counter / (double)dstWidth * (double)srcWidth;
946 { 947 {
947 int ratioDiff = widthRatioPlusOne - widthRatio; 948 int ratioDiff = widthRatioPlusOne - widthRatio;
948 for(int i = 0; i < ratioDiff; i++) 949 for(int i = 0; i < ratioDiff; i++)
949 { 950 {
950 if(field0value == 32) 951 if(field0value == 32)
951 v21 = _450FB1((int)v175[i]); 952 v21 = _450FB1(((int*)v175)[i]);
952 else if(field0value == 16) 953 else if(field0value == 16)
953 v21 = _450FB1((_WORD)v175[i]); 954 v21 = _450FB1(((_WORD*)v175)[i]);
954 else 955 else
955 v21 = _450FB1((unsigned __int8)v175[i]); 956 v21 = _450FB1(((unsigned __int8*)v175)[i]);
956 v240 += ((unsigned int)v21 >> 24); 957 v240 += ((unsigned int)v21 >> 24);
957 a6b += BYTE2(v21); 958 a6b += BYTE2(v21);
958 v252 += BYTE1(v21); 959 v252 += BYTE1(v21);
959 v251 += (unsigned __int8)v21; 960 v251 += (unsigned __int8)v21;
960 } 961 }