| @@ -477,8 +477,8 @@ void BsStartCavlc (PBitStringAux pBs) { · 476 unmodified lines |
| 477 | } | 477 | } |
| 478 | void BsEndCavlc (PBitStringAux pBs) { | 478 | void BsEndCavlc (PBitStringAux pBs) { |
| 479 | pBs->pCurBuf = pBs->pStartBuf + (pBs->iIndex >> 3); | 479 | pBs->pCurBuf = pBs->pStartBuf + (pBs->iIndex >> 3); |
| 480 | pBs->uiCurBits = ((((pBs->pCurBuf[0] << 8) | pBs->pCurBuf[1]) << 16) | (pBs->pCurBuf[2] << 8) | pBs->pCurBuf[3]) << | 480 | uint32_t uiCache32Bit = (uint32_t)((((pBs->pCurBuf[0] << 8) | pBs->pCurBuf[1]) << 16) | (pBs->pCurBuf[2] << 8) | pBs->pCurBuf[3]); |
| 481 | (pBs->iIndex & 0x07); | 481 | pBs->uiCurBits = uiCache32Bit << (pBs->iIndex & 0x07); |
| 482 | pBs->pCurBuf += 4; | 482 | pBs->pCurBuf += 4; |
| 483 | pBs->iLeftBits = -16 + (pBs->iIndex & 0x07); | 483 | pBs->iLeftBits = -16 + (pBs->iIndex & 0x07); |
| 484 | } | 484 | } |
| @@ -677,7 +677,8 @@ int32_t WelsResidualBlockCavlc (SVlcTable* pVlcTable, uint8_t* pNonZeroCountCach · 192 unmodified lines |
| 677 | uint8_t bChroma = (bChromaDc || CHROMA_AC == iResidualProperty); | 677 | uint8_t bChroma = (bChromaDc || CHROMA_AC == iResidualProperty); |
| 678 | SReadBitsCache sReadBitsCache; | 678 | SReadBitsCache sReadBitsCache; |
| 679 | | 679 | |
| 680 | sReadBitsCache.uiCache32Bit = ((((pBuf[0] << 8) | pBuf[1]) << 16) | (pBuf[2] << 8) | pBuf[3]) << (iCurIdx & 0x07); | 680 | uint32_t uiCache32Bit = (uint32_t)((((pBuf[0] << 8) | pBuf[1]) << 16) | (pBuf[2] << 8) | pBuf[3]); |
| | 681 | sReadBitsCache.uiCache32Bit = uiCache32Bit << (iCurIdx & 0x07); |
| 681 | sReadBitsCache.uiRemainBits = 32 - (iCurIdx & 0x07); | 682 | sReadBitsCache.uiRemainBits = 32 - (iCurIdx & 0x07); |
| 682 | sReadBitsCache.pBuf = pBuf; | 683 | sReadBitsCache.pBuf = pBuf; |
| 683 | ////////////////////////////////////////////////////////////////////////// | 684 | ////////////////////////////////////////////////////////////////////////// |