Skip to content

Commit

Permalink
[Encode] Refining Codechal mode for future usage.
Browse files Browse the repository at this point in the history
Expand the Codechal mode for future usage.
  • Loading branch information
StevenLi01 authored and intel-mediadev committed Dec 8, 2023
1 parent fd9f714 commit 8995b40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions media_common/agnostic/common/codec/shared/codec_def_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ enum REFLIST
//!
enum CODECHAL_MODE
{
CODECHAL_DECODE_MODE_BEGIN = 0,
CODECHAL_DECODE_MODE_MPEG2IDCT = 0,
CODECHAL_DECODE_MODE_MPEG2VLD = 1,
CODECHAL_DECODE_MODE_VC1IT = 2,
Expand All @@ -185,22 +186,21 @@ enum CODECHAL_MODE
CODECHAL_DECODE_MODE_VP9VLD = 12,
CODECHAL_DECODE_MODE_CENC = 13, // Only for getting HuC-based DRM command size. Not an actual mode.
CODECHAL_DECODE_MODE_RESERVED0 = 14,
CODECHAL_NUM_DECODE_MODES = 15,

CODECHAL_ENCODE_MODE_AVC = 16, // Must be a power of 2 to match perf report expectations
CODECHAL_ENCODE_MODE_MPEG2 = 18,
CODECHAL_ENCODE_MODE_VP8 = 19,
CODECHAL_ENCODE_MODE_JPEG = 20,
CODECHAL_ENCODE_MODE_HEVC = 22,
CODECHAL_ENCODE_MODE_VP9 = 23,
CODECHAL_ENCODE_MODE_AV1 = 24,
CODECHAL_NUM_ENCODE_MODES = 8,

CODECHAL_Rsvd = 25,
CODECHAL_NUM_MODES = 26, // Use the value for the last encode mode to determine this
CODECHAL_UNSUPPORTED_MODE = 26,
CODECHAL_MODE_MAX = 26
CODECHAL_DECODE_MODE_END = 15,

CODECHAL_ENCODE_MODE_BEGIN = 32,
CODECHAL_ENCODE_MODE_AVC = 32, // Must be a power of 2 to match perf report expectations
CODECHAL_ENCODE_MODE_MPEG2 = 34,
CODECHAL_ENCODE_MODE_VP8 = 35,
CODECHAL_ENCODE_MODE_JPEG = 36,
CODECHAL_ENCODE_MODE_HEVC = 38,
CODECHAL_ENCODE_MODE_VP9 = 39,
CODECHAL_ENCODE_MODE_AV1 = 40,
CODECHAL_ENCODE_MODE_END = 41,

CODECHAL_Rsvd = 64,

CODECHAL_UNSUPPORTED_MODE = 96
};

// Slice group mask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ struct CodechalTileInfo
// The current definition of the first encode mode CODECHAL_ENCODE_MODE_AVC should be used
// as a base for subsequent encode modes
#define CODECHAL_ENCODE_MODE_BIT_OFFSET ((uint32_t)(log((double)CODECHAL_ENCODE_MODE_AVC)/log(2.)))
#define CODECHAL_ENCODE_MODE_BIT_MASK (( 1L << CODECHAL_ENCODE_MODE_BIT_OFFSET) - 1 )
#define CODECHAL_ENCODE_MODE_BIT_MASK ((( 1L << CODECHAL_ENCODE_MODE_BIT_OFFSET) - 1 ) & 0xF)

template<typename ValueType>
static ValueType SwapEndianness(ValueType value)
Expand Down

0 comments on commit 8995b40

Please sign in to comment.