From 73e7c14f6ea8471eecc3d3e394e5412d521db713 Mon Sep 17 00:00:00 2001 From: Lu-Anxiao Date: Mon, 25 Dec 2023 13:28:00 +0800 Subject: [PATCH] Fix build errors on RedHat9.2 (#49) --- media_driver/agnostic/common/cm/cm_mem.h | 8 ++++---- .../agnostic/common/codec/hal/codechal_encode_sfc.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/media_driver/agnostic/common/cm/cm_mem.h b/media_driver/agnostic/common/cm/cm_mem.h index 799d70197ac..39dcbf27b45 100644 --- a/media_driver/agnostic/common/cm/cm_mem.h +++ b/media_driver/agnostic/common/cm/cm_mem.h @@ -380,7 +380,7 @@ inline void FastMemCopy_SSE2_movntdq_movdqa( CM_ASSERT( IsAligned( dst, sizeof(DQWORD) ) ); CM_ASSERT( IsAligned( src, sizeof(DQWORD) ) ); - const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / sizeof(DQWORD); + const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / (sizeof(DQWORD)); // Prefetch the src data Prefetch( (uint8_t*)src ); @@ -434,7 +434,7 @@ inline void FastMemCopy_SSE2_movdqu_movdqa( { CM_ASSERT( IsAligned( src, sizeof(DQWORD) ) ); - const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / sizeof(DQWORD); + const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / (sizeof(DQWORD)); // Prefetch the src data Prefetch( (uint8_t*)src ); @@ -488,7 +488,7 @@ inline void FastMemCopy_SSE2_movntdq_movdqu( { CM_ASSERT( IsAligned( dst, sizeof(DQWORD) ) ); - const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / sizeof(DQWORD); + const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / (sizeof(DQWORD)); // Prefetch the src data Prefetch( (uint8_t*)src ); @@ -540,7 +540,7 @@ inline void FastMemCopy_SSE2_movdqu_movdqu( const void* src, const size_t doubleQuadWords ) { - const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / sizeof(DQWORD); + const size_t doubleQuadWordsPerPrefetch = sizeof(PREFETCH) / (sizeof(DQWORD)); // Prefetch the src data Prefetch( (uint8_t*)src ); diff --git a/media_driver/agnostic/common/codec/hal/codechal_encode_sfc.cpp b/media_driver/agnostic/common/codec/hal/codechal_encode_sfc.cpp index 3abdde98eed..8b42678b189 100644 --- a/media_driver/agnostic/common/codec/hal/codechal_encode_sfc.cpp +++ b/media_driver/agnostic/common/codec/hal/codechal_encode_sfc.cpp @@ -357,7 +357,7 @@ void CodecHalEncodeSfc::GetCscMatrix( float *cscInOffset, // [out] [3x1] Input Offset matrix float *cscOutOffset) // [out] [3x1] Output Offset matrix { - float cscMatrix[12]; + float cscMatrix[12] = {}; int32_t i; GetCSCMatrix(