Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 1 file). Show all
Unified · Split
| @@ -260,7 +260,7 @@ void WelsSliceHeaderWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* pCur · 259 unmodified lines | |||
| 260 | if (P_SLICE == pSliceHeader->eSliceType) { | 260 | if (P_SLICE == pSliceHeader->eSliceType) { |
| 261 | BsWriteOneBit (pBs, pSliceHeader->bNumRefIdxActiveOverrideFlag); | 261 | BsWriteOneBit (pBs, pSliceHeader->bNumRefIdxActiveOverrideFlag); |
| 262 | if (pSliceHeader->bNumRefIdxActiveOverrideFlag) { | 262 | if (pSliceHeader->bNumRefIdxActiveOverrideFlag) { |
| 263 | BsWriteUE (pBs, pSliceHeader->uiNumRefIdxL0Active - 1); | 263 | BsWriteUE (pBs, WELS_CLIP3(pSliceHeader->uiNumRefIdxL0Active - 1, 0, MAX_REF_PIC_COUNT)); |
| 264 | } | 264 | } |
| 265 | } | 265 | } |
| 266 | 266 | ||
| @@ -328,7 +328,7 @@ void WelsSliceHeaderExtWrite (sWelsEncCtx* pCtx, SBitStringAux* pBs, SDqLayer* p · 61 unmodified lines | |||
| 328 | if (P_SLICE == pSliceHeader->eSliceType) { | 328 | if (P_SLICE == pSliceHeader->eSliceType) { |
| 329 | BsWriteOneBit (pBs, pSliceHeader->bNumRefIdxActiveOverrideFlag); | 329 | BsWriteOneBit (pBs, pSliceHeader->bNumRefIdxActiveOverrideFlag); |
| 330 | if (pSliceHeader->bNumRefIdxActiveOverrideFlag) { | 330 | if (pSliceHeader->bNumRefIdxActiveOverrideFlag) { |
| 331 | BsWriteUE (pBs, pSliceHeader->uiNumRefIdxL0Active - 1); | 331 | BsWriteUE (pBs, WELS_CLIP3(pSliceHeader->uiNumRefIdxL0Active - 1, 0, MAX_REF_PIC_COUNT)); |
| 332 | } | 332 | } |
| 333 | } | 333 | } |
| 334 | 334 | ||