Showing the changes to codec/encoder/core/src/ratectl.cpp (1 of 6 files). Show all
Unified · Split
| @@ -655,7 +655,7 @@ void RcCalculateGomQp (sWelsEncCtx* pEncCtx, SMB* pCurMb, int32_t iSliceId) { · 654 unmodified lines | |||
| 655 | int64_t iLeftBits = pSOverRc->iTargetBitsSlice - pSOverRc->iFrameBitsSlice; | 655 | int64_t iLeftBits = pSOverRc->iTargetBitsSlice - pSOverRc->iFrameBitsSlice; |
| 656 | int64_t iTargetLeftBits = iLeftBits + pSOverRc->iGomBitsSlice - pSOverRc->iGomTargetBits; | 656 | int64_t iTargetLeftBits = iLeftBits + pSOverRc->iGomBitsSlice - pSOverRc->iGomTargetBits; |
| 657 | 657 | ||
| 658 | if (iLeftBits <= 0) { | 658 | if ((iLeftBits <= 0)||(iTargetLeftBits <=0)) { |
| 659 | pSOverRc->iCalculatedQpSlice += 2; | 659 | pSOverRc->iCalculatedQpSlice += 2; |
| 660 | } else { | 660 | } else { |
| 661 | //globe decision | 661 | //globe decision |