Skip to content

Commit

Permalink
[Decode] Decode XE3+ platform media reset threshold update
Browse files Browse the repository at this point in the history
* [Decode] Decode XE3+ platform media reset threshold update

Update decode media reset threshold on XE3+ platforms
  • Loading branch information
haichund1 authored and intel-mediadev committed Dec 25, 2024
1 parent 5921165 commit fbcdaff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
6 changes: 5 additions & 1 deletion media_common/agnostic/common/hw/mhw_mi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2021, Intel Corporation
* Copyright (c) 2015-2024, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -50,6 +50,10 @@ class MhwCpInterface;
#define MHW_MI_DECODER_AV1_WATCHDOG_THRESHOLD_IN_MS 80
#define MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS 180
#define MHW_MI_DECODER_16Kx16K_WATCHDOG_THRESHOLD_IN_MS 256
#define MHW_MI_DECODER_FHD_WATCHDOG_THRESHOLD_IN_MS_PLUS 30
#define MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS_PLUS 60
#define MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS_PLUS 120
#define MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS_PLUS 200
#define MHW_MI_WATCHDOG_COUNTS_PER_MILLISECOND (19200123 / 1000) // Time stamp counts per millisecond

typedef enum _MHW_COMMON_MI_ADDRESS_SHIFT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Intel Corporation
* Copyright (c) 2022-2024, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -233,24 +233,21 @@ class Impl : public mi::Impl<Cmd>
}
else
{
if ((frameWidth * frameHeight) >= (7680 * 4320))
if ((frameWidth * frameHeight) > (7680 * 4320))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_16K_WATCHDOG_THRESHOLD_IN_MS_PLUS;
}
else if ((frameWidth * frameHeight) >= (3840 * 2160))
else if ((frameWidth * frameHeight) > (3840 * 2160))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_8K_WATCHDOG_THRESHOLD_IN_MS_PLUS;
}
else
else if ((frameWidth * frameHeight) > (1920 * 1080))
{
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_720P_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_4K_WATCHDOG_THRESHOLD_IN_MS_PLUS;
}

if ((CODECHAL_STANDARD)codecMode == CODECHAL_AV1)
else
{
// This is temporary solution to address the inappropriate threshold setting for high bit-rate AV1 decode.
// The final solution will incorporate bitstream size, increasing the setting when the bit-rate is high.
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_AV1_WATCHDOG_THRESHOLD_IN_MS;
MediaResetParam.watchdogCountThreshold = MHW_MI_DECODER_FHD_WATCHDOG_THRESHOLD_IN_MS_PLUS;
}
}

Expand Down

0 comments on commit fbcdaff

Please sign in to comment.