Merge to XFA: Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.
[pdfium.git] / core / src / fxcodec / codec / fx_codec_progress.cpp
index da64eed..33398f0 100644 (file)
@@ -107,7 +107,7 @@ void CFXCODEC_HorzTable::Calc(int dest_len, int src_len, FX_BOOL bInterpol)
     if(m_pWeightTables == NULL)        {\r
         return;\r
     }\r
-    FXSYS_memset32(m_pWeightTables, 0, size);\r
+    FXSYS_memset(m_pWeightTables, 0, size);\r
     if(scale > 1) {\r
         int pre_des_col = 0;\r
         for (int src_col = 0; src_col < src_len; src_col++) {\r
@@ -164,7 +164,7 @@ void CFXCODEC_VertTable::Calc(int dest_len, int src_len)
     if(m_pWeightTables == NULL) {\r
         return;\r
     }\r
-    FXSYS_memset32(m_pWeightTables, 0, size);\r
+    FXSYS_memset(m_pWeightTables, 0, size);\r
     if(scale > 1) {\r
         double step = 0.0;\r
         int src_row = 0;\r
@@ -296,7 +296,7 @@ FX_BOOL CCodec_ProgressiveDecoder::JpegReadMoreData(ICodec_JpegModule* pJpegModu
     } else {\r
         FX_DWORD dwConsume = m_SrcSize - dwAvail;\r
         if (dwAvail) {\r
-            FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);\r
+            FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);\r
         }\r
         if (dwSize > dwConsume) {\r
             dwSize = dwConsume;\r
@@ -540,7 +540,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifReadMoreData(ICodec_GifModule* pGifModule,
     } else {\r
         FX_DWORD dwConsume = m_SrcSize - dwAvail;\r
         if (dwAvail) {\r
-            FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);\r
+            FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);\r
         }\r
         if (dwSize > dwConsume) {\r
             dwSize = dwConsume;\r
@@ -621,7 +621,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifInputRecordPositionBufCallback(void* pModu
         switch(pCodec->m_TransMethod) {\r
             case 3:    {\r
                     uint8_t gray = FXRGB2GRAY(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb));\r
-                    FXSYS_memset8(pScanline, gray, sizeX);\r
+                    FXSYS_memset(pScanline, gray, sizeX);\r
                     break;\r
                 }\r
             case 8:    {\r
@@ -663,11 +663,11 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
     if (pCodec->m_GifTransIndex != -1 && pCodec->m_pDeviceBitmap->HasAlpha()) {\r
         pal_index = pCodec->m_GifTransIndex;\r
     }\r
-    FXSYS_memset8(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth);\r
+    FXSYS_memset(pCodec->m_pDecodeBuf, pal_index, pCodec->m_SrcWidth);\r
     FX_BOOL bLastPass = ((row_num % 2) == 1) ? TRUE : FALSE;\r
     int32_t line = row_num + pCodec->m_GifFrameRect.top;\r
     int32_t left = pCodec->m_GifFrameRect.left;\r
-    FXSYS_memcpy32(pCodec->m_pDecodeBuf + left, row_buf, img_width);\r
+    FXSYS_memcpy(pCodec->m_pDecodeBuf + left, row_buf, img_width);\r
     int src_top = pCodec->m_clipBox.top;\r
     int src_bottom = pCodec->m_clipBox.bottom;\r
     int des_top = pCodec->m_startY;\r
@@ -695,7 +695,7 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule, int32_t r
                 while (++cur_row < des_bottom) {\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
+                    FXSYS_memcpy(scan_des, scan_src, size);\r
                 }\r
             }\r
             if(bLastPass) {\r
@@ -799,7 +799,7 @@ FX_BOOL CCodec_ProgressiveDecoder::BmpReadMoreData(ICodec_BmpModule* pBmpModule,
     } else {\r
         FX_DWORD dwConsume = m_SrcSize - dwAvail;\r
         if (dwAvail) {\r
-            FXSYS_memcpy32(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);\r
+            FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);\r
         }\r
         if (dwSize > dwConsume) {\r
             dwSize = dwConsume;\r
@@ -828,7 +828,7 @@ void CCodec_ProgressiveDecoder::BmpReadScanlineCallback(void* pModule, int32_t r
     CCodec_ProgressiveDecoder* pCodec = (CCodec_ProgressiveDecoder*)pModule;\r
     CFX_DIBitmap* pDIBitmap = pCodec->m_pDeviceBitmap;\r
     ASSERT(pDIBitmap != NULL);\r
-    FXSYS_memcpy32(pCodec->m_pDecodeBuf, row_buf, pCodec->m_ScanlineSize);\r
+    FXSYS_memcpy(pCodec->m_pDecodeBuf, row_buf, pCodec->m_ScanlineSize);\r
     int src_top = pCodec->m_clipBox.top;\r
     int src_bottom = pCodec->m_clipBox.bottom;\r
     int des_top = pCodec->m_startY;\r
@@ -864,7 +864,7 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, doub
         while (++des_row < des_bottom) {\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
+            FXSYS_memcpy(scan_des, scan_src, size);\r
         }\r
         return;\r
     }\r
@@ -945,7 +945,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
         m_status = FXCODEC_STATUS_ERR_MEMORY;\r
         return FALSE;\r
     }\r
-    FXSYS_memset32(m_pSrcBuf, 0, size);\r
+    FXSYS_memset(m_pSrcBuf, 0, size);\r
     m_SrcSize = size;\r
     switch(imageType) {\r
         case FXCODEC_IMAGE_BMP: {\r
@@ -993,7 +993,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
                             m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                             return FALSE;\r
                         }\r
-                        FXSYS_memcpy32(m_pSrcPalette, pPalette, m_SrcPaletteNumber * sizeof(FX_DWORD));\r
+                        FXSYS_memcpy(m_pSrcPalette, pPalette, m_SrcPaletteNumber * sizeof(FX_DWORD));\r
                     }\r
                     return TRUE;\r
                 }\r
@@ -1084,7 +1084,7 @@ FX_BOOL CCodec_ProgressiveDecoder::DetectImageType(FXCODEC_IMAGE_TYPE imageType,
                             m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                             return FALSE;\r
                         }\r
-                        FXSYS_memset32(m_pSrcBuf, 0, input_size);\r
+                        FXSYS_memset(m_pSrcBuf, 0, input_size);\r
                         m_SrcSize = input_size;\r
                     }\r
                     bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);\r
@@ -1466,7 +1466,7 @@ void CCodec_ProgressiveDecoder::ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, in
                         int pixel_weight = pPixelWeights->m_Weights[j - pPixelWeights->m_SrcStart];\r
                         des_g += pixel_weight * src_scan[j];\r
                     }\r
-                    FXSYS_memset8(des_scan, (uint8_t)(des_g >> 16), 3);\r
+                    FXSYS_memset(des_scan, (uint8_t)(des_g >> 16), 3);\r
                     des_scan += des_Bpp;\r
                 }\r
                 break;\r
@@ -1585,7 +1585,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
                 while (++des_row < des_bottom) {\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
+                    FXSYS_memcpy(scan_des, scan_src, size);\r
                 }\r
             }\r
             return;\r
@@ -1656,7 +1656,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
             while (++des_row < des_bottom) {\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
+                FXSYS_memcpy(scan_des, scan_src, size);\r
             }\r
         }\r
         return;\r
@@ -1670,7 +1670,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap, double
             }\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
+            FXSYS_memcpy(scan_des, scan_src, size);\r
         }\r
     }\r
 }\r
@@ -1815,7 +1815,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
                     m_pFile = NULL;\r
                     return m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                 }\r
-                FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);\r
+                FXSYS_memset(m_pDecodeBuf, 0, scanline_size);\r
                 m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0, m_clipBox.Width(), m_bInterpol);\r
                 m_WeightVert.Calc(m_sizeY, m_clipBox.Height());\r
                 switch(m_SrcComponents) {\r
@@ -1884,7 +1884,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
                     m_pFile = NULL;\r
                     return m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                 }\r
-                FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);\r
+                FXSYS_memset(m_pDecodeBuf, 0, scanline_size);\r
                 m_WeightHorzOO.Calc(m_sizeX, m_clipBox.Width(), m_bInterpol);\r
                 m_WeightVert.Calc(m_sizeY, m_clipBox.Height());\r
                 return m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;\r
@@ -1910,7 +1910,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
                     m_pFile = NULL;\r
                     return m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                 }\r
-                FXSYS_memset32(m_pDecodeBuf, 0, scanline_size);\r
+                FXSYS_memset(m_pDecodeBuf, 0, scanline_size);\r
                 m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0, m_clipBox.Width(), m_bInterpol);\r
                 m_WeightVert.Calc(m_sizeY, m_clipBox.Height());\r
                 m_FrameCur = frames;\r
@@ -1947,7 +1947,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode(CFX_DIBitmap* pDIBitmap,
                     m_pFile = NULL;\r
                     return m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                 }\r
-                FXSYS_memset32(m_pDecodeBuf, 0, m_ScanlineSize);\r
+                FXSYS_memset(m_pDecodeBuf, 0, m_ScanlineSize);\r
                 m_WeightHorz.Calc(m_sizeX, 0, m_sizeX, m_clipBox.Width(), 0, m_clipBox.Width(), m_bInterpol);\r
                 m_WeightVert.Calc(m_sizeY, m_clipBox.Height());\r
                 return m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE;\r
@@ -2018,7 +2018,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause)
                             m_pFile = NULL;\r
                             return m_status = FXCODEC_STATUS_ERR_MEMORY;\r
                         }\r
-                        FXSYS_memset32(m_pSrcBuf, 0, input_size);\r
+                        FXSYS_memset(m_pSrcBuf, 0, input_size);\r
                         m_SrcSize = input_size;\r
                     }\r
                     FX_BOOL bResult = m_pFile->ReadBlock(m_pSrcBuf, m_offSet, input_size);\r