avoid using the same picture buff for prev pic and curr pic
Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 3 files). Show all
Unified · Split
| @@ -179,10 +179,11 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { · 178 unmodified lines | ||
| 179 | 179 | */ |
| 180 | 180 | static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) { |
| 181 | 181 | int32_t iNumRefFrames = 0; |
| 182 | + // +2 for EC MV Copy buffer exchange | |
| 182 | 183 | if ((pCtx == NULL) || (pCtx->pSps == NULL)) { |
| 183 | − iNumRefFrames = MAX_REF_PIC_COUNT; | |
| 184 | + iNumRefFrames = MAX_REF_PIC_COUNT + 2; | |
| 184 | 185 | } else { |
| 185 | − iNumRefFrames = pCtx->pSps->iNumRefFrames + 1; | |
| 186 | + iNumRefFrames = pCtx->pSps->iNumRefFrames + 2; | |
| 186 | 187 | } |
| 187 | 188 | |
| 188 | 189 | #ifdef LONG_TERM_REF |