-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refined the DEADLOCK_DEBUG outputs in each encoding stage. #492
Refined the DEADLOCK_DEBUG outputs in each encoding stage. #492
Conversation
Signed-off-by: Austin Hu <austin.hu@intel.com>
@@ -2100,6 +2097,9 @@ void* ModeDecisionConfigurationKernel(void *inputPtr) | |||
EbPostFullObject(encDecTasksWrapperPtr); | |||
} | |||
} | |||
#if DEADLOCK_DEBUG | |||
SVT_LOG("POC %lu MDC OUT \n", pictureControlSetPtr->pictureNumber); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to right after EbPostFullObject?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ModeDecisionConfiguration posts tile group(s) of a picture to EncDec. But DEADLOCK_DEBUG is used to track picture level, not tile, segment or LCU level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. thank you.
Signed-off-by: Austin Hu <austin.hu@intel.com>
Source/Lib/Codec/EbEncDecProcess.c
Outdated
#if DEADLOCK_DEBUG | ||
SVT_LOG("POC %lld ENCDEC OUT \n", pictureControlSetPtr->pictureNumber); | ||
SVT_LOG("POC %lu ENCDEC OUT \n", pictureControlSetPtr->pictureNumber); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I run this PR, the line sometimes shows later than PK OUT
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, due to the race condition that, PK triggered from Line 3051 may happen before the current picture completes its encoding with SAO and other stuff.
Signed-off-by: Austin Hu <austin.hu@intel.com>
Signed-off-by: Austin Hu <austin.hu@intel.com>
The recommended steps to debug encoding dead lock (hang) issue: 1. Track the POCs in the entrace and exit of the encoding pipeline, by forcibly printing the 1st DEADLOCK_DEBUG log in RC, and the last DEADLOCK_DEBUG log in PK; 2. Reorder the POC numbers of RC and PK separately, to check the 1st POC which couldn't be outputted from PK; 3. Open the DEADLOCK_DEBUG switch, and change the MIN_POC & MAX_POC values clamping the range where that POC locates. 2. Check the specific stage where that POC can't go through. Signed-off-by: Austin Hu <austin.hu@intel.com>
Do you have a bit more background on why the MIN/MAX check is needed. If it's to help pinpoint issues in debugging, then maybe add a comment saying that this is the purpose of these defines. Just fyi. A typical value for UINT_MAX is 4294967295 which for a 60fps video corresponds to a duration of close to 20k hours. |
Signed-off-by: Austin Hu <austin.hu@intel.com>
Added the instructions into the code, thanks! |
Signed-off-by: Austin Hu <austin.hu@intel.com>
To track each picture whether it's posted from every encoding kernel or not, after being fed into kernels.
As the message is to track picture level, this change can output picture flow once in each encoding kernel, with redundant outputs eliminated.
The recommended steps to debug encoding dead lock (hang) issue:
by forcibly printing the 1st DEADLOCK_DEBUG log in RC, and the
last DEADLOCK_DEBUG log in PK;
1st POC which couldn't be outputted from PK;
values clamping the range where that POC locates;
Signed-off-by: Austin Hu austin.hu@intel.com