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 | #include "decode_slice.h" | 52 | #include "decode_slice.h" |
| 53 | #include "error_concealment.h" | 53 | #include "error_concealment.h" |
| 54 | #include "mem_align.h" | 54 | #include "mem_align.h" |
| 55 | #include "ls_defines.h" | ||
| 56 | 55 | ||
| 57 | namespace WelsDec { | 56 | namespace WelsDec { |
| 58 | 57 | ||
| @@ -60,10 +59,6 @@ extern PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth · 1 unmodified line | |||
| 60 | 59 | ||
| 61 | extern void FreePicture (PPicture pPic); | 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 | static int32_t CreatePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, const int32_t kiSize, | 62 | static int32_t CreatePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, const int32_t kiSize, |
| 68 | const int32_t kiPicWidth, const int32_t kiPicHeight) { | 63 | const int32_t kiPicWidth, const int32_t kiPicHeight) { |
| 69 | PPicBuff pPicBuf = NULL; | 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 | //copy raw data from source buffer (application) to raw data buffer (codec inside) | 443 | //copy raw data from source buffer (application) to raw data buffer (codec inside) |
| 449 | //0x03 removal and extract all of NAL Unit from current raw data | 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 | while (iSrcConsumed < iSrcLength) { | 447 | while (iSrcConsumed < iSrcLength) { |
| 453 | if ((2 + iSrcConsumed < iSrcLength) && | 448 | if ((2 + iSrcConsumed < iSrcLength) && |
| @@ -459,7 +454,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 5 unmodified lines | |||
| 459 | iSrcIdx += 3; | 454 | iSrcIdx += 3; |
| 460 | iSrcConsumed += 3; | 455 | iSrcConsumed += 3; |
| 461 | } else { | 456 | } else { |
| 462 | GetValueOf4Bytes (pDstNal - 4, iDstIdx); //pDstNal-4 (non-aligned by 4) in Solaris10(SPARC). Given value by byte. | ||
| 463 | 457 | ||
| 464 | iConsumedBytes = 0; | 458 | iConsumedBytes = 0; |
| 465 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); | 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 | //last NAL decoding | 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 | iConsumedBytes = 0; | 513 | iConsumedBytes = 0; |
| 521 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); | 514 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); |