Merge to XFA: Remove typdefs for pointer types in fx_system.h.
[pdfium.git] / core / src / fxcodec / codec / fx_codec_progress.cpp
index d6ef063..da64eed 100644 (file)
@@ -350,7 +350,7 @@ FX_BOOL CCodec_ProgressiveDecoder::PngReadHeaderFunc(void* pModule, int width, i
     *gamma = FXCODEC_PNG_GAMMA;\r
     return TRUE;\r
 }\r
-FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line, FX_LPBYTE& src_buf)\r
+FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line, uint8_t*& src_buf)\r
 {\r
     CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;\r
     CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;\r
@@ -361,8 +361,8 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
     if(line >= pCodec->m_clipBox.top && line < pCodec->m_clipBox.bottom) {\r
         double scale_y = (double)pCodec->m_sizeY / (double)pCodec->m_clipBox.Height();\r
         int32_t row = (int32_t)((line - pCodec->m_clipBox.top) * scale_y) + pCodec->m_startY;\r
-        FX_LPBYTE src_scan = (FX_LPBYTE)pDIBitmap->GetScanline(row);\r
-        FX_LPBYTE des_scan = pCodec->m_pDecodeBuf;\r
+        uint8_t* src_scan = (uint8_t*)pDIBitmap->GetScanline(row);\r
+        uint8_t* des_scan = pCodec->m_pDecodeBuf;\r
         src_buf = pCodec->m_pDecodeBuf;\r
         int32_t src_Bpp = pDIBitmap->GetBPP() >> 3;\r
         int32_t des_Bpp = (pCodec->m_SrcFormat & 0xff) >> 3;\r
@@ -393,11 +393,11 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
                 case FXDIB_Rgb:\r
                 case FXDIB_Rgb32: {\r
                         FX_DWORD des_b = 0, des_g = 0, des_r = 0;\r
-                        FX_LPCBYTE p = src_scan + src_col * src_Bpp;\r
+                        const uint8_t* p = src_scan + src_col * src_Bpp;\r
                         des_b += pPixelWeights->m_Weights[0] * (*p++);\r
                         des_g += pPixelWeights->m_Weights[0] * (*p++);\r
                         des_r += pPixelWeights->m_Weights[0] * (*p);\r
-                        FX_LPBYTE pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];\r
+                        uint8_t* pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];\r
                         *pDes++ = (uint8_t)((des_b) >> 16);\r
                         *pDes++ = (uint8_t)((des_g) >> 16);\r
                         *pDes  = (uint8_t)((des_r) >> 16);\r
@@ -405,11 +405,11 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
                     break;\r
                 case FXDIB_Argb: {\r
                         FX_DWORD des_r = 0, des_g = 0, des_b = 0;\r
-                        FX_LPCBYTE p = src_scan + src_col * src_Bpp;\r
+                        const uint8_t* p = src_scan + src_col * src_Bpp;\r
                         des_b += pPixelWeights->m_Weights[0] * (*p++);\r
                         des_g += pPixelWeights->m_Weights[0] * (*p++);\r
                         des_r += pPixelWeights->m_Weights[0] * (*p++);\r
-                        FX_LPBYTE pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];\r
+                        uint8_t* pDes = &des_scan[pPixelWeights->m_SrcStart * des_Bpp];\r
                         *pDes++ = (uint8_t)((des_b) >> 16);\r
                         *pDes++ = (uint8_t)((des_g) >> 16);\r
                         *pDes++        = (uint8_t)((des_r) >> 16);\r
@@ -423,9 +423,9 @@ FX_BOOL CCodec_ProgressiveDecoder::PngAskScanlineBufFunc(void* pModule, int line
     }\r
     return TRUE;\r
 }\r
-void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, FX_LPBYTE src_scan, FXCodec_Format src_format)\r
+void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, int32_t des_line, uint8_t* src_scan, FXCodec_Format src_format)\r
 {\r
-    FX_LPBYTE des_scan = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_line);\r
+    uint8_t* des_scan = (uint8_t*)pDeviceBitmap->GetScanline(des_line);\r
     int32_t src_Bpp = (m_SrcFormat & 0xff) >> 3;\r
     int32_t des_Bpp = pDeviceBitmap->GetBPP() >> 3;\r
     int32_t src_left = m_clipBox.left;\r
@@ -453,7 +453,7 @@ void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBi
             case FXDIB_Rgb:\r
             case FXDIB_Rgb32: {\r
                     FX_DWORD des_b = 0, des_g = 0, des_r = 0;\r
-                    FX_LPCBYTE p = src_scan;\r
+                    const uint8_t* p = src_scan;\r
                     p = src_scan + pPixelWeights->m_SrcStart * src_Bpp;\r
                     des_b += pPixelWeights->m_Weights[0] * (*p++);\r
                     des_g += pPixelWeights->m_Weights[0] * (*p++);\r
@@ -470,7 +470,7 @@ void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBi
                 break;\r
             case FXDIB_Argb: {\r
                     FX_DWORD des_a = 0, des_b = 0, des_g = 0, des_r = 0;\r
-                    FX_LPCBYTE p = src_scan;\r
+                    const uint8_t* p = src_scan;\r
                     p = src_scan + pPixelWeights->m_SrcStart * src_Bpp;\r
                     des_b += pPixelWeights->m_Weights[0] * (*p++);\r
                     des_g += pPixelWeights->m_Weights[0] * (*p++);\r
@@ -560,7 +560,7 @@ void CCodec_ProgressiveDecoder::GifRecordCurrentPositionCallback(void* pModule,
     FX_DWORD remain_size = pCodec->m_pCodecMgr->GetGifModule()->GetAvailInput(pCodec->m_pGifContext);\r
     cur_pos = pCodec->m_offSet - remain_size;\r
 }\r
-FX_LPBYTE CCodec_ProgressiveDecoder::GifAskLocalPaletteBufCallback(void* pModule, int32_t frame_num, int32_t pal_size)\r
+uint8_t* CCodec_ProgressiveDecoder::GifAskLocalPaletteBufCallback(void* pModule, int32_t frame_num, int32_t pal_size)\r
 {\r
     return FX_Alloc(uint8_t, pal_size);\r
 }\r
@@ -575,9 +575,9 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
     if(!pCodec->GifReadMoreData(pCodec->m_pCodecMgr->GetGifModule(), error_status)) {\r
         return FALSE;\r
     }\r
-    FX_LPBYTE pPalette = NULL;\r
+    uint8_t* pPalette = NULL;\r
     if(pal_num != 0 && pal_ptr) {\r
-        pPalette = (FX_LPBYTE)pal_ptr;\r
+        pPalette = (uint8_t*)pal_ptr;\r
     } else {\r
         pal_num = pCodec->m_GifPltNumber;\r
         pPalette = pCodec->m_pGifPalette;\r
@@ -617,7 +617,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
     int Bpp = pDevice->GetBPP() / 8;\r
     FX_ARGB argb = pCodec->m_pSrcPalette[pal_index];\r
     for (int row = 0; row < sizeY; row ++) {\r
-        FX_LPBYTE pScanline = (FX_LPBYTE)pDevice->GetScanline(row + startY) + startX * Bpp;\r
+        uint8_t* pScanline = (uint8_t*)pDevice->GetScanline(row + startY) + startX * Bpp;\r
         switch(pCodec->m_TransMethod) {\r
             case 3:    {\r
                     uint8_t gray = FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));\r
@@ -644,14 +644,14 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
     }\r
     return TRUE;\r
 }\r
-void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t row_num, FX_LPBYTE row_buf)\r
+void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t row_num, uint8_t* row_buf)\r
 {\r
     CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;\r
     CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;\r
     ASSERT(pDIBitmap != NULL);\r
     int32_t img_width = pCodec->m_GifFrameRect.Width();\r
     if (!pDIBitmap->HasAlpha()) {\r
-        FX_LPBYTE byte_ptr = row_buf;\r
+        uint8_t* byte_ptr = row_buf;\r
         for (int i = 0; i < img_width; i++ ) {\r
             if(*byte_ptr == pCodec->m_GifTransIndex) {\r
                 *byte_ptr = pCodec->m_GifBgIndex;\r
@@ -690,10 +690,10 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
             int des_Bpp = pDIBitmap->GetBPP() >> 3;\r
             FX_DWORD des_ScanOffet = pCodec->m_startX * des_Bpp;\r
             if(des_row + (int)scale_y >= des_bottom - 1) {\r
-                FX_LPBYTE scan_src = (FX_LPBYTE)pDIBitmap->GetScanline(des_row) + des_ScanOffet;\r
+                uint8_t* scan_src = (uint8_t*)pDIBitmap->GetScanline(des_row) + des_ScanOffet;\r
                 int cur_row = des_row;\r
                 while (++cur_row < des_bottom) {\r
-                    FX_LPBYTE scan_des = (FX_LPBYTE)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;\r
+                    uint8_t* scan_des = (uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;\r
                     FX_DWORD size = pCodec->m_sizeX * des_Bpp;\r
                     FXSYS_memcpy32(scan_des, scan_src, size);\r
                 }\r
@@ -714,10 +714,10 @@ void CCodec_ProgressiveDecoder::GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceB
         des_row_1 = des_top;\r
     }\r
     for (; des_row_1 < des_row; des_row_1++) {\r
-        FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;\r
+        uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;\r
         PixelWeight* pWeight = m_WeightVert.GetPixelWeight(des_row_1 - des_top);\r
-        FX_LPCBYTE scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;\r
-        FX_LPCBYTE scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;\r
+        const uint8_t* scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;\r
+        const uint8_t* scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;\r
         for (int des_col = 0; des_col < m_sizeX; des_col++) {\r
             switch(pDeviceBitmap->GetFormat()) {\r
                 case FXDIB_Invalid:\r
@@ -823,7 +823,7 @@ FX_BOOL CCodec_ProgressiveDecoder::BmpInputImagePositionBufCallback(void* pModul
     }\r
     return TRUE;\r
 }\r
-void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t row_num, FX_LPBYTE row_buf)\r
+void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t row_num, uint8_t* row_buf)\r
 {\r
     CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;\r
     CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;\r
@@ -860,19 +860,19 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, doub
     int des_bottom = m_startY + m_sizeY;\r
     int des_row_1 = des_row + int(scale_y);\r
     if(des_row_1 >= des_bottom - 1) {\r
-        FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+        uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
         while (++des_row < des_bottom) {\r
-            FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+            uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
             FX_DWORD size = m_sizeX * des_Bpp;\r
             FXSYS_memcpy32(scan_des, scan_src, size);\r
         }\r
         return;\r
     }\r
     for (; des_row_1 > des_row; des_row_1--) {\r
-        FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;\r
+        uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;\r
         PixelWeight* pWeight = m_WeightVert.GetPixelWeight(des_row_1 - des_top);\r
-        FX_LPCBYTE scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;\r
-        FX_LPCBYTE scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;\r
+        const uint8_t* scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;\r
+        const uint8_t* scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;\r
         for (int des_col = 0; des_col < m_sizeX; des_col++) {\r
             switch(pDeviceBitmap->GetFormat()) {\r
                 case FXDIB_Invalid:\r
@@ -1377,7 +1377,7 @@ void CCodec_ProgressiveDecoder::GetTransMethod(FXDIB_Format des_format, FXCodec_
             m_TransMethod = -1;\r
     }\r
 }\r
-void _RGB2BGR(FX_LPBYTE buffer, int width = 1)\r
+void _RGB2BGR(uint8_t* buffer, int width = 1)\r
 {\r
     if (buffer && width > 0) {\r
         uint8_t temp;\r
@@ -1390,11 +1390,11 @@ void _RGB2BGR(FX_LPBYTE buffer, int width = 1)
         }\r
     }\r
 }\r
-void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, int des_line, FX_LPBYTE src_scan, FXCodec_Format src_format)\r
+void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, int des_line, uint8_t* src_scan, FXCodec_Format src_format)\r
 {\r
     int src_left = m_clipBox.left;\r
     int des_left = m_startX;\r
-    FX_LPBYTE des_scan = pDeviceBitmap->GetBuffer() + des_line * pDeviceBitmap->GetPitch();\r
+    uint8_t* des_scan = pDeviceBitmap->GetBuffer() + des_line * pDeviceBitmap->GetPitch();\r
     int src_bpp = src_format & 0xff;\r
     int des_bpp = pDeviceBitmap->GetBPP();\r
     int src_Bpp = src_bpp >> 3;\r
@@ -1435,7 +1435,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
                     FX_DWORD des_b = 0, des_g = 0, des_r = 0;\r
                     for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {\r
                         int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];\r
-                        FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;\r
+                        const uint8_t* src_pixel = src_scan + j * src_Bpp;\r
                         des_b += pixel_weight * (*src_pixel++);\r
                         des_g += pixel_weight * (*src_pixel++);\r
                         des_r += pixel_weight * (*src_pixel);\r
@@ -1447,7 +1447,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
                     FX_DWORD des_b = 0, des_g = 0, des_r = 0;\r
                     for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {\r
                         int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];\r
-                        FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;\r
+                        const uint8_t* src_pixel = src_scan + j * src_Bpp;\r
                         uint8_t src_b = 0, src_g = 0, src_r = 0;\r
                         AdobeCMYK_to_sRGB1(255 - src_pixel[0], 255 - src_pixel[1], 255 - src_pixel[2], 255 - src_pixel[3],\r
                                            src_r, src_g, src_b);\r
@@ -1520,7 +1520,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
                     FX_DWORD des_b = 0, des_g = 0, des_r = 0;\r
                     for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {\r
                         int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];\r
-                        FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;\r
+                        const uint8_t* src_pixel = src_scan + j * src_Bpp;\r
                         des_b += pixel_weight * (*src_pixel++);\r
                         des_g += pixel_weight * (*src_pixel++);\r
                         des_r += pixel_weight * (*src_pixel);\r
@@ -1535,7 +1535,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
                     FX_DWORD des_b = 0, des_g = 0, des_r = 0;\r
                     for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j++) {\r
                         int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];\r
-                        FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;\r
+                        const uint8_t* src_pixel = src_scan + j * src_Bpp;\r
                         uint8_t src_b = 0, src_g = 0, src_r = 0;\r
                         AdobeCMYK_to_sRGB1(255 - src_pixel[0], 255 - src_pixel[1], 255 - src_pixel[2], 255 - src_pixel[3],\r
                                            src_r, src_g, src_b);\r
@@ -1553,7 +1553,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
                     FX_DWORD des_alpha = 0, des_r = 0, des_g = 0, des_b = 0;\r
                     for (int j = pPixelWeights->m_SrcStart; j <= pPixelWeights->m_SrcEnd; j ++) {\r
                         int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];\r
-                        FX_LPCBYTE src_pixel = src_scan + j * src_Bpp;\r
+                        const uint8_t* src_pixel = src_scan + j * src_Bpp;\r
                         pixel_weight = pixel_weight * src_pixel[3] / 255;\r
                         des_b += pixel_weight * (*src_pixel++);\r
                         des_g += pixel_weight * (*src_pixel++);\r
@@ -1581,9 +1581,9 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
         if(des_row_1 < des_top) {\r
             int des_bottom = des_top + m_sizeY;\r
             if(des_row + (int)scale_y >= des_bottom - 1) {\r
-                FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+                uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
                 while (++des_row < des_bottom) {\r
-                    FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+                    uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
                     FX_DWORD size = m_sizeX * des_Bpp;\r
                     FXSYS_memcpy32(scan_des, scan_src, size);\r
                 }\r
@@ -1591,10 +1591,10 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
             return;\r
         }\r
         for (; des_row_1 < des_row; des_row_1++) {\r
-            FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;\r
+            uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row_1) + des_ScanOffet;\r
             PixelWeight* pWeight = m_WeightVert.GetPixelWeight(des_row_1 - des_top);\r
-            FX_LPCBYTE scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;\r
-            FX_LPCBYTE scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;\r
+            const uint8_t* scan_src1 = pDeviceBitmap->GetScanline(pWeight->m_SrcStart + des_top) + des_ScanOffet;\r
+            const uint8_t* scan_src2 = pDeviceBitmap->GetScanline(pWeight->m_SrcEnd + des_top) + des_ScanOffet;\r
             for (int des_col = 0; des_col < m_sizeX; des_col++) {\r
                 switch(pDeviceBitmap->GetFormat()) {\r
                     case FXDIB_Invalid:\r
@@ -1652,9 +1652,9 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
         }\r
         int des_bottom = des_top + m_sizeY;\r
         if(des_row + (int)scale_y >= des_bottom - 1) {\r
-            FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+            uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
             while (++des_row < des_bottom) {\r
-                FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+                uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
                 FX_DWORD size = m_sizeX * des_Bpp;\r
                 FXSYS_memcpy32(scan_des, scan_src, size);\r
             }\r
@@ -1663,18 +1663,18 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
     }\r
     int multiple = (int)FXSYS_ceil((FX_FLOAT)scale_y - 1);\r
     if(multiple > 0) {\r
-        FX_LPBYTE scan_src = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
+        uint8_t* scan_src = (uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;\r
         for (int i = 1; i <= multiple; i++) {\r
             if(des_row + i >= m_startY + m_sizeY) {\r
                 return;\r
             }\r
-            FX_LPBYTE scan_des = (FX_LPBYTE)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;\r
+            uint8_t* scan_des = (uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;\r
             FX_DWORD size = m_sizeX * des_Bpp;\r
             FXSYS_memcpy32(scan_des, scan_src, size);\r
         }\r
     }\r
 }\r
-void CCodec_ProgressiveDecoder::Resample(CFX_DIBitmap* pDeviceBitmap, int32_t src_line, FX_LPBYTE src_scan, FXCodec_Format src_format)\r
+void CCodec_ProgressiveDecoder::Resample(CFX_DIBitmap* pDeviceBitmap, int32_t src_line, uint8_t* src_scan, FXCodec_Format src_format)\r
 {\r
     int src_top = m_clipBox.top;\r
     int des_top = m_startY;\r
@@ -2166,8 +2166,8 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
                         case FXDIB_8bppRgb:\r
                         case FXDIB_8bppMask: {\r
                                 for (int32_t row = 0; row < pClipBitmap->GetHeight(); row++) {\r
-                                    FX_LPBYTE src_line = (FX_LPBYTE)pClipBitmap->GetScanline(row);\r
-                                    FX_LPBYTE des_line = (FX_LPBYTE)pFormatBitmap->GetScanline(row);\r
+                                    uint8_t* src_line = (uint8_t*)pClipBitmap->GetScanline(row);\r
+                                    uint8_t* des_line = (uint8_t*)pFormatBitmap->GetScanline(row);\r
                                     for (int32_t col = 0; col < pClipBitmap->GetWidth(); col++) {\r
                                         uint8_t _a = 255 - src_line[3];\r
                                         uint8_t b = (src_line[0] * src_line[3] + 0xFF * _a) / 255;\r
@@ -2183,8 +2183,8 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
                         case FXDIB_Rgb32: {\r
                                 int32_t desBpp = (m_pDeviceBitmap->GetFormat() == FXDIB_Rgb) ? 3 : 4;\r
                                 for (int32_t row = 0; row < pClipBitmap->GetHeight(); row++) {\r
-                                    FX_LPBYTE src_line = (FX_LPBYTE)pClipBitmap->GetScanline(row);\r
-                                    FX_LPBYTE des_line = (FX_LPBYTE)pFormatBitmap->GetScanline(row);\r
+                                    uint8_t* src_line = (uint8_t*)pClipBitmap->GetScanline(row);\r
+                                    uint8_t* des_line = (uint8_t*)pFormatBitmap->GetScanline(row);\r
                                     for (int32_t col = 0; col < pClipBitmap->GetWidth(); col++) {\r
                                         uint8_t _a = 255 - src_line[3];\r
                                         uint8_t b = (src_line[0] * src_line[3] + 0xFF * _a) / 255;\r