[Decode] Correcting bit depth for decode basic feature
Some guilds support multple bit depth, set bit depth to the maximal one to avoid internal buffer overflow.
diff --git a/media_driver/media_driver_next/agnostic/common/codec/hal/dec/shared/features/decode_basic_feature.cpp b/media_driver/media_driver_next/agnostic/common/codec/hal/dec/shared/features/decode_basic_feature.cpp
index 120513e..42eaefc 100644
--- a/media_driver/media_driver_next/agnostic/common/codec/hal/dec/shared/features/decode_basic_feature.cpp
+++ b/media_driver/media_driver_next/agnostic/common/codec/hal/dec/shared/features/decode_basic_feature.cpp
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2018, Intel Corporation
+* Copyright (c) 2018-2021, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -72,8 +72,8 @@
m_is10Bit = (codecSettings->lumaChromaDepth & CODECHAL_LUMA_CHROMA_DEPTH_10_BITS) ? true : false;
m_chromaFormat = static_cast<HCP_CHROMA_FORMAT_IDC>(codecSettings->chromaFormat);
- m_bitDepth = (codecSettings->lumaChromaDepth & CODECHAL_LUMA_CHROMA_DEPTH_8_BITS) ?
- 8 : ((codecSettings->lumaChromaDepth & CODECHAL_LUMA_CHROMA_DEPTH_10_BITS) ? 10 : 12);
+ m_bitDepth = (codecSettings->lumaChromaDepth & CODECHAL_LUMA_CHROMA_DEPTH_12_BITS) ?
+ 12 : ((codecSettings->lumaChromaDepth & CODECHAL_LUMA_CHROMA_DEPTH_10_BITS) ? 10 : 8);
m_width = codecSettings->width;
m_height = codecSettings->height;