From e5c2f333be6eb645846a52dfadba5ba633cf10bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 27 Jan 2015 11:52:02 +0200 Subject: [PATCH] Remove the forceC parameter from DEF_MCCOPYTEST Even if there actually is no SIMD optimized version of the width==2 cases, luma function for SIMD still needs to handle it by calling McCopyWidthEq2_c for these cases. This simplifies the UT code a little, and makes sure that those codepaths are tested properly. --- test/decoder/DecUT_MotionCompensation.cpp | 20 ++++++++++---------- test/encoder/EncUT_MotionCompensation.cpp | 4 ++-- test/mc_test_common.h | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/decoder/DecUT_MotionCompensation.cpp b/test/decoder/DecUT_MotionCompensation.cpp index b517c77c..e1880a61 100644 --- a/test/decoder/DecUT_MotionCompensation.cpp +++ b/test/decoder/DecUT_MotionCompensation.cpp @@ -11,16 +11,16 @@ using namespace WelsDec; #include "mc_test_common.h" -DEF_MCCOPYTEST (, 2, 2, 1) -DEF_MCCOPYTEST (, 2, 4, 1) -DEF_MCCOPYTEST (, 4, 2, 0) -DEF_MCCOPYTEST (, 4, 4, 0) -DEF_MCCOPYTEST (, 4, 8, 0) -DEF_MCCOPYTEST (, 8, 4, 0) -DEF_MCCOPYTEST (, 8, 8, 0) -DEF_MCCOPYTEST (, 16, 8, 0) -DEF_MCCOPYTEST (, 8, 16, 0) -DEF_MCCOPYTEST (, 16, 16, 0) +DEF_MCCOPYTEST (, 2, 2) +DEF_MCCOPYTEST (, 2, 4) +DEF_MCCOPYTEST (, 4, 2) +DEF_MCCOPYTEST (, 4, 4) +DEF_MCCOPYTEST (, 4, 8) +DEF_MCCOPYTEST (, 8, 4) +DEF_MCCOPYTEST (, 8, 8) +DEF_MCCOPYTEST (, 16, 8) +DEF_MCCOPYTEST (, 8, 16) +DEF_MCCOPYTEST (, 16, 16) DEF_LUMA_MCTEST (, 4, 4) DEF_LUMA_MCTEST (, 4, 8) diff --git a/test/encoder/EncUT_MotionCompensation.cpp b/test/encoder/EncUT_MotionCompensation.cpp index a2e94ce1..2cf96ef9 100644 --- a/test/encoder/EncUT_MotionCompensation.cpp +++ b/test/encoder/EncUT_MotionCompensation.cpp @@ -20,8 +20,8 @@ static void McLumaFunc (SMcFunc* pFuncs, const uint8_t* pSrc, int32_t iSrcStride #include "mc_test_common.h" -DEF_MCCOPYTEST (Enc, 16, 8, 0) -DEF_MCCOPYTEST (Enc, 16, 16, 0) +DEF_MCCOPYTEST (Enc, 16, 8) +DEF_MCCOPYTEST (Enc, 16, 16) DEF_LUMA_MCTEST (Enc, 16, 8) DEF_LUMA_MCTEST (Enc, 16, 16) diff --git a/test/mc_test_common.h b/test/mc_test_common.h index 12c85ff8..c8297320 100644 --- a/test/mc_test_common.h +++ b/test/mc_test_common.h @@ -108,7 +108,7 @@ static void MCChromaAnchor (uint8_t* pDstU, uint8_t* pDstV, int32_t iDstStride, } /**********************MC Unit Test OPENH264 Code Begin******************************/ -#define DEF_MCCOPYTEST(pfx, iW,iH, forceC) \ +#define DEF_MCCOPYTEST(pfx, iW,iH) \ TEST(pfx##McCopy_c,iW##x##iH) \ { \ SMcFunc sMcFunc; \ @@ -116,7 +116,7 @@ TEST(pfx##McCopy_c,iW##x##iH) \ uint32_t uiCpuFlag;\ for(int32_t k =0; k<2; k++)\ {\ - if(k==0||forceC!=0)\ + if(k==0)\ {\ uiCpuFlag = 0;\ }else \