mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-12-26 11:17:44 +01:00
[mpp_dec/mpp_enc]): Fix error on control notify
When notify goes with control process the control notify should not clear the other remaining notifies. Signed-off-by: Herman Chen <herman.chen@rock-chips.com> Change-Id: Ie5adbf10047ccbaed8717d008b60e89e08817840
This commit is contained in:
parent
7c02c505e9
commit
64cf1d5a16
2 changed files with 15 additions and 6 deletions
|
|
@ -46,14 +46,17 @@ static MPP_RET check_task_wait(MppDecImpl *dec, DecTask *task)
|
|||
RK_U32 last_wait = dec->parser_wait_flag;
|
||||
RK_U32 curr_wait = task->wait.val;
|
||||
RK_U32 wait_chg = last_wait & (~curr_wait);
|
||||
RK_U32 keep_notify = 0;
|
||||
|
||||
do {
|
||||
if (dec->reset_flag)
|
||||
break;
|
||||
|
||||
// NOTE: User control should always be processed
|
||||
if (notify & MPP_DEC_CONTROL)
|
||||
if (notify & MPP_DEC_CONTROL) {
|
||||
keep_notify = notify & (~MPP_DEC_CONTROL);
|
||||
break;
|
||||
}
|
||||
|
||||
// NOTE: When condition is not fulfilled check nofify flag again
|
||||
if (!curr_wait || (curr_wait & notify))
|
||||
|
|
@ -68,7 +71,7 @@ static MPP_RET check_task_wait(MppDecImpl *dec, DecTask *task)
|
|||
|
||||
dec->parser_status_flag = task->status.val;
|
||||
dec->parser_wait_flag = task->wait.val;
|
||||
dec->parser_notify_flag = 0;
|
||||
dec->parser_notify_flag = keep_notify;
|
||||
|
||||
if (ret) {
|
||||
dec->parser_wait_count++;
|
||||
|
|
|
|||
|
|
@ -197,14 +197,17 @@ static MPP_RET check_enc_task_wait(MppEncImpl *enc, EncAsyncWait *wait)
|
|||
RK_U32 last_wait = enc->status_flag;
|
||||
RK_U32 curr_wait = wait->val;
|
||||
RK_U32 wait_chg = last_wait & (~curr_wait);
|
||||
RK_U32 keep_notify = 0;
|
||||
|
||||
do {
|
||||
if (enc->reset_flag)
|
||||
break;
|
||||
|
||||
// NOTE: User control should always be processed
|
||||
if (notify & MPP_ENC_CONTROL)
|
||||
if (notify & MPP_ENC_CONTROL) {
|
||||
keep_notify = notify & (~MPP_ENC_CONTROL);
|
||||
break;
|
||||
}
|
||||
|
||||
// NOTE: When condition is not fulfilled check nofify flag again
|
||||
if (!curr_wait || (curr_wait & notify))
|
||||
|
|
@ -217,7 +220,7 @@ static MPP_RET check_enc_task_wait(MppEncImpl *enc, EncAsyncWait *wait)
|
|||
last_wait, curr_wait, wait_chg, notify, (ret) ? ("wait") : ("work"));
|
||||
|
||||
enc->status_flag = wait->val;
|
||||
enc->notify_flag = 0;
|
||||
enc->notify_flag = keep_notify;
|
||||
|
||||
if (ret) {
|
||||
enc->wait_count++;
|
||||
|
|
@ -2823,14 +2826,17 @@ static MPP_RET check_enc_async_wait(MppEncImpl *enc, EncAsyncWait *wait)
|
|||
RK_U32 last_wait = enc->status_flag;
|
||||
RK_U32 curr_wait = wait->val;
|
||||
RK_U32 wait_chg = last_wait & (~curr_wait);
|
||||
RK_U32 keep_notify = 0;
|
||||
|
||||
do {
|
||||
if (enc->reset_flag)
|
||||
break;
|
||||
|
||||
// NOTE: User control should always be processed
|
||||
if (notify & MPP_ENC_CONTROL)
|
||||
if (notify & MPP_ENC_CONTROL) {
|
||||
keep_notify = notify & (~MPP_ENC_CONTROL);
|
||||
break;
|
||||
}
|
||||
|
||||
// NOTE: When condition is not fulfilled check nofify flag again
|
||||
if (!curr_wait || (curr_wait & notify))
|
||||
|
|
@ -2843,7 +2849,7 @@ static MPP_RET check_enc_async_wait(MppEncImpl *enc, EncAsyncWait *wait)
|
|||
last_wait, curr_wait, wait_chg, notify, (ret) ? ("wait") : ("work"));
|
||||
|
||||
enc->status_flag = wait->val;
|
||||
enc->notify_flag = 0;
|
||||
enc->notify_flag = keep_notify;
|
||||
|
||||
if (ret) {
|
||||
enc->wait_count++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue