diff options
author | tsepez <tsepez@chromium.org> | 2016-03-25 15:18:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-25 15:18:36 -0700 |
commit | b5e8f14e3eefc5da995b332788d3203cee204883 (patch) | |
tree | 34fc80504d2034013b18f30df1b0f6f1a94e2d70 /core/fxge/dib | |
parent | 6d18bd3b8ec82ae3c24a439f5c7925786a0e2d8b (diff) | |
download | pdfium-b5e8f14e3eefc5da995b332788d3203cee204883.tar.xz |
Remove FX_DWORD from core/ and delete definitionchromium/2695chromium/2694chromium/2693chromium/2692
Review URL: https://codereview.chromium.org/1832173003
Diffstat (limited to 'core/fxge/dib')
-rw-r--r-- | core/fxge/dib/dib_int.h | 2 | ||||
-rw-r--r-- | core/fxge/dib/fx_dib_composite.cpp | 56 | ||||
-rw-r--r-- | core/fxge/dib/fx_dib_convert.cpp | 104 | ||||
-rw-r--r-- | core/fxge/dib/fx_dib_engine.cpp | 14 | ||||
-rw-r--r-- | core/fxge/dib/fx_dib_main.cpp | 82 | ||||
-rw-r--r-- | core/fxge/dib/fx_dib_transform.cpp | 46 |
6 files changed, 152 insertions, 152 deletions
diff --git a/core/fxge/dib/dib_int.h b/core/fxge/dib/dib_int.h index 7022ec99ce..1d2193e9bb 100644 --- a/core/fxge/dib/dib_int.h +++ b/core/fxge/dib/dib_int.h @@ -82,7 +82,7 @@ class CStretchEngine { uint8_t* m_pDestMaskScanline; FX_RECT m_SrcClip; const CFX_DIBSource* m_pSource; - FX_DWORD* m_pSrcPalette; + uint32_t* m_pSrcPalette; int m_SrcWidth, m_SrcHeight; int m_SrcPitch, m_InterPitch; int m_ExtraMaskPitch; diff --git a/core/fxge/dib/fx_dib_composite.cpp b/core/fxge/dib/fx_dib_composite.cpp index 5bfe46e572..b10180deae 100644 --- a/core/fxge/dib/fx_dib_composite.cpp +++ b/core/fxge/dib/fx_dib_composite.cpp @@ -2149,7 +2149,7 @@ inline void _CompositeRow_1bppPal2Graya(uint8_t* dest_scan, } inline void _CompositeRow_8bppRgb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, - FX_DWORD* pPalette, + uint32_t* pPalette, int pixel_count, int DestBpp, const uint8_t* clip_scan, @@ -2217,7 +2217,7 @@ inline void _CompositeRow_8bppRgb2Rgb_NoBlend(uint8_t* dest_scan, inline void _CompositeRow_1bppRgb2Rgb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, - FX_DWORD* pPalette, + uint32_t* pPalette, int pixel_count, int DestBpp, const uint8_t* clip_scan) { @@ -2260,7 +2260,7 @@ inline void _CompositeRow_1bppRgb2Rgb_NoBlend(uint8_t* dest_scan, inline void _CompositeRow_8bppRgb2Argb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width, - FX_DWORD* pPalette, + uint32_t* pPalette, const uint8_t* clip_scan, const uint8_t* src_alpha_scan) { if (src_alpha_scan) { @@ -2345,7 +2345,7 @@ inline void _CompositeRow_8bppRgb2Argb_NoBlend(uint8_t* dest_scan, void _CompositeRow_8bppRgb2Rgba_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int width, - FX_DWORD* pPalette, + uint32_t* pPalette, const uint8_t* clip_scan, uint8_t* dest_alpha_scan, const uint8_t* src_alpha_scan) { @@ -2433,7 +2433,7 @@ inline void _CompositeRow_1bppRgb2Argb_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, - FX_DWORD* pPalette, + uint32_t* pPalette, const uint8_t* clip_scan) { int reset_r, reset_g, reset_b; int set_r, set_g, set_b; @@ -2483,7 +2483,7 @@ void _CompositeRow_1bppRgb2Rgba_NoBlend(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, - FX_DWORD* pPalette, + uint32_t* pPalette, const uint8_t* clip_scan, uint8_t* dest_alpha_scan) { int reset_r, reset_g, reset_b; @@ -3959,7 +3959,7 @@ void _CompositeRow_BitMask2Rgb_RgbByteOrder(uint8_t* dest_scan, } inline FX_BOOL _ScanlineCompositor_InitSourceMask(FXDIB_Format dest_format, int alpha_flag, - FX_DWORD mask_color, + uint32_t mask_color, int& mask_alpha, int& mask_red, int& mask_green, @@ -4026,8 +4026,8 @@ inline FX_BOOL _ScanlineCompositor_InitSourceMask(FXDIB_Format dest_format, } inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, FXDIB_Format dest_format, - FX_DWORD*& pDestPalette, - FX_DWORD* pSrcPalette, + uint32_t*& pDestPalette, + uint32_t* pSrcPalette, void* icc_module, void* pIccTransform) { ICodec_IccModule* pIccModule = (ICodec_IccModule*)icc_module; @@ -4039,9 +4039,9 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, if ((dest_format & 0xff) == 8) { int pal_count = 1 << (src_format & 0xff); uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count); - pDestPalette = (FX_DWORD*)gray_pal; + pDestPalette = (uint32_t*)gray_pal; for (int i = 0; i < pal_count; i++) { - FX_DWORD color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) + uint32_t color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) : FXARGB_TODIB(pSrcPalette[i]); pIccModule->TranslateScanline(pIccTransform, gray_pal, (const uint8_t*)&color, 1); @@ -4049,9 +4049,9 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, } } else { int palsize = 1 << (src_format & 0xff); - pDestPalette = FX_Alloc(FX_DWORD, palsize); + pDestPalette = FX_Alloc(uint32_t, palsize); for (int i = 0; i < palsize; i++) { - FX_DWORD color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) + uint32_t color = isSrcCmyk ? FXCMYK_TODIB(pSrcPalette[i]) : FXARGB_TODIB(pSrcPalette[i]); pIccModule->TranslateScanline(pIccTransform, (uint8_t*)&color, (const uint8_t*)&color, 1); @@ -4073,9 +4073,9 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, if ((dest_format & 0xff) == 8) { pIccModule->TranslateScanline(pIccTransform, gray_pal, gray_pal, pal_count); - pDestPalette = (FX_DWORD*)gray_pal; + pDestPalette = (uint32_t*)gray_pal; } else { - pDestPalette = FX_Alloc(FX_DWORD, pal_count); + pDestPalette = FX_Alloc(uint32_t, pal_count); for (int i = 0; i < pal_count; i++) { pIccModule->TranslateScanline( pIccTransform, (uint8_t*)&pDestPalette[i], &gray_pal[i], 1); @@ -4090,7 +4090,7 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, if ((dest_format & 0xff) == 8) { int pal_count = 1 << (src_format & 0xff); uint8_t* gray_pal = FX_Alloc(uint8_t, pal_count); - pDestPalette = (FX_DWORD*)gray_pal; + pDestPalette = (uint32_t*)gray_pal; if (isSrcCmyk) { for (int i = 0; i < pal_count; i++) { FX_CMYK cmyk = pSrcPalette[i]; @@ -4109,9 +4109,9 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, } } else { int palsize = 1 << (src_format & 0xff); - pDestPalette = FX_Alloc(FX_DWORD, palsize); + pDestPalette = FX_Alloc(uint32_t, palsize); if (isDstCmyk == isSrcCmyk) { - FXSYS_memcpy(pDestPalette, pSrcPalette, palsize * sizeof(FX_DWORD)); + FXSYS_memcpy(pDestPalette, pSrcPalette, palsize * sizeof(uint32_t)); } else { for (int i = 0; i < palsize; i++) { FX_CMYK cmyk = pSrcPalette[i]; @@ -4135,10 +4135,10 @@ inline void _ScanlineCompositor_InitSourcePalette(FXDIB_Format src_format, gray_pal[i] = i; } } - pDestPalette = (FX_DWORD*)gray_pal; + pDestPalette = (uint32_t*)gray_pal; } else { int palsize = 1 << (src_format & 0xff); - pDestPalette = FX_Alloc(FX_DWORD, palsize); + pDestPalette = FX_Alloc(uint32_t, palsize); if (palsize == 2) { pDestPalette[0] = isSrcCmyk ? 255 : 0xff000000; pDestPalette[1] = isSrcCmyk ? 0 : 0xffffffff; @@ -4175,8 +4175,8 @@ CFX_ScanlineCompositor::~CFX_ScanlineCompositor() { FX_BOOL CFX_ScanlineCompositor::Init(FXDIB_Format dest_format, FXDIB_Format src_format, int32_t width, - FX_DWORD* pSrcPalette, - FX_DWORD mask_color, + uint32_t* pSrcPalette, + uint32_t mask_color, int blend_type, FX_BOOL bClip, FX_BOOL bRgbByteOrder, @@ -4706,7 +4706,7 @@ FX_BOOL CFX_DIBitmap::CompositeMask(int dest_left, int width, int height, const CFX_DIBSource* pMask, - FX_DWORD color, + uint32_t color, int src_left, int src_top, int blend_type, @@ -4775,7 +4775,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, int top, int width, int height, - FX_DWORD color, + uint32_t color, int alpha_flag, void* pIccTransform) { if (!m_pBuffer) { @@ -4791,7 +4791,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, return TRUE; } width = rect.Width(); - FX_DWORD dst_color; + uint32_t dst_color; if (alpha_flag >> 8) { dst_color = FXCMYK_TODIB(color); } else { @@ -4905,7 +4905,7 @@ FX_BOOL CFX_DIBitmap::CompositeRect(int left, FXSYS_memset(dest_scan_alpha, 0xff, width); } if (Bpp == 4) { - FX_DWORD* scan = (FX_DWORD*)dest_scan; + uint32_t* scan = (uint32_t*)dest_scan; for (int col = 0; col < width; col++) { *scan++ = dst_color; } @@ -4996,7 +4996,7 @@ CFX_BitmapComposer::~CFX_BitmapComposer() { void CFX_BitmapComposer::Compose(CFX_DIBitmap* pDest, const CFX_ClipRgn* pClipRgn, int bitmap_alpha, - FX_DWORD mask_color, + uint32_t mask_color, FX_RECT& dest_rect, FX_BOOL bVertical, FX_BOOL bFlipX, @@ -5028,7 +5028,7 @@ void CFX_BitmapComposer::Compose(CFX_DIBitmap* pDest, FX_BOOL CFX_BitmapComposer::SetInfo(int width, int height, FXDIB_Format src_format, - FX_DWORD* pSrcPalette) { + uint32_t* pSrcPalette) { m_SrcFormat = src_format; if (!m_Compositor.Init(m_pBitmap->GetFormat(), src_format, width, pSrcPalette, m_MaskColor, FXDIB_BLEND_NORMAL, diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp index 9335800f9b..d9d5a3b0c0 100644 --- a/core/fxge/dib/fx_dib_convert.cpp +++ b/core/fxge/dib/fx_dib_convert.cpp @@ -14,20 +14,20 @@ class CFX_Palette { ~CFX_Palette(); FX_BOOL BuildPalette(const CFX_DIBSource* pBitmap); - FX_DWORD* GetPalette() const { return m_pPalette; } - FX_DWORD* GetColorLut() const { return m_cLut; } - FX_DWORD* GetAmountLut() const { return m_aLut; } + uint32_t* GetPalette() const { return m_pPalette; } + uint32_t* GetColorLut() const { return m_cLut; } + uint32_t* GetAmountLut() const { return m_aLut; } int32_t Getlut() const { return m_lut; } protected: - FX_DWORD* m_pPalette; - FX_DWORD* m_cLut; - FX_DWORD* m_aLut; + uint32_t* m_pPalette; + uint32_t* m_cLut; + uint32_t* m_aLut; int m_lut; }; -int _Partition(FX_DWORD* alut, FX_DWORD* clut, int l, int r) { - FX_DWORD p_a = alut[l]; - FX_DWORD p_c = clut[l]; +int _Partition(uint32_t* alut, uint32_t* clut, int l, int r) { + uint32_t p_a = alut[l]; + uint32_t p_c = clut[l]; while (l < r) { while (l < r && alut[r] >= p_a) { r--; @@ -48,34 +48,34 @@ int _Partition(FX_DWORD* alut, FX_DWORD* clut, int l, int r) { clut[l] = p_c; return l; } -void _Qsort(FX_DWORD* alut, FX_DWORD* clut, int l, int r) { +void _Qsort(uint32_t* alut, uint32_t* clut, int l, int r) { if (l < r) { int pI = _Partition(alut, clut, l, r); _Qsort(alut, clut, l, pI - 1); _Qsort(alut, clut, pI + 1, r); } } -void _ColorDecode(FX_DWORD pal_v, uint8_t& r, uint8_t& g, uint8_t& b) { +void _ColorDecode(uint32_t pal_v, uint8_t& r, uint8_t& g, uint8_t& b) { r = (uint8_t)((pal_v & 0xf00) >> 4); g = (uint8_t)(pal_v & 0x0f0); b = (uint8_t)((pal_v & 0x00f) << 4); } -void _Obtain_Pal(FX_DWORD* aLut, - FX_DWORD* cLut, - FX_DWORD* dest_pal, - FX_DWORD lut) { - FX_DWORD lut_1 = lut - 1; +void _Obtain_Pal(uint32_t* aLut, + uint32_t* cLut, + uint32_t* dest_pal, + uint32_t lut) { + uint32_t lut_1 = lut - 1; for (int row = 0; row < 256; row++) { int lut_offset = lut_1 - row; if (lut_offset < 0) { lut_offset += 256; } - FX_DWORD color = cLut[lut_offset]; + uint32_t color = cLut[lut_offset]; uint8_t r; uint8_t g; uint8_t b; _ColorDecode(color, r, g, b); - dest_pal[row] = ((FX_DWORD)r << 16) | ((FX_DWORD)g << 8) | b | 0xff000000; + dest_pal[row] = ((uint32_t)r << 16) | ((uint32_t)g << 8) | b | 0xff000000; aLut[lut_offset] = row; } } @@ -97,7 +97,7 @@ FX_BOOL CFX_Palette::BuildPalette(const CFX_DIBSource* pBitmap) { return FALSE; } FX_Free(m_pPalette); - m_pPalette = FX_Alloc(FX_DWORD, 256); + m_pPalette = FX_Alloc(uint32_t, 256); int bpp = pBitmap->GetBPP() / 8; int width = pBitmap->GetWidth(); int height = pBitmap->GetHeight(); @@ -105,18 +105,18 @@ FX_BOOL CFX_Palette::BuildPalette(const CFX_DIBSource* pBitmap) { m_cLut = NULL; FX_Free(m_aLut); m_aLut = NULL; - m_cLut = FX_Alloc(FX_DWORD, 4096); - m_aLut = FX_Alloc(FX_DWORD, 4096); + m_cLut = FX_Alloc(uint32_t, 4096); + m_aLut = FX_Alloc(uint32_t, 4096); int row, col; m_lut = 0; for (row = 0; row < height; row++) { uint8_t* scan_line = (uint8_t*)pBitmap->GetScanline(row); for (col = 0; col < width; col++) { uint8_t* src_port = scan_line + col * bpp; - FX_DWORD b = src_port[0] & 0xf0; - FX_DWORD g = src_port[1] & 0xf0; - FX_DWORD r = src_port[2] & 0xf0; - FX_DWORD index = (r << 4) + g + (b >> 4); + uint32_t b = src_port[0] & 0xf0; + uint32_t g = src_port[1] & 0xf0; + uint32_t r = src_port[2] & 0xf0; + uint32_t index = (r << 4) + g + (b >> 4); m_aLut[index]++; } } @@ -176,10 +176,10 @@ FX_BOOL ConvertBuffer_1bppPlt2Gray(uint8_t* dest_buf, int src_left, int src_top, void* pIccTransform) { - FX_DWORD* src_plt = pSrcBitmap->GetPalette(); + uint32_t* src_plt = pSrcBitmap->GetPalette(); uint8_t gray[2]; if (pIccTransform) { - FX_DWORD plt[2]; + uint32_t plt[2]; if (pSrcBitmap->IsCmykImage()) { plt[0] = FXCMYK_TODIB(src_plt[0]); plt[1] = FXCMYK_TODIB(src_plt[1]); @@ -238,10 +238,10 @@ FX_BOOL ConvertBuffer_8bppPlt2Gray(uint8_t* dest_buf, int src_left, int src_top, void* pIccTransform) { - FX_DWORD* src_plt = pSrcBitmap->GetPalette(); + uint32_t* src_plt = pSrcBitmap->GetPalette(); uint8_t gray[256]; if (pIccTransform) { - FX_DWORD plt[256]; + uint32_t plt[256]; if (pSrcBitmap->IsCmykImage()) { for (int i = 0; i < 256; i++) { plt[i] = FXCMYK_TODIB(src_plt[i]); @@ -323,10 +323,10 @@ FX_BOOL ConvertBuffer_RgbOrCmyk2Gray(uint8_t* dest_buf, pSrcBitmap->GetScanline(src_top + row) + src_left * 4; for (int col = 0; col < width; col++) { uint8_t r, g, b; - AdobeCMYK_to_sRGB1(FXSYS_GetCValue((FX_DWORD)src_scan[0]), - FXSYS_GetMValue((FX_DWORD)src_scan[1]), - FXSYS_GetYValue((FX_DWORD)src_scan[2]), - FXSYS_GetKValue((FX_DWORD)src_scan[3]), r, g, b); + AdobeCMYK_to_sRGB1(FXSYS_GetCValue((uint32_t)src_scan[0]), + FXSYS_GetMValue((uint32_t)src_scan[1]), + FXSYS_GetYValue((uint32_t)src_scan[2]), + FXSYS_GetKValue((uint32_t)src_scan[3]), r, g, b); *dest_scan++ = FXRGB2GRAY(r, g, b); src_scan += 4; } @@ -380,14 +380,14 @@ FX_BOOL ConvertBuffer_Plt2PltRgb8(uint8_t* dest_buf, const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, - FX_DWORD* dst_plt, + uint32_t* dst_plt, void* pIccTransform) { ConvertBuffer_IndexCopy(dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top); - FX_DWORD* src_plt = pSrcBitmap->GetPalette(); + uint32_t* src_plt = pSrcBitmap->GetPalette(); int plt_size = pSrcBitmap->GetPaletteSize(); if (pIccTransform) { - FX_DWORD plt[256]; + uint32_t plt[256]; uint8_t* bgr_ptr = (uint8_t*)plt; if (pSrcBitmap->IsCmykImage()) { for (int i = 0; i < plt_size; i++) { @@ -431,18 +431,18 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, - FX_DWORD* dst_plt) { + uint32_t* dst_plt) { int bpp = pSrcBitmap->GetBPP() / 8; int row, col; CFX_Palette palette; palette.BuildPalette(pSrcBitmap); - FX_DWORD* cLut = palette.GetColorLut(); - FX_DWORD* aLut = palette.GetAmountLut(); + uint32_t* cLut = palette.GetColorLut(); + uint32_t* aLut = palette.GetAmountLut(); if (!cLut || !aLut) { return FALSE; } int lut = palette.Getlut(); - FX_DWORD* pPalette = palette.GetPalette(); + uint32_t* pPalette = palette.GetPalette(); if (lut > 256) { int err, min_err; int lut_256 = lut - 256; @@ -452,7 +452,7 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, _ColorDecode(cLut[row], r, g, b); int clrindex = 0; for (int col = 0; col < 256; col++) { - FX_DWORD p_color = *(pPalette + col); + uint32_t p_color = *(pPalette + col); int d_r = r - (uint8_t)(p_color >> 16); int d_g = g - (uint8_t)(p_color >> 8); int d_b = b - (uint8_t)(p_color); @@ -475,7 +475,7 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, int r = src_port[2] & 0xf0; int g = src_port[1] & 0xf0; int b = src_port[0] & 0xf0; - FX_DWORD clrindex = (r << 4) + g + (b >> 4); + uint32_t clrindex = (r << 4) + g + (b >> 4); for (int i = lut_1; i >= 0; i--) if (clrindex == cLut[i]) { *(dest_scan + col) = (uint8_t)(aLut[i]); @@ -483,7 +483,7 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8_NoTransform(uint8_t* dest_buf, } } } - FXSYS_memcpy(dst_plt, pPalette, sizeof(FX_DWORD) * 256); + FXSYS_memcpy(dst_plt, pPalette, sizeof(uint32_t) * 256); return TRUE; } FX_BOOL ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, @@ -493,7 +493,7 @@ FX_BOOL ConvertBuffer_Rgb2PltRgb8(uint8_t* dest_buf, const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, - FX_DWORD* dst_plt, + uint32_t* dst_plt, void* pIccTransform) { FX_BOOL ret = ConvertBuffer_Rgb2PltRgb8_NoTransform( dest_buf, dest_pitch, width, height, pSrcBitmap, src_left, src_top, @@ -574,8 +574,8 @@ FX_BOOL ConvertBuffer_1bppPlt2Rgb(FXDIB_Format dst_format, int src_top, void* pIccTransform) { int comps = (dst_format & 0xff) / 8; - FX_DWORD* src_plt = pSrcBitmap->GetPalette(); - FX_DWORD plt[2]; + uint32_t* src_plt = pSrcBitmap->GetPalette(); + uint32_t plt[2]; uint8_t* bgr_ptr = (uint8_t*)plt; if (pSrcBitmap->IsCmykImage()) { plt[0] = FXCMYK_TODIB(src_plt[0]); @@ -633,8 +633,8 @@ FX_BOOL ConvertBuffer_8bppPlt2Rgb(FXDIB_Format dst_format, int src_top, void* pIccTransform) { int comps = (dst_format & 0xff) / 8; - FX_DWORD* src_plt = pSrcBitmap->GetPalette(); - FX_DWORD plt[256]; + uint32_t* src_plt = pSrcBitmap->GetPalette(); + uint32_t plt[256]; uint8_t* bgr_ptr = (uint8_t*)plt; if (!pSrcBitmap->IsCmykImage()) { for (int i = 0; i < 256; i++) { @@ -817,7 +817,7 @@ FX_BOOL ConvertBuffer(FXDIB_Format dest_format, const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, - FX_DWORD*& d_pal, + uint32_t*& d_pal, void* pIccTransform) { FXDIB_Format src_format = pSrcBitmap->GetFormat(); if (!CFX_GEModule::Get()->GetCodecModule() || @@ -864,7 +864,7 @@ FX_BOOL ConvertBuffer(FXDIB_Format dest_format, height, pSrcBitmap, src_left, src_top, d_pal, pIccTransform); } - d_pal = FX_Alloc(FX_DWORD, 256); + d_pal = FX_Alloc(uint32_t, 256); if (((src_format & 0xff) == 1 || (src_format & 0xff) == 8) && pSrcBitmap->GetPalette()) { return ConvertBuffer_Plt2PltRgb8(dest_buf, dest_pitch, width, height, @@ -997,7 +997,7 @@ CFX_DIBitmap* CFX_DIBSource::CloneConvert(FXDIB_Format dest_format, delete pClone; return NULL; } - FX_DWORD* pal_8bpp = NULL; + uint32_t* pal_8bpp = NULL; ret = ConvertBuffer(dest_format, pClone->GetBuffer(), pClone->GetPitch(), m_Width, m_Height, this, 0, 0, pal_8bpp, pIccTransform); if (!ret) { @@ -1075,7 +1075,7 @@ FX_BOOL CFX_DIBitmap::ConvertFormat(FXDIB_Format dest_format, } } FX_BOOL ret = FALSE; - FX_DWORD* pal_8bpp = NULL; + uint32_t* pal_8bpp = NULL; ret = ConvertBuffer(dest_format, dest_buf, dest_pitch, m_Width, m_Height, this, 0, 0, pal_8bpp, pIccTransform); if (!ret) { diff --git a/core/fxge/dib/fx_dib_engine.cpp b/core/fxge/dib/fx_dib_engine.cpp index 10e5e67bbc..a68583b346 100644 --- a/core/fxge/dib/fx_dib_engine.cpp +++ b/core/fxge/dib/fx_dib_engine.cpp @@ -231,7 +231,7 @@ CStretchEngine::CStretchEngine(IFX_ScanlineComposer* pDestBitmap, m_pExtraAlphaBuf = NULL; m_pDestMaskScanline = NULL; m_DestClip = clip_rect; - FX_DWORD size = clip_rect.Width(); + uint32_t size = clip_rect.Width(); if (size && m_DestBpp > (int)(INT_MAX / size)) { return; } @@ -351,7 +351,7 @@ FX_BOOL CStretchEngine::StartStretchHorz() { if (m_pSource && m_bHasAlpha && m_pSource->m_pAlphaMask) { m_pExtraAlphaBuf = FX_Alloc2D(unsigned char, m_SrcClip.Height(), m_ExtraMaskPitch); - FX_DWORD size = (m_DestClip.Width() * 8 + 31) / 32 * 4; + uint32_t size = (m_DestClip.Width() * 8 + 31) / 32 * 4; m_pDestMaskScanline = FX_TryAlloc(unsigned char, size); if (!m_pDestMaskScanline) { return FALSE; @@ -730,9 +730,9 @@ void CStretchEngine::StretchVert() { dest_a = dest_a < 0 ? 0 : dest_a > 16711680 ? 16711680 : dest_a; } if (dest_a) { - int r = ((FX_DWORD)dest_r_y) * 255 / dest_a; - int g = ((FX_DWORD)dest_g_m) * 255 / dest_a; - int b = ((FX_DWORD)dest_b_c) * 255 / dest_a; + int r = ((uint32_t)dest_r_y) * 255 / dest_a; + int g = ((uint32_t)dest_g_m) * 255 / dest_a; + int b = ((uint32_t)dest_b_c) * 255 / dest_a; dest_scan[0] = b > 255 ? 255 : b < 0 ? 0 : b; dest_scan[1] = g > 255 ? 255 : g < 0 ? 0 : g; dest_scan[2] = r > 255 ? 255 : r < 0 ? 0 : r; @@ -782,7 +782,7 @@ FX_BOOL CFX_ImageStretcher::Start(IFX_ScanlineComposer* pDest, int dest_width, int dest_height, const FX_RECT& rect, - FX_DWORD flags) { + uint32_t flags) { m_DestFormat = _GetStretchedFormat(pSource); m_DestBPP = m_DestFormat & 0xff; m_pDest = pDest; @@ -863,7 +863,7 @@ FX_BOOL CFX_ImageStretcher::StartQuickStretch() { m_DestHeight = -m_DestHeight; } m_LineIndex = 0; - FX_DWORD size = m_ClipRect.Width(); + uint32_t size = m_ClipRect.Width(); if (size && m_DestBPP > (int)(INT_MAX / size)) { return FALSE; } diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index a7f7dc75bc..3772459eca 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -20,25 +20,25 @@ FX_BOOL ConvertBuffer(FXDIB_Format dest_format, const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, - FX_DWORD*& pal, + uint32_t*& pal, void* pIccTransform); -void CmykDecode(FX_DWORD cmyk, int& c, int& m, int& y, int& k) { +void CmykDecode(uint32_t cmyk, int& c, int& m, int& y, int& k) { c = FXSYS_GetCValue(cmyk); m = FXSYS_GetMValue(cmyk); y = FXSYS_GetYValue(cmyk); k = FXSYS_GetKValue(cmyk); } -void ArgbDecode(FX_DWORD argb, int& a, int& r, int& g, int& b) { +void ArgbDecode(uint32_t argb, int& a, int& r, int& g, int& b) { a = FXARGB_A(argb); r = FXARGB_R(argb); g = FXARGB_G(argb); b = FXARGB_B(argb); } -void ArgbDecode(FX_DWORD argb, int& a, FX_COLORREF& rgb) { +void ArgbDecode(uint32_t argb, int& a, FX_COLORREF& rgb) { a = FXARGB_A(argb); rgb = FXSYS_RGB(FXARGB_R(argb), FXARGB_G(argb), FXARGB_B(argb)); } -FX_DWORD ArgbEncode(int a, FX_COLORREF rgb) { +uint32_t ArgbEncode(int a, FX_COLORREF rgb) { return FXARGB_MAKE(a, FXSYS_GetRValue(rgb), FXSYS_GetGValue(rgb), FXSYS_GetBValue(rgb)); } @@ -196,8 +196,8 @@ CFX_DIBitmap* CFX_DIBSource::Clone(const FX_RECT* pClip) const { int right_shift = 32 - left_shift; int dword_count = pNewBitmap->m_Pitch / 4; for (int row = rect.top; row < rect.bottom; row++) { - FX_DWORD* src_scan = (FX_DWORD*)GetScanline(row) + rect.left / 32; - FX_DWORD* dest_scan = (FX_DWORD*)pNewBitmap->GetScanline(row - rect.top); + uint32_t* src_scan = (uint32_t*)GetScanline(row) + rect.left / 32; + uint32_t* dest_scan = (uint32_t*)pNewBitmap->GetScanline(row - rect.top); for (int i = 0; i < dword_count; i++) { dest_scan[i] = (src_scan[i] << left_shift) | (src_scan[i + 1] >> right_shift); @@ -205,7 +205,7 @@ CFX_DIBitmap* CFX_DIBSource::Clone(const FX_RECT* pClip) const { } } else { int copy_len = (pNewBitmap->GetWidth() * pNewBitmap->GetBPP() + 7) / 8; - if (m_Pitch < (FX_DWORD)copy_len) { + if (m_Pitch < (uint32_t)copy_len) { copy_len = m_Pitch; } for (int row = rect.top; row < rect.bottom; row++) { @@ -221,7 +221,7 @@ void CFX_DIBSource::BuildPalette() { return; } if (GetBPP() == 1) { - m_pPalette = FX_Alloc(FX_DWORD, 2); + m_pPalette = FX_Alloc(uint32_t, 2); if (IsCmykImage()) { m_pPalette[0] = 0xff; m_pPalette[1] = 0; @@ -230,7 +230,7 @@ void CFX_DIBSource::BuildPalette() { m_pPalette[1] = 0xffffffff; } } else if (GetBPP() == 8) { - m_pPalette = FX_Alloc(FX_DWORD, 256); + m_pPalette = FX_Alloc(uint32_t, 256); if (IsCmykImage()) { for (int i = 0; i < 256; i++) { m_pPalette[i] = 0xff - i; @@ -256,7 +256,7 @@ FX_BOOL CFX_DIBSource::BuildAlphaMask() { m_pAlphaMask->GetHeight() * m_pAlphaMask->GetPitch()); return TRUE; } -FX_DWORD CFX_DIBSource::GetPaletteEntry(int index) const { +uint32_t CFX_DIBSource::GetPaletteEntry(int index) const { ASSERT((GetBPP() == 1 || GetBPP() == 8) && !IsAlphaMask()); if (m_pPalette) { return m_pPalette[index]; @@ -272,14 +272,14 @@ FX_DWORD CFX_DIBSource::GetPaletteEntry(int index) const { } return index * 0x10101 | 0xff000000; } -void CFX_DIBSource::SetPaletteEntry(int index, FX_DWORD color) { +void CFX_DIBSource::SetPaletteEntry(int index, uint32_t color) { ASSERT((GetBPP() == 1 || GetBPP() == 8) && !IsAlphaMask()); if (!m_pPalette) { BuildPalette(); } m_pPalette[index] = color; } -int CFX_DIBSource::FindPalette(FX_DWORD color) const { +int CFX_DIBSource::FindPalette(uint32_t color) const { ASSERT((GetBPP() == 1 || GetBPP() == 8) && !IsAlphaMask()); if (!m_pPalette) { if (IsCmykImage()) { @@ -300,7 +300,7 @@ int CFX_DIBSource::FindPalette(FX_DWORD color) const { } return -1; } -void CFX_DIBitmap::Clear(FX_DWORD color) { +void CFX_DIBitmap::Clear(uint32_t color) { if (!m_pBuffer) { return; } @@ -345,7 +345,7 @@ void CFX_DIBitmap::Clear(FX_DWORD color) { case FXDIB_Argb: { color = IsCmykImage() ? FXCMYK_TODIB(color) : FXARGB_TODIB(color); for (int i = 0; i < m_Width; i++) { - ((FX_DWORD*)m_pBuffer)[i] = color; + ((uint32_t*)m_pBuffer)[i] = color; } for (int row = 1; row < m_Height; row++) { FXSYS_memcpy(m_pBuffer + row * m_Pitch, m_pBuffer, m_Pitch); @@ -446,7 +446,7 @@ FX_BOOL CFX_DIBitmap::TransferBitmap(int dest_left, } uint8_t* dest_buf = m_pBuffer + dest_top * m_Pitch + dest_left * GetBPP() / 8; - FX_DWORD* d_plt = NULL; + uint32_t* d_plt = NULL; if (!ConvertBuffer(dest_format, dest_buf, m_Pitch, width, height, pSrcBitmap, src_left, src_top, d_plt, pIccTransform)) { return FALSE; @@ -459,7 +459,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, int width, int height, const CFX_DIBSource* pMask, - FX_DWORD color, + uint32_t color, int src_left, int src_top, int alpha_flag, @@ -479,7 +479,7 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, } int src_bpp = pMask->GetBPP(); int alpha; - FX_DWORD dst_color; + uint32_t dst_color; if (alpha_flag >> 8) { alpha = alpha_flag & 0xff; dst_color = FXCMYK_TODIB(color); @@ -507,8 +507,8 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, } if (GetFormat() == FXDIB_Argb) { for (int row = 0; row < height; row++) { - FX_DWORD* dest_pos = - (FX_DWORD*)(m_pBuffer + (dest_top + row) * m_Pitch + dest_left * 4); + uint32_t* dest_pos = + (uint32_t*)(m_pBuffer + (dest_top + row) * m_Pitch + dest_left * 4); const uint8_t* src_scan = pMask->GetScanline(src_top + row); if (src_bpp == 1) { for (int col = 0; col < width; col++) { @@ -563,22 +563,22 @@ FX_BOOL CFX_DIBitmap::TransferMask(int dest_left, } return TRUE; } -void CFX_DIBSource::CopyPalette(const FX_DWORD* pSrc, FX_DWORD size) { +void CFX_DIBSource::CopyPalette(const uint32_t* pSrc, uint32_t size) { if (!pSrc || GetBPP() > 8) { FX_Free(m_pPalette); m_pPalette = NULL; } else { - FX_DWORD pal_size = 1 << GetBPP(); + uint32_t pal_size = 1 << GetBPP(); if (!m_pPalette) { - m_pPalette = FX_Alloc(FX_DWORD, pal_size); + m_pPalette = FX_Alloc(uint32_t, pal_size); } if (pal_size > size) { pal_size = size; } - FXSYS_memcpy(m_pPalette, pSrc, pal_size * sizeof(FX_DWORD)); + FXSYS_memcpy(m_pPalette, pSrc, pal_size * sizeof(uint32_t)); } } -void CFX_DIBSource::GetPalette(FX_DWORD* pal, int alpha) const { +void CFX_DIBSource::GetPalette(uint32_t* pal, int alpha) const { ASSERT(GetBPP() <= 8 && !IsCmykImage()); if (GetBPP() == 1) { pal[0] = @@ -1068,7 +1068,7 @@ FX_BOOL CFX_DIBitmap::MultiplyAlpha(int alpha) { } return TRUE; } -FX_DWORD CFX_DIBitmap::GetPixel(int x, int y) const { +uint32_t CFX_DIBitmap::GetPixel(int x, int y) const { if (!m_pBuffer) { return 0; } @@ -1101,7 +1101,7 @@ FX_DWORD CFX_DIBitmap::GetPixel(int x, int y) const { } return 0; } -void CFX_DIBitmap::SetPixel(int x, int y, FX_DWORD color) { +void CFX_DIBitmap::SetPixel(int x, int y, uint32_t color) { if (!m_pBuffer) { return; } @@ -1184,8 +1184,8 @@ void CFX_DIBitmap::DownSampleScanline(int line, uint8_t* scanline = m_pBuffer + line * m_Pitch; if (src_Bpp == 0) { for (int i = 0; i < clip_width; i++) { - FX_DWORD dest_x = clip_left + i; - FX_DWORD src_x = dest_x * m_Width / dest_width; + uint32_t dest_x = clip_left + i; + uint32_t src_x = dest_x * m_Width / dest_width; if (bFlipX) { src_x = m_Width - src_x - 1; } @@ -1194,8 +1194,8 @@ void CFX_DIBitmap::DownSampleScanline(int line, } } else if (src_Bpp == 1) { for (int i = 0; i < clip_width; i++) { - FX_DWORD dest_x = clip_left + i; - FX_DWORD src_x = dest_x * m_Width / dest_width; + uint32_t dest_x = clip_left + i; + uint32_t src_x = dest_x * m_Width / dest_width; if (bFlipX) { src_x = m_Width - src_x - 1; } @@ -1222,8 +1222,8 @@ void CFX_DIBitmap::DownSampleScanline(int line, } } else { for (int i = 0; i < clip_width; i++) { - FX_DWORD dest_x = clip_left + i; - FX_DWORD src_x = + uint32_t dest_x = clip_left + i; + uint32_t src_x = bFlipX ? (m_Width - dest_x * m_Width / dest_width - 1) * src_Bpp : (dest_x * m_Width / dest_width) * src_Bpp; src_x %= m_Width * src_Bpp; @@ -1237,8 +1237,8 @@ void CFX_DIBitmap::DownSampleScanline(int line, // TODO(weili): Split this function into two for handling CMYK and RGB // colors separately. -FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, - FX_DWORD backcolor) { +FX_BOOL CFX_DIBitmap::ConvertColorScale(uint32_t forecolor, + uint32_t backcolor) { ASSERT(!IsAlphaMask()); if (!m_pBuffer || IsAlphaMask()) { return FALSE; @@ -1371,7 +1371,7 @@ FX_BOOL CFX_DIBitmap::ConvertColorScale(FX_DWORD forecolor, } return TRUE; } -FX_BOOL CFX_DIBitmap::DitherFS(const FX_DWORD* pPalette, +FX_BOOL CFX_DIBitmap::DitherFS(const uint32_t* pPalette, int pal_size, const FX_RECT* pRect) { if (!m_pBuffer) { @@ -1498,7 +1498,7 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const { } else { ASSERT(Bpp == 4); for (int col = 0; col < m_Width; col++) { - *(FX_DWORD*)dest_scan = *(FX_DWORD*)src_scan; + *(uint32_t*)dest_scan = *(uint32_t*)src_scan; dest_scan -= 4; src_scan += 4; } @@ -1507,7 +1507,7 @@ CFX_DIBitmap* CFX_DIBSource::FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const { } if (m_pAlphaMask) { pDestBuffer = pFlipped->m_pAlphaMask->GetBuffer(); - FX_DWORD dest_pitch = pFlipped->m_pAlphaMask->GetPitch(); + uint32_t dest_pitch = pFlipped->m_pAlphaMask->GetPitch(); for (int row = 0; row < m_Height; row++) { const uint8_t* src_scan = m_pAlphaMask->GetScanline(row); uint8_t* dest_scan = @@ -1595,9 +1595,9 @@ FX_BOOL CFX_ImageRenderer::Start(CFX_DIBitmap* pDevice, const CFX_ClipRgn* pClipRgn, const CFX_DIBSource* pSource, int bitmap_alpha, - FX_DWORD mask_color, + uint32_t mask_color, const CFX_Matrix* pMatrix, - FX_DWORD dib_flags, + uint32_t dib_flags, FX_BOOL bRgbByteOrder, int alpha_flag, void* pIccTransform, @@ -1748,7 +1748,7 @@ void CFX_BitmapStorer::ComposeScanline(int line, FX_BOOL CFX_BitmapStorer::SetInfo(int width, int height, FXDIB_Format src_format, - FX_DWORD* pSrcPalette) { + uint32_t* pSrcPalette) { m_pBitmap = new CFX_DIBitmap; if (!m_pBitmap->Create(width, height, src_format)) { delete m_pBitmap; diff --git a/core/fxge/dib/fx_dib_transform.cpp b/core/fxge/dib/fx_dib_transform.cpp index dc6fb93c75..91c65fbbc8 100644 --- a/core/fxge/dib/fx_dib_transform.cpp +++ b/core/fxge/dib/fx_dib_transform.cpp @@ -229,9 +229,9 @@ CFX_DIBitmap* CFX_DIBSource::SwapXY(FX_BOOL bXFlip, dest_scan += (result_height - 1) * dest_pitch; } if (nBytes == 4) { - FX_DWORD* src_scan = (FX_DWORD*)GetScanline(row) + col_start; + uint32_t* src_scan = (uint32_t*)GetScanline(row) + col_start; for (int col = col_start; col < col_end; col++) { - *(FX_DWORD*)dest_scan = *src_scan++; + *(uint32_t*)dest_scan = *src_scan++; dest_scan += dest_step; } } else { @@ -299,7 +299,7 @@ FX_RECT FXDIB_SwapClipBox(FX_RECT& clip, CFX_DIBitmap* CFX_DIBSource::TransformTo(const CFX_Matrix* pDestMatrix, int& result_left, int& result_top, - FX_DWORD flags, + uint32_t flags, const FX_RECT* pDestClip) const { CFX_ImageTransformer transformer; transformer.Start(this, pDestMatrix, flags, pDestClip); @@ -311,7 +311,7 @@ CFX_DIBitmap* CFX_DIBSource::TransformTo(const CFX_Matrix* pDestMatrix, } CFX_DIBitmap* CFX_DIBSource::StretchTo(int dest_width, int dest_height, - FX_DWORD flags, + uint32_t flags, const FX_RECT* pClip) const { FX_RECT clip_rect(0, 0, FXSYS_abs(dest_width), FXSYS_abs(dest_height)); if (pClip) { @@ -623,7 +623,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { int Bpp = m_Storer.GetBitmap()->GetBPP() / 8; int destBpp = pTransformed->GetBPP() / 8; if (Bpp == 1) { - FX_DWORD argb[256]; + uint32_t argb[256]; FX_ARGB* pPal = m_Storer.GetBitmap()->GetPalette(); if (pPal) { for (int i = 0; i < 256; i++) { @@ -667,7 +667,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { } int row_offset_l = src_row_l * stretch_pitch; int row_offset_r = src_row_r * stretch_pitch; - FX_DWORD r_bgra_cmyk = argb[bilinear_interpol( + uint32_t r_bgra_cmyk = argb[bilinear_interpol( stretch_buf, row_offset_l, row_offset_r, src_col_l, src_col_r, res_x, res_y, 1, 0)]; if (transformF == FXDIB_Rgba) { @@ -675,7 +675,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { dest_pos[1] = (uint8_t)(r_bgra_cmyk >> 16); dest_pos[2] = (uint8_t)(r_bgra_cmyk >> 8); } else { - *(FX_DWORD*)dest_pos = r_bgra_cmyk; + *(uint32_t*)dest_pos = r_bgra_cmyk; } } dest_pos += destBpp; @@ -702,7 +702,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { bicubic_get_pos_weight(pos_pixel, u_w, v_w, src_col_l, src_row_l, res_x, res_y, stretch_width, stretch_height); - FX_DWORD r_bgra_cmyk = + uint32_t r_bgra_cmyk = argb[bicubic_interpol(stretch_buf, stretch_pitch, pos_pixel, u_w, v_w, res_x, res_y, 1, 0)]; if (transformF == FXDIB_Rgba) { @@ -710,7 +710,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { dest_pos[1] = (uint8_t)(r_bgra_cmyk >> 16); dest_pos[2] = (uint8_t)(r_bgra_cmyk >> 8); } else { - *(FX_DWORD*)dest_pos = r_bgra_cmyk; + *(uint32_t*)dest_pos = r_bgra_cmyk; } } dest_pos += destBpp; @@ -731,14 +731,14 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { if (src_row == stretch_height) { src_row--; } - FX_DWORD r_bgra_cmyk = + uint32_t r_bgra_cmyk = argb[stretch_buf[src_row * stretch_pitch + src_col]]; if (transformF == FXDIB_Rgba) { dest_pos[0] = (uint8_t)(r_bgra_cmyk >> 24); dest_pos[1] = (uint8_t)(r_bgra_cmyk >> 16); dest_pos[2] = (uint8_t)(r_bgra_cmyk >> 8); } else { - *(FX_DWORD*)dest_pos = r_bgra_cmyk; + *(uint32_t*)dest_pos = r_bgra_cmyk; } } dest_pos += destBpp; @@ -794,7 +794,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { r_pos_k_r = bilinear_interpol( stretch_buf, row_offset_l, row_offset_r, src_col_l, src_col_r, res_x, res_y, Bpp, 3); - *(FX_DWORD*)dest_pos = + *(uint32_t*)dest_pos = FXCMYK_TODIB(CmykEncode(r_pos_blue_c_r, r_pos_green_m_r, r_pos_red_y_r, r_pos_k_r)); } @@ -802,7 +802,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { uint8_t r_pos_a_r = bilinear_interpol( stretch_buf, row_offset_l, row_offset_r, src_col_l, src_col_r, res_x, res_y, Bpp, 3); - *(FX_DWORD*)dest_pos = FXARGB_TODIB( + *(uint32_t*)dest_pos = FXARGB_TODIB( FXARGB_MAKE(r_pos_a_r, r_pos_red_y_r, r_pos_green_m_r, r_pos_blue_c_r)); } @@ -812,11 +812,11 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { r_pos_k_r = bilinear_interpol( stretch_buf, row_offset_l, row_offset_r, src_col_l, src_col_r, res_x, res_y, Bpp, 3); - *(FX_DWORD*)dest_pos = + *(uint32_t*)dest_pos = FXCMYK_TODIB(CmykEncode(r_pos_blue_c_r, r_pos_green_m_r, r_pos_red_y_r, r_pos_k_r)); } else { - *(FX_DWORD*)dest_pos = FXARGB_TODIB( + *(uint32_t*)dest_pos = FXARGB_TODIB( FXARGB_MAKE(r_pos_k_r, r_pos_red_y_r, r_pos_green_m_r, r_pos_blue_c_r)); } @@ -865,7 +865,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { r_pos_k_r = bicubic_interpol(stretch_buf, stretch_pitch, pos_pixel, u_w, v_w, res_x, res_y, Bpp, 3); - *(FX_DWORD*)dest_pos = + *(uint32_t*)dest_pos = FXCMYK_TODIB(CmykEncode(r_pos_blue_c_r, r_pos_green_m_r, r_pos_red_y_r, r_pos_k_r)); } @@ -873,7 +873,7 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { uint8_t r_pos_a_r = bicubic_interpol(stretch_buf, stretch_pitch, pos_pixel, u_w, v_w, res_x, res_y, Bpp, 3); - *(FX_DWORD*)dest_pos = FXARGB_TODIB( + *(uint32_t*)dest_pos = FXARGB_TODIB( FXARGB_MAKE(r_pos_a_r, r_pos_red_y_r, r_pos_green_m_r, r_pos_blue_c_r)); } @@ -883,11 +883,11 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { r_pos_k_r = bicubic_interpol(stretch_buf, stretch_pitch, pos_pixel, u_w, v_w, res_x, res_y, Bpp, 3); - *(FX_DWORD*)dest_pos = + *(uint32_t*)dest_pos = FXCMYK_TODIB(CmykEncode(r_pos_blue_c_r, r_pos_green_m_r, r_pos_red_y_r, r_pos_k_r)); } else { - *(FX_DWORD*)dest_pos = FXARGB_TODIB( + *(uint32_t*)dest_pos = FXARGB_TODIB( FXARGB_MAKE(r_pos_k_r, r_pos_red_y_r, r_pos_green_m_r, r_pos_blue_c_r)); } @@ -920,19 +920,19 @@ FX_BOOL CFX_ImageTransformer::Continue(IFX_Pause* pPause) { dest_pos[1] = src_pos[1]; dest_pos[2] = src_pos[2]; } else { - *(FX_DWORD*)dest_pos = FXCMYK_TODIB(CmykEncode( + *(uint32_t*)dest_pos = FXCMYK_TODIB(CmykEncode( src_pos[0], src_pos[1], src_pos[2], src_pos[3])); } } else { - *(FX_DWORD*)dest_pos = FXARGB_TODIB(FXARGB_MAKE( + *(uint32_t*)dest_pos = FXARGB_TODIB(FXARGB_MAKE( src_pos[3], src_pos[2], src_pos[1], src_pos[0])); } } else { if (transformF == FXDIB_Cmyka) { - *(FX_DWORD*)dest_pos = FXCMYK_TODIB(CmykEncode( + *(uint32_t*)dest_pos = FXCMYK_TODIB(CmykEncode( src_pos[0], src_pos[1], src_pos[2], src_pos[3])); } else { - *(FX_DWORD*)dest_pos = FXARGB_TODIB( + *(uint32_t*)dest_pos = FXARGB_TODIB( FXARGB_MAKE(0xff, src_pos[2], src_pos[1], src_pos[0])); } } |