History

use active SPS parameters instead of other SPS.

Licai Guo committed 12 years ago

Commit 2983c921 parent 6854e061 file · +3 −37Browse files

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

Unified · Split

codec/decoder/core/src/decoder.cpp+3−37
@@ -174,50 +174,16 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx) { · 173 unmodified lines
174174
175175
176176 /*
177− * get size of reference picture list in target layer incoming, = (iNumRefFrames x 2)
177+ * get size of reference picture list in target layer incoming, = (iNumRefFrames
178178 */
179179 static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) {
180− bool* pSubsetSpsAvail = &pCtx->bSubspsAvailFlags[0];
181− bool* pSpsAvail = &pCtx->bSpsAvailFlags[0];
182− int32_t iSubsetIdx = -1;
183− int32_t iSpsIdx = -1;
184− bool bExistSubsetSps = false;
185− int32_t bExistSps = false;
186− int32_t iPos = MAX_SPS_COUNT - 1;
187180 int32_t iNumRefFrames = 0;
188−
189− while (iPos >= 0) {
190− if (pSubsetSpsAvail[iPos]) {
191− bExistSubsetSps = true;
192− iSubsetIdx = iPos;
193− break;
194− }
195− -- iPos;
196− }
197−
198− if (!bExistSubsetSps) {
199− iPos = MAX_SPS_COUNT - 1;
200− while (iPos >= 0) {
201− if (pSpsAvail[iPos]) {
202− bExistSps = true;
203− iSpsIdx = iPos;
204− break;
205− }
206− -- iPos;
207− }
208− }
209−
210− if (! (bExistSubsetSps || bExistSps)) {
181+ if ((pCtx == NULL) || (pCtx->pSps == NULL)) {
211182 iNumRefFrames = MAX_REF_PIC_COUNT;
212183 } else {
213− PSps pSps = bExistSubsetSps ? (&pCtx->sSubsetSpsBuffer[iSubsetIdx].sSps) : (&pCtx->sSpsBuffer[iSpsIdx]);
214−
215− iNumRefFrames = (pSps->iNumRefFrames) + 1;
184+ iNumRefFrames = pCtx->pSps->iNumRefFrames + 1;
216185 }
217186
218− if (0 == iNumRefFrames)
219− iNumRefFrames = (MIN_REF_PIC_COUNT);
220−
221187 #ifdef LONG_TERM_REF
222188 //pic_queue size minimum set 2
223189 if (iNumRefFrames < 2) {

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