History

Move the MC routines to the common library

Use the decoder versions of the functions (which are capable of handling widths 4/8/16 for luma, not only 16 as in the encoder). By using the more generic versions, there may be a small performance loss since the functions need to check the width in every call. Actual measurements show that the actual change is very small (and the shared routines turn out to actually be faster than the existing ones in ARM NEON setups).

Martin Storsjö committed 11 years ago

Commit 9a066361 parent 1a7d0ab18 files · +176 −1082Browse files

Showing the changes to test/encoder/EncUT_MotionCompensation.cpp (1 of 18 files). Show all

Unified · Split

test/encoder/EncUT_MotionCompensation.cpp+4−5
@@ -1,10 +1,9 @@
11 #include <gtest/gtest.h>
22 #include "codec_def.h"
3+#include "macros.h"
34 #include "mc.h"
45 #include "cpu.h"
5−using namespace WelsEnc;
6−
7−#define InitMcFunc WelsInitMcFuncs
6+using namespace WelsCommon;
87
98 #include "mc_test_common.h"
109
@@ -27,7 +26,7 @@ TEST (EncMcAvg, PixelAvg) { · 16 unmodified lines
2726 int32_t width = 8 << w;
2827 int32_t height = 16;
2928 uint32_t uiCpuFlag = k == 0 ? 0 : WelsCPUFeatureDetect (NULL);
30− WelsInitMcFuncs (&sMcFunc, uiCpuFlag);
29+ InitMcFunc (&sMcFunc, uiCpuFlag);
3130 uint8_t uSrc1[MC_BUFF_HEIGHT][MC_BUFF_SRC_STRIDE];
3231 uint8_t uSrc2[MC_BUFF_HEIGHT][MC_BUFF_SRC_STRIDE];
3332 ENFORCE_STACK_ALIGN_2D (uint8_t, uDstAnchor, MC_BUFF_HEIGHT, MC_BUFF_DST_STRIDE, 16);
@@ -76,7 +75,7 @@ TEST (EncMcHalfpel, LumaHalfpel) { · 42 unmodified lines
7675 }
7776
7877 uint32_t uiCpuFlag = k == 0 ? 0 : WelsCPUFeatureDetect (NULL);
79− WelsInitMcFuncs (&sMcFunc, uiCpuFlag);
78+ InitMcFunc (&sMcFunc, uiCpuFlag);
8079
8180 MCHalfPelFilterAnchor (uAnchors[1], uAnchors[2], uAnchors[3], uAnchors[0], MC_BUFF_SRC_STRIDE, width, height, pBuf + 4);
8281 sMcFunc.pfLumaHalfpelHor (&uSrcTest[4][4], MC_BUFF_SRC_STRIDE, uDstTest[0], MC_BUFF_DST_STRIDE, width + 1, height);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t