ref: 507ffbadb6d63bed5376be0314d8c07470632844
parent: 159ca4461fbb24c985976c331a222f1c73d91a15
parent: f265ab8e850e1f156f561e61e4ed2bc1f005f61a
author: sijchen <sijchen@cisco.com>
date: Fri Jul 3 08:25:40 EDT 2015
Merge pull request #2022 from sijchen/fix_slc [Encoder] fix a first-mb judgement
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -862,8 +862,8 @@
const int32_t kiPartitaionId = pCurSlice->uiSliceIdx % kiActiveThreadsNum;
const int32_t kiLastMbIdxInPartition = pEncCtx->pCurDqLayer->pLastMbIdxOfPartition[kiPartitaionId];
- const bool kbCurMbNotFirstMbOfCurSlice = (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
- pSliceCtx->pOverallMbMap[iCurMbIdx - 1]);
+ const bool kbCurMbNotFirstMbOfCurSlice = ((iCurMbIdx > 0) && (pSliceCtx->pOverallMbMap[iCurMbIdx] ==
+ pSliceCtx->pOverallMbMap[iCurMbIdx - 1]));
const bool kbCurMbNotLastMbOfCurPartition = iCurMbIdx < kiLastMbIdxInPartition;
if (pCurSlice->bDynamicSlicingSliceSizeCtrlFlag)