Skip to content

Commit

Permalink
[Decode] optimize media reset threshold
Browse files Browse the repository at this point in the history
optimize media reset threshold for more platform
  • Loading branch information
shawnli2 authored and intel-mediadev committed Aug 8, 2023
1 parent f559159 commit ca13c09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,17 @@ class Impl : public mi::Impl<Cmd>
}
else
{
if ((frameWidth * frameHeight) >= (16000 * 16000))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_16Kx16K_WATCHDOG_THRESHOLD_IN_MS;
}
else if ((frameWidth * frameHeight) >= (7680 * 4320))
if ((frameWidth * frameHeight) >= (7680 * 4320))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS;
}
else if (((frameWidth * frameHeight) < (1280 * 720)) && MEDIA_IS_WA(waTable, WaSliceMissingMB))
else if ((frameWidth * frameHeight) >= (3840 * 2160))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_720P_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS;
}
else
{
// 60ms should be enough for decoder with resolution smaller than 8k
MediaResetParam.watchdogCountThreshold = MHW_MI_DEFAULT_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_720P_WATCHDOG_THRESHOLD_IN_MS;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,22 +324,17 @@ class Impl : public mi::Impl<Cmd>
}
else
{
if ((frameWidth * frameHeight) >= (16000 * 16000))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_16Kx16K_WATCHDOG_THRESHOLD_IN_MS;
}
else if ((frameWidth * frameHeight) >= (7680 * 4320))
if ((frameWidth * frameHeight) >= (7680 * 4320))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS;
}
else if (((frameWidth * frameHeight) < (1280 * 720)) && MEDIA_IS_WA(waTable, WaSliceMissingMB))
else if ((frameWidth * frameHeight) >= (3840 * 2160))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_720P_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS;
}
else
{
// 60ms should be enough for decoder with resolution smaller than 8k
MediaResetParam.watchdogCountThreshold = MHW_MI_DEFAULT_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_720P_WATCHDOG_THRESHOLD_IN_MS;
}
}

Expand Down

0 comments on commit ca13c09

Please sign in to comment.