History

add a clip to avoid warning on gcc4.8.2 https://github.com/cisco/openh264/issues/1858

Sijia Chen committed 11 years ago

Commit 2a9035a1 parent d718ad81 file · +2 −2Browse files

Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+2−2
@@ -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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t