History

Remove unnecessary writing of nal length in the decoder

The written nal length doesn't seem to be used at all.

Martin Storsjö committed 12 years ago

Commit e9e4d0a1 parent 3d599051 file · +1 −8Browse files

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

Unified · Split

codec/decoder/core/src/decoder.cpp+1−8
@@ -52,7 +52,6 @@ · 51 unmodified lines
5252 #include "decode_slice.h"
5353 #include "error_concealment.h"
5454 #include "mem_align.h"
55−#include "ls_defines.h"
5655
5756 namespace WelsDec {
5857
@@ -60,10 +59,6 @@ extern PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth · 1 unmodified line
6059
6160 extern void FreePicture (PPicture pPic);
6261
63−inline void GetValueOf4Bytes (uint8_t* pDstNal, int32_t iDdstIdx) {
64− ST32 (pDstNal, iDdstIdx);
65−}
66−
6762 static int32_t CreatePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, const int32_t kiSize,
6863 const int32_t kiPicWidth, const int32_t kiPicHeight) {
6964 PPicBuff pPicBuf = NULL;
@@ -447,7 +442,7 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 377 unmodified lines
447442
448443 //copy raw data from source buffer (application) to raw data buffer (codec inside)
449444 //0x03 removal and extract all of NAL Unit from current raw data
450− pDstNal = pRawData->pCurPos + 4; //4-bytes used to write the length of current NAL rbsp
445+ pDstNal = pRawData->pCurPos;
451446
452447 while (iSrcConsumed < iSrcLength) {
453448 if ((2 + iSrcConsumed < iSrcLength) &&
@@ -459,7 +454,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 5 unmodified lines
459454 iSrcIdx += 3;
460455 iSrcConsumed += 3;
461456 } else {
462− GetValueOf4Bytes (pDstNal - 4, iDstIdx); //pDstNal-4 (non-aligned by 4) in Solaris10(SPARC). Given value by byte.
463457
464458 iConsumedBytes = 0;
465459 pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes);
@@ -515,7 +509,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 49 unmodified lines
515509 }
516510
517511 //last NAL decoding
518− GetValueOf4Bytes (pDstNal - 4, iDstIdx); //pDstNal-4 (non-aligned by 4) in Solaris10(SPARC). Given value by byte.
519512
520513 iConsumedBytes = 0;
521514 pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes);

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