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
6969 int32_t iLumaSize = 0;
7070 int32_t iChromaSize = 0;
7171
72− pPic = (PPicture) WelsMalloc (sizeof (SPicture), "PPicture");
72+ pPic = (PPicture) WelsMallocz (sizeof (SPicture), "PPicture");
7373 WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
7474
7575 memset (pPic, 0, sizeof (SPicture));
@@ -82,7 +82,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 6 unmodified lines
8282 iLumaSize = iPicWidth * iPicHeight;
8383 iChromaSize = iPicChromaWidth * iPicChromaHeight;
8484
85− pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */
85+ pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
8686 + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
8787 memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
8888

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