Rename the decoder WelsMalloc to WelsMallocz

This function actually zero-initializes the allocated memory, thus
make this clear in the function name.

This makes the function name match the same behaviour in the encoder.
This commit is contained in:
Martin Storsjö
2015-01-30 10:37:48 +02:00
parent 9b442b3d44
commit 869870e670
12 changed files with 58 additions and 58 deletions

View File

@@ -69,7 +69,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const
int32_t iLumaSize = 0;
int32_t iChromaSize = 0;
pPic = (PPicture) WelsMalloc (sizeof (SPicture), "PPicture");
pPic = (PPicture) WelsMallocz (sizeof (SPicture), "PPicture");
WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
memset (pPic, 0, sizeof (SPicture));
@@ -82,7 +82,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const
iLumaSize = iPicWidth * iPicHeight;
iChromaSize = iPicChromaWidth * iPicChromaHeight;
pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */
pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
+ (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));