Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

h264dec: fix poc bug. #10

Merged
merged 1 commit into from
Apr 28, 2014
Merged

h264dec: fix poc bug. #10

merged 1 commit into from
Apr 28, 2014

Conversation

zhongcong
Copy link
Contributor

The type definition of picture poc difinitaion
error, then output picture with minimal poc might
be error.

Signed-off-by: Zhong Cong congx.zhong@intel.com

@xuguangxin
Copy link
Contributor

Why this patch help fix bug?Can you list effected lines in commit?

@zhongcong
Copy link
Contributor Author

i have changed the patch, pls help check again.

The type definition of picture poc difinitaion should be
signed int but not unsigned int.
Bug occurs in VaapiDPBManager::bumpDPB(),if poc less then
0,then output picture with minimal poc might be error.
See code above:
/*
 * if (!foundPicture || foundPicture->m_POC > picture->m_POC)
 *     foundPicture = picture, frameIndex = i;
*/

@xuguangxin
Copy link
Contributor

why it become negative thing?poc is display order. it should never been negative.

1. Related clips: VWP2_TOSHIBA_E.264 CVWP3_TOSHIBA_E.264

2. The type definition of picture poc difinitaion should be
signed int but not unsigned int according to ITU spec D.2.7.
Specifically provides as follows:
Any value within in the range of -(31 power of 2) to (31 power of 2) - 1,
inclusive, may be assigned to the values of the variables TopFieldOrderCnt
and BottomFieldOrderCnt of the reference pictures that are not available
due to the random access operation. For example,the value 0 may be
assigned to these variables.

3. Bug occurs in VaapiDPBManager::bumpDPB(),if poc less then
0,then output picture with minimal poc might be error.
See code below:
/*
 * if (!foundPicture || foundPicture->m_POC > picture->m_POC)
 *     foundPicture = picture, frameIndex = i;
*/

Signed-off-by: Zhong Cong <congx.zhong@intel.com>
@zhongcong
Copy link
Contributor Author

hi , i look poc up in ITU spec. And find something about negative poc. And change commit of this patch.Pls check again.
The type definition of picture poc difinitaion should be
signed int but not unsigned int according to ITU spec D.2.7.
Specifically provides as follows:
Any value within in the range of -(31 power of 2) to (31 power of 2) - 1,
inclusive, may be assigned to the values of the variables TopFieldOrderCnt
and BottomFieldOrderCnt of the reference pictures that are not available
due to the random access operation. For example,the value 0 may be
assigned to these variables.

@xuguangxin xuguangxin merged commit 788e1a7 into intel:master Apr 28, 2014
This was referenced Sep 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants