History

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.

Martin Storsjö committed 11 years ago

Commit 869870e1 parent 9b442b312 files · +58 −58Browse files

Showing the changes to codec/decoder/core/src/pic_queue.cpp (1 of 12 files). Show all

Unified · Split

codec/decoder/core/src/pic_queue.cpp+2−2
@@ -69,7 +69,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 68 unmodified lines
69 int32_t iLumaSize = 0;69 int32_t iLumaSize = 0;
70 int32_t iChromaSize = 0;70 int32_t iChromaSize = 0;
71 71
72 pPic = (PPicture) WelsMalloc (sizeof (SPicture), "PPicture");72 pPic = (PPicture) WelsMallocz (sizeof (SPicture), "PPicture");
73 WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);73 WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
74 74
75 memset (pPic, 0, sizeof (SPicture));75 memset (pPic, 0, sizeof (SPicture));
@@ -82,7 +82,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 6 unmodified lines
82 iLumaSize = iPicWidth * iPicHeight;82 iLumaSize = iPicWidth * iPicHeight;
83 iChromaSize = iPicChromaWidth * iPicChromaHeight;83 iChromaSize = iPicChromaWidth * iPicChromaHeight;
84 84
85 pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */85 pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
86 + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));86 + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
87 memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));87 memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
88 88

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t