From 08fd35b0843899885c3025ffd45c00f5a8d3438e Mon Sep 17 00:00:00 2001 From: "Chen, Bohan" Date: Wed, 5 Jun 2024 10:15:25 +0800 Subject: [PATCH] [Encode] Av1 Linux exception with llvm/clang --- _studio/mfx_lib/shared/include/mfx_utils_extbuf.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/_studio/mfx_lib/shared/include/mfx_utils_extbuf.h b/_studio/mfx_lib/shared/include/mfx_utils_extbuf.h index 5c8260bf86..7909af473e 100644 --- a/_studio/mfx_lib/shared/include/mfx_utils_extbuf.h +++ b/_studio/mfx_lib/shared/include/mfx_utils_extbuf.h @@ -30,7 +30,8 @@ #ifdef MFX_ENABLE_ENCTOOLS_BASE #include "mfxenctools-int.h" #endif - +#include +#include "mfxav1.h" #ifdef MFX_ENABLE_ENCODE_STATS #include "mfxencodestats.h" @@ -55,10 +56,20 @@ namespace MfxExtBuffer inline mfxU32 IdToSize(mfxU32 Id) { + std::cout << sizeof(IdSizePairs) / sizeof(IdSizePairs[0]) << std::endl; + for(int i = 0; i < sizeof(IdSizePairs) / sizeof(IdSizePairs[0]); i++) + { + std::cout << IdSizePairs[i][0] << std::endl; + } + std::cout << Id << std::endl; + auto IsIdEq = [Id](const mfxU32 (&p)[2]) { return p[0] == Id; }; auto pIt = std::find_if(std::begin(IdSizePairs), std::end(IdSizePairs), IsIdEq); if (pIt == std::end(IdSizePairs)) - throw std::logic_error("unknown ext. buffer Id"); + throw std::logic_error("unknown ext. buffer Id: " + std::to_string(Id)); + else + std::cout << pIt[0][0] << std::endl; + return pIt[0][1]; }