Link Copied
[cpp]if ((sd->m_MBSkipCount <= 1) && ((true == sd->m_pSlice->IsSizeUnknown()) || (sd->m_pBitStream->BytesLeft()<=3))) { // Check for new slice header, which can change the next MB // to be decoded if (false == sd->m_pBitStream->More_RBSP_Data()) { // align bit stream to start code nCurMBNumber += 1; umcRes = UMC_ERR_END_OF_STREAM; break; } } // check for new slice header[/cpp]
After more investigation, the gray haze happens when loosing a slice in IDRs that are in the middle of the stream. I understand that it is not always applicable but in my situation (video conferencing), using the last output picture to conceal the IDR is usually preferable even in the case of scene change or resolution change.
To recap:
_ It would be nice if we could have an option to use the last output frame for concealment in case of loss in an IDR
_ If we lose one slice, the decoding of the frame stops and all the remaining slices are not decoded (see above)
_ RestoreErrorRect contains a bug where the first and last line of MB in the concealed slice are not dealt correctly. The function assume a linear chunk of memory when there are really between 1-3 rectangles to conceal depending on the start and last MB to conceal.
Emmanuel
For more complete information about compiler optimizations, see our Optimization Notice.