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
174 174
175 175
176/*176/*
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
178 */178 */
179static inline int32_t GetTargetRefListSize (PWelsDecoderContext pCtx) {179static 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;
187 int32_t iNumRefFrames = 0;180 int32_t iNumRefFrames = 0;
188 181 if ((pCtx == NULL) || (pCtx->pSps == NULL)) {
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)) {
211 iNumRefFrames = MAX_REF_PIC_COUNT;182 iNumRefFrames = MAX_REF_PIC_COUNT;
212 } else {183 } else {
213 PSps pSps = bExistSubsetSps ? (&pCtx->sSubsetSpsBuffer[iSubsetIdx].sSps) : (&pCtx->sSpsBuffer[iSpsIdx]);184 iNumRefFrames = pCtx->pSps->iNumRefFrames + 1;
214
215 iNumRefFrames = (pSps->iNumRefFrames) + 1;
216 }185 }
217 186
218 if (0 == iNumRefFrames)
219 iNumRefFrames = (MIN_REF_PIC_COUNT);
220
221#ifdef LONG_TERM_REF187#ifdef LONG_TERM_REF
222 //pic_queue size minimum set 2188 //pic_queue size minimum set 2
223 if (iNumRefFrames < 2) {189 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