[Encode] Fix HEVC VDEnc ROI regression
156433ec224f changed HEVC encode DDI and introduced regression to HEVC VDEnc ROI.
This change fixes the regression
Change-Id: Idf8de86c9b6be84a51aed22dee13d974269603c7
diff --git a/media_driver/agnostic/common/codec/hal/codechal_vdenc_hevc.cpp b/media_driver/agnostic/common/codec/hal/codechal_vdenc_hevc.cpp
index c6f6b38..4697f1d 100644
--- a/media_driver/agnostic/common/codec/hal/codechal_vdenc_hevc.cpp
+++ b/media_driver/agnostic/common/codec/hal/codechal_vdenc_hevc.cpp
@@ -656,9 +656,9 @@
//Check if the region is with in the borders
uint16_t top = (uint16_t)CodecHal_Clip3(0, (streamInHeight - 1), m_hevcPicParams->ROI[i].Top);
- uint16_t bottom = (uint16_t)CodecHal_Clip3(0, (streamInHeight - 1), m_hevcPicParams->ROI[i].Bottom) + 1;
+ uint16_t bottom = (uint16_t)CodecHal_Clip3(0, (streamInHeight - 1), m_hevcPicParams->ROI[i].Bottom);
uint16_t left = (uint16_t)CodecHal_Clip3(0, (streamInWidth - 1), m_hevcPicParams->ROI[i].Left);
- uint16_t right = (uint16_t)CodecHal_Clip3(0, (streamInWidth - 1), m_hevcPicParams->ROI[i].Right) + 1;
+ uint16_t right = (uint16_t)CodecHal_Clip3(0, (streamInWidth - 1), m_hevcPicParams->ROI[i].Right);
//Check if all the sides of ROI regions are aligned to 64CU
if ((top % 2 == 1) || (bottom % 2 == 1) || (left % 2 == 1) || (right % 2 == 1))