for (i = 0; i < (outHeight + 1) / 2; i++)
{
/* Get input row index based on row scale factor */
- iRow = (i * scaleY >> 8) * inWidth/2;
+ iRow = (i * scaleY >> 8) * inWidth;
/* Loop could be unrolled for more optimization */
- for (j = 0; j < (outWidth)/2; j++)
+ for (j = 0; j < (outWidth + 1)/2; j++)
{
/* Get input index based on column scale factor */
- iIndex = iRow + pColLUT[j];
+ iIndex = iRow + (pColLUT[j] * 2);
*pOutUV++ = pDataIn[iIndex + ipixelcount];
*pOutUV++ = pDataIn[iIndex + ipixelcount + 1];