Skip to content

Commit 89c7d8f

Browse files
committed
arm: Rename RdCostARM.h => RdCost_neon.cpp and simplify
This file is currently templated over `ARM_VEXT`, however in practice this can only be set to `NEON`, and a future SVE implementation would need other changes. In preparation for future changes to this file, simplify it to match the others in the `neon/` directory by moving the content to the `.cpp` file and removing the unused `ARM_VEXT` templating. There is no need for these functions to be members of the `RdCost` class, so remove that, however this means that the x86 implementations of these kernels need to become public members of the class until we can remove the dependency on them from the Neon kernels.
1 parent 2474b2b commit 89c7d8f

File tree

3 files changed

+1399
-1467
lines changed

3 files changed

+1399
-1467
lines changed

source/Lib/CommonLib/RdCost.h

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ class RdCost
148148
virtual ~RdCost();
149149

150150
void create( bool enableOpt = true );
151+
151152
#if defined(TARGET_SIMD_X86) && ENABLE_SIMD_OPT_DIST
152153
void initRdCostX86();
153154
template <X86_VEXT vext>
154155
void _initRdCostX86();
155156
#endif
156157

157158
#if defined(TARGET_SIMD_ARM) && ENABLE_SIMD_OPT_DIST
158-
159159
void initRdCostARM();
160160
template<ARM_VEXT vext>
161161
void _initRdCostARM();
@@ -221,8 +221,7 @@ class RdCost
221221
static Distortion xGetSAD8 ( const DistParam& pcDtParam );
222222
static Distortion xGetSAD16 ( const DistParam& pcDtParam ); // needs to be public for xGetSAD_MxN_SIMD ( NOTE: they are all public in vvenc )
223223
static void xGetSAD16X5 ( const DistParam& pcDtParam, Distortion* cost, bool isCalCentrePos ); // needs to be public for xGetSADX5_16xN_SIMD ( NOTE: they are all public in vvenc )
224-
225-
private:
224+
226225
Distortion xGetSSE_WTD ( const DistParam& pcDtParam ) const;
227226

228227
static Distortion xGetSSE ( const DistParam& pcDtParam );
@@ -274,26 +273,7 @@ class RdCost
274273
static Distortion xGetSADwMask_SIMD( const DistParam &pcDtParam );
275274
#endif
276275

277-
#if defined(TARGET_SIMD_ARM) && ENABLE_SIMD_OPT_DIST
278-
279-
template <ARM_VEXT vext>
280-
static void xGetSADX5_16xN_SIMD_ARM ( const DistParam& rcDtParam, Distortion* cost, bool isCalCentrePos );
281-
282-
template <ARM_VEXT vext>
283-
static Distortion xGetHAD2SADs_ARMSIMD( const DistParam &rcDtParam );
284-
285-
template <ARM_VEXT vext, bool fastHad>
286-
static Distortion xGetHADs_ARMSIMD ( const DistParam& pcDtParam );
287-
288-
template<ARM_VEXT vext>
289-
static Distortion xGetSADwMask_ARMSIMD(const DistParam &rcDtParam);
290-
291-
template< int iWidth, ARM_VEXT vext >
292-
static Distortion xGetSAD_NxN_ARMSIMD( const DistParam &rcDtParam );
293-
#endif
294-
295276
unsigned int getBitsMultiplePredsIBC(int x, int y, bool useIMV);
296-
public:
297277

298278
Distortion getDistPart( const CPelBuf& org, const CPelBuf& cur, int bitDepth, const ComponentID compId, DFunc eDFunc, const CPelBuf* orgLuma = NULL );
299279

0 commit comments

Comments
 (0)