ref: 2c6445ea9c198f7a68c795cccb7d6f3348c7715f
parent: 0e97bacdf3521ae0ff7292066dcfe43f3147f5c9
author: xiaotiansf <[email protected]>
date: Thu Aug 16 13:32:01 EDT 2018
Fix Bugzilla issue: minor. It should always return an error when LIST_1 ref picure 0 is NULL.
--- a/codec/decoder/core/src/parse_mb_syn_cabac.cpp
+++ b/codec/decoder/core/src/parse_mb_syn_cabac.cpp
@@ -739,21 +739,19 @@
if (IS_DIRECT (mbType)) {
int16_t pMvDirect[LIST_A][2] = { { 0, 0 }, { 0, 0 } };
- if (pCtx->sRefPic.pRefList[LIST_1][0] != NULL) {
- if (pSliceHeader->iDirectSpatialMvPredFlag) {
- //predict direct spatial mv
- SubMbType subMbType;
- int32_t ret = PredMvBDirectSpatial (pCtx, pMvDirect, iRef, subMbType);
- if (ret != ERR_NONE) {
- return ret;
- }
- } else {
- //temporal direct 16x16 mode
- ComputeColocated (pCtx);
- int32_t ret = PredBDirectTemporal (pCtx, pMvDirect, iRef);
- if (ret != ERR_NONE) {
- return ret;
- }
+ if (pSliceHeader->iDirectSpatialMvPredFlag) {
+ //predict direct spatial mv
+ SubMbType subMbType;
+ int32_t ret = PredMvBDirectSpatial (pCtx, pMvDirect, iRef, subMbType);
+ if (ret != ERR_NONE) {
+ return ret;
+ }
+ } else {
+ //temporal direct 16x16 mode
+ ComputeColocated (pCtx);
+ int32_t ret = PredBDirectTemporal (pCtx, pMvDirect, iRef);
+ if (ret != ERR_NONE) {
+ return ret;
}
}
} else if (IS_INTER_16x16 (mbType)) {