mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[warnings] fix redundant casts
This commit is contained in:
@@ -2942,7 +2942,7 @@ static int ncrush_generate_tables(NCRUSH_CONTEXT* context)
|
||||
for (int j = 0; j < 1 << LOMBitsLUT[i]; j++)
|
||||
{
|
||||
size_t l = (cnt++) + 2ull;
|
||||
context->HuffTableLOM[l] = (int)i;
|
||||
context->HuffTableLOM[l] = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ static INLINE INT32 planar_decompress_plane_rle(const BYTE* WINPR_RESTRICT pSrcD
|
||||
|
||||
for (INT32 y = beg; y != end; y += inc)
|
||||
{
|
||||
BYTE* dstp = &pDstData[((nYDst + y) * (INT32)nDstStep) + (nXDst * 4) + nChannel];
|
||||
BYTE* dstp = &pDstData[((nYDst + y) * nDstStep) + (nXDst * 4) + nChannel];
|
||||
pixel = 0;
|
||||
currentScanline = dstp;
|
||||
|
||||
@@ -515,7 +515,7 @@ static INLINE INT32 planar_set_plane(BYTE bValue, BYTE* pDstData, INT32 nDstStep
|
||||
|
||||
for (INT32 y = beg; y != end; y += inc)
|
||||
{
|
||||
BYTE* dstp = &pDstData[((nYDst + y) * (INT32)nDstStep) + (nXDst * 4) + nChannel];
|
||||
BYTE* dstp = &pDstData[((nYDst + y) * nDstStep) + (nXDst * 4) + nChannel];
|
||||
|
||||
for (INT32 x = 0; x < (INT32)nWidth; ++x)
|
||||
{
|
||||
@@ -1130,7 +1130,7 @@ static INLINE BOOL freerdp_split_color_planes(BITMAP_PLANAR_CONTEXT* WINPR_RESTR
|
||||
UINT32 k = 0;
|
||||
for (UINT32 i = 0; i < height; i++)
|
||||
{
|
||||
const BYTE* pixel = &data[1ULL * scanline * (UINT32)i];
|
||||
const BYTE* pixel = &data[1ULL * scanline * i];
|
||||
|
||||
for (UINT32 j = 0; j < width; j++)
|
||||
{
|
||||
@@ -1222,7 +1222,7 @@ static INLINE UINT32 freerdp_bitmap_planar_write_rle_bytes(const BYTE* WINPR_RES
|
||||
outBufferSize--;
|
||||
*pOutput = controlByte;
|
||||
pOutput++;
|
||||
nBytesToWrite = (int)(controlByte >> 4);
|
||||
nBytesToWrite = (controlByte >> 4);
|
||||
|
||||
if (nBytesToWrite)
|
||||
{
|
||||
|
||||
@@ -1022,18 +1022,18 @@ progressive_decompress_tile_first(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progressiv
|
||||
progressive_rfx_quant_add(quantCr, quantProgCr, &shiftCr);
|
||||
progressive_rfx_quant_lsub(&shiftCr, 1); /* -6 + 5 = -1 */
|
||||
|
||||
pSign[0] = (INT16*)((BYTE*)(&tile->sign[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSign[1] = (INT16*)((BYTE*)(&tile->sign[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSign[2] = (INT16*)((BYTE*)(&tile->sign[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
pSign[0] = (INT16*)((&tile->sign[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSign[1] = (INT16*)((&tile->sign[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSign[2] = (INT16*)((&tile->sign[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
|
||||
pCurrent[0] = (INT16*)((BYTE*)(&tile->current[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pCurrent[1] = (INT16*)((BYTE*)(&tile->current[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pCurrent[2] = (INT16*)((BYTE*)(&tile->current[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
pCurrent[0] = (INT16*)((&tile->current[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pCurrent[1] = (INT16*)((&tile->current[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pCurrent[2] = (INT16*)((&tile->current[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
|
||||
pBuffer = (BYTE*)BufferPool_Take(progressive->bufferPool, -1);
|
||||
pSrcDst[0] = (INT16*)((BYTE*)(&pBuffer[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSrcDst[1] = (INT16*)((BYTE*)(&pBuffer[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSrcDst[2] = (INT16*)((BYTE*)(&pBuffer[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
pSrcDst[0] = (INT16*)((&pBuffer[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSrcDst[1] = (INT16*)((&pBuffer[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSrcDst[2] = (INT16*)((&pBuffer[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
|
||||
rc = progressive_rfx_decode_component(progressive, &shiftY, tile->yData, tile->yLen, pSrcDst[0],
|
||||
pCurrent[0], pSign[0], diff, sub, extrapolate); /* Y */
|
||||
@@ -1457,18 +1457,18 @@ progressive_decompress_tile_upgrade(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progress
|
||||
tile->cbProgQuant = *quantProgCb;
|
||||
tile->crProgQuant = *quantProgCr;
|
||||
|
||||
pSign[0] = (INT16*)((BYTE*)(&tile->sign[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSign[1] = (INT16*)((BYTE*)(&tile->sign[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSign[2] = (INT16*)((BYTE*)(&tile->sign[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
pSign[0] = (INT16*)((&tile->sign[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSign[1] = (INT16*)((&tile->sign[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSign[2] = (INT16*)((&tile->sign[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
|
||||
pCurrent[0] = (INT16*)((BYTE*)(&tile->current[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pCurrent[1] = (INT16*)((BYTE*)(&tile->current[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pCurrent[2] = (INT16*)((BYTE*)(&tile->current[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
pCurrent[0] = (INT16*)((&tile->current[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pCurrent[1] = (INT16*)((&tile->current[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pCurrent[2] = (INT16*)((&tile->current[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
|
||||
pBuffer = (BYTE*)BufferPool_Take(progressive->bufferPool, -1);
|
||||
pSrcDst[0] = (INT16*)((BYTE*)(&pBuffer[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSrcDst[1] = (INT16*)((BYTE*)(&pBuffer[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSrcDst[2] = (INT16*)((BYTE*)(&pBuffer[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
pSrcDst[0] = (INT16*)((&pBuffer[((8192 + 32) * 0) + 16])); /* Y/R buffer */
|
||||
pSrcDst[1] = (INT16*)((&pBuffer[((8192 + 32) * 1) + 16])); /* Cb/G buffer */
|
||||
pSrcDst[2] = (INT16*)((&pBuffer[((8192 + 32) * 2) + 16])); /* Cr/B buffer */
|
||||
|
||||
status = progressive_rfx_upgrade_component(progressive, &shiftY, quantProgY, &yNumBits,
|
||||
pSrcDst[0], pCurrent[0], pSign[0], tile->ySrlData,
|
||||
|
||||
@@ -1638,8 +1638,8 @@ RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* WINPR_RESTRICT context,
|
||||
const RFX_RECT* WINPR_RESTRICT rects, size_t numRects,
|
||||
const BYTE* WINPR_RESTRICT data, UINT32 w, UINT32 h, size_t s)
|
||||
{
|
||||
const UINT32 width = (UINT32)w;
|
||||
const UINT32 height = (UINT32)h;
|
||||
const UINT32 width = w;
|
||||
const UINT32 height = h;
|
||||
const UINT32 scanline = (UINT32)s;
|
||||
RFX_MESSAGE* message = NULL;
|
||||
PTP_WORK* workObject = NULL;
|
||||
@@ -1791,9 +1791,9 @@ RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* WINPR_RESTRICT context,
|
||||
if (!(tile->YCbCrData = (BYTE*)BufferPool_Take(context->priv->BufferPool, -1)))
|
||||
goto skip_encoding_loop;
|
||||
|
||||
tile->YData = (BYTE*)&(tile->YCbCrData[((8192 + 32) * 0) + 16]);
|
||||
tile->CbData = (BYTE*)&(tile->YCbCrData[((8192 + 32) * 1) + 16]);
|
||||
tile->CrData = (BYTE*)&(tile->YCbCrData[((8192 + 32) * 2) + 16]);
|
||||
tile->YData = &(tile->YCbCrData[((8192 + 32) * 0) + 16]);
|
||||
tile->CbData = &(tile->YCbCrData[((8192 + 32) * 1) + 16]);
|
||||
tile->CrData = &(tile->YCbCrData[((8192 + 32) * 2) + 16]);
|
||||
|
||||
if (!rfx_ensure_tiles(message, 1))
|
||||
goto skip_encoding_loop;
|
||||
|
||||
@@ -83,9 +83,9 @@ BOOL rfx_decode_rgb(RFX_CONTEXT* WINPR_RESTRICT context, const RFX_TILE* WINPR_R
|
||||
cb_quants = context->quants + (10ULL * tile->quantIdxCb);
|
||||
cr_quants = context->quants + (10ULL * tile->quantIdxCr);
|
||||
pBuffer = (BYTE*)BufferPool_Take(context->priv->BufferPool, -1);
|
||||
pSrcDst[0] = (INT16*)((BYTE*)(&pBuffer[((8192ULL + 32ULL) * 0ULL) + 16ULL])); /* y_r_buffer */
|
||||
pSrcDst[1] = (INT16*)((BYTE*)(&pBuffer[((8192ULL + 32ULL) * 1ULL) + 16ULL])); /* cb_g_buffer */
|
||||
pSrcDst[2] = (INT16*)((BYTE*)(&pBuffer[((8192ULL + 32ULL) * 2ULL) + 16ULL])); /* cr_b_buffer */
|
||||
pSrcDst[0] = (INT16*)((&pBuffer[((8192ULL + 32ULL) * 0ULL) + 16ULL])); /* y_r_buffer */
|
||||
pSrcDst[1] = (INT16*)((&pBuffer[((8192ULL + 32ULL) * 1ULL) + 16ULL])); /* cb_g_buffer */
|
||||
pSrcDst[2] = (INT16*)((&pBuffer[((8192ULL + 32ULL) * 2ULL) + 16ULL])); /* cr_b_buffer */
|
||||
rfx_decode_component(context, y_quants, tile->YData, tile->YLen, pSrcDst[0]); /* YData */
|
||||
rfx_decode_component(context, cb_quants, tile->CbData, tile->CbLen, pSrcDst[1]); /* CbData */
|
||||
rfx_decode_component(context, cr_quants, tile->CrData, tile->CrLen, pSrcDst[2]); /* CrData */
|
||||
|
||||
@@ -283,9 +283,9 @@ void rfx_encode_rgb(RFX_CONTEXT* WINPR_RESTRICT context, RFX_TILE* WINPR_RESTRIC
|
||||
YQuant = context->quants + (10ULL * tile->quantIdxY);
|
||||
CbQuant = context->quants + (10ULL * tile->quantIdxCb);
|
||||
CrQuant = context->quants + (10ULL * tile->quantIdxCr);
|
||||
pSrcDst[0] = (INT16*)((BYTE*)(&pBuffer[((8192ULL + 32ULL) * 0ULL) + 16ULL])); /* y_r_buffer */
|
||||
pSrcDst[1] = (INT16*)((BYTE*)(&pBuffer[((8192ULL + 32ULL) * 1ULL) + 16ULL])); /* cb_g_buffer */
|
||||
pSrcDst[2] = (INT16*)((BYTE*)(&pBuffer[((8192ULL + 32ULL) * 2ULL) + 16ULL])); /* cr_b_buffer */
|
||||
pSrcDst[0] = (INT16*)((&pBuffer[((8192ULL + 32ULL) * 0ULL) + 16ULL])); /* y_r_buffer */
|
||||
pSrcDst[1] = (INT16*)((&pBuffer[((8192ULL + 32ULL) * 1ULL) + 16ULL])); /* cb_g_buffer */
|
||||
pSrcDst[2] = (INT16*)((&pBuffer[((8192ULL + 32ULL) * 2ULL) + 16ULL])); /* cr_b_buffer */
|
||||
PROFILER_ENTER(context->priv->prof_rfx_encode_rgb)
|
||||
PROFILER_ENTER(context->priv->prof_rfx_encode_format_rgb)
|
||||
rfx_encode_format_rgb(tile->data, tile->width, tile->height, tile->scanline,
|
||||
|
||||
Reference in New Issue
Block a user