The written nal length doesn't seem to be used at all.
Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 1 file). Show all
Unified · Split
| @@ -52,7 +52,6 @@ · 51 unmodified lines | ||
| 52 | 52 | #include "decode_slice.h" |
| 53 | 53 | #include "error_concealment.h" |
| 54 | 54 | #include "mem_align.h" |
| 55 | −#include "ls_defines.h" | |
| 56 | 55 | |
| 57 | 56 | namespace WelsDec { |
| 58 | 57 | |
| @@ -60,10 +59,6 @@ extern PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth · 1 unmodified line | ||
| 60 | 59 | |
| 61 | 60 | extern void FreePicture (PPicture pPic); |
| 62 | 61 | |
| 63 | −inline void GetValueOf4Bytes (uint8_t* pDstNal, int32_t iDdstIdx) { | |
| 64 | − ST32 (pDstNal, iDdstIdx); | |
| 65 | −} | |
| 66 | − | |
| 67 | 62 | static int32_t CreatePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, const int32_t kiSize, |
| 68 | 63 | const int32_t kiPicWidth, const int32_t kiPicHeight) { |
| 69 | 64 | PPicBuff pPicBuf = NULL; |
| @@ -447,7 +442,7 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 377 unmodified lines | ||
| 447 | 442 | |
| 448 | 443 | //copy raw data from source buffer (application) to raw data buffer (codec inside) |
| 449 | 444 | //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; | |
| 451 | 446 | |
| 452 | 447 | while (iSrcConsumed < iSrcLength) { |
| 453 | 448 | if ((2 + iSrcConsumed < iSrcLength) && |
| @@ -459,7 +454,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 5 unmodified lines | ||
| 459 | 454 | iSrcIdx += 3; |
| 460 | 455 | iSrcConsumed += 3; |
| 461 | 456 | } else { |
| 462 | − GetValueOf4Bytes (pDstNal - 4, iDstIdx); //pDstNal-4 (non-aligned by 4) in Solaris10(SPARC). Given value by byte. | |
| 463 | 457 | |
| 464 | 458 | iConsumedBytes = 0; |
| 465 | 459 | 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 | ||
| 515 | 509 | } |
| 516 | 510 | |
| 517 | 511 | //last NAL decoding |
| 518 | − GetValueOf4Bytes (pDstNal - 4, iDstIdx); //pDstNal-4 (non-aligned by 4) in Solaris10(SPARC). Given value by byte. | |
| 519 | 512 | |
| 520 | 513 | iConsumedBytes = 0; |
| 521 | 514 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); |