Move Neon implementations of DCT functions into the X265_NS namespace, and remove the static modifier from their declarations, so that they can be referenced from external code when linking to libx265. --- source/common/aarch64/dct-prim.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/source/common/aarch64/dct-prim.cpp b/source/common/aarch64/dct-prim.cpp index acc50d4f4..522210689 100644 --- a/source/common/aarch64/dct-prim.cpp +++ b/source/common/aarch64/dct-prim.cpp @@ -812,7 +812,12 @@ X265_PRAGMA_UNROLL(8) } -static void dct8_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) +} + +namespace X265_NS +{ +// x265 private namespace +void dct8_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) { const int shift_1st = 2 + X265_DEPTH - 8; const int shift_2nd = 9; @@ -829,7 +834,7 @@ static void dct8_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) partialButterfly8(coef, dst, shift_2nd, 8); } -static void dct16_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) +void dct16_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) { const int shift_1st = 3 + X265_DEPTH - 8; const int shift_2nd = 10; @@ -846,7 +851,7 @@ static void dct16_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) partialButterfly16(coef, dst, shift_2nd, 16); } -static void dct32_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) +void dct32_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) { const int shift_1st = 4 + X265_DEPTH - 8; const int shift_2nd = 11; @@ -863,7 +868,7 @@ static void dct32_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) partialButterfly32(coef, dst, shift_2nd, 32); } -static void idct4_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) +void idct4_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) { const int shift_1st = 7; const int shift_2nd = 12 - (X265_DEPTH - 8); @@ -880,7 +885,7 @@ static void idct4_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) } } -static void idct16_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) +void idct16_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) { const int shift_1st = 7; const int shift_2nd = 12 - (X265_DEPTH - 8); @@ -897,7 +902,7 @@ static void idct16_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) } } -static void idct32_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) +void idct32_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) { const int shift_1st = 7; const int shift_2nd = 12 - (X265_DEPTH - 8); @@ -914,13 +919,6 @@ static void idct32_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) } } - - -} - -namespace X265_NS -{ -// x265 private namespace void setupDCTPrimitives_neon(EncoderPrimitives &p) { p.cu[BLOCK_4x4].nonPsyRdoQuant = nonPsyRdoQuant_neon<2>; -- 2.42.1
>From f0bef97eb734f3a27a239d8bb9f822ffc1d9e7de Mon Sep 17 00:00:00 2001 Message-ID: <f0bef97eb734f3a27a239d8bb9f822ffc1d9e7de.1724337987.git.hari.lim...@arm.com> In-Reply-To: <cover.1724337987.git.hari.lim...@arm.com> References: <cover.1724337987.git.hari.lim...@arm.com> From: Hari Limaye <hari.lim...@arm.com> Date: Tue, 13 Feb 2024 23:20:59 +0000 Subject: [PATCH 2/9] AArch64: Move Neon DCT implementations into X265_NS Move Neon implementations of DCT functions into the X265_NS namespace, and remove the static modifier from their declarations, so that they can be referenced from external code when linking to libx265. --- source/common/aarch64/dct-prim.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/source/common/aarch64/dct-prim.cpp b/source/common/aarch64/dct-prim.cpp index acc50d4f4..522210689 100644 --- a/source/common/aarch64/dct-prim.cpp +++ b/source/common/aarch64/dct-prim.cpp @@ -812,7 +812,12 @@ X265_PRAGMA_UNROLL(8) } -static void dct8_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) +} + +namespace X265_NS +{ +// x265 private namespace +void dct8_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) { const int shift_1st = 2 + X265_DEPTH - 8; const int shift_2nd = 9; @@ -829,7 +834,7 @@ static void dct8_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) partialButterfly8(coef, dst, shift_2nd, 8); } -static void dct16_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) +void dct16_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) { const int shift_1st = 3 + X265_DEPTH - 8; const int shift_2nd = 10; @@ -846,7 +851,7 @@ static void dct16_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) partialButterfly16(coef, dst, shift_2nd, 16); } -static void dct32_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) +void dct32_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) { const int shift_1st = 4 + X265_DEPTH - 8; const int shift_2nd = 11; @@ -863,7 +868,7 @@ static void dct32_neon(const int16_t *src, int16_t *dst, intptr_t srcStride) partialButterfly32(coef, dst, shift_2nd, 32); } -static void idct4_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) +void idct4_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) { const int shift_1st = 7; const int shift_2nd = 12 - (X265_DEPTH - 8); @@ -880,7 +885,7 @@ static void idct4_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) } } -static void idct16_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) +void idct16_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) { const int shift_1st = 7; const int shift_2nd = 12 - (X265_DEPTH - 8); @@ -897,7 +902,7 @@ static void idct16_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) } } -static void idct32_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) +void idct32_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) { const int shift_1st = 7; const int shift_2nd = 12 - (X265_DEPTH - 8); @@ -914,13 +919,6 @@ static void idct32_neon(const int16_t *src, int16_t *dst, intptr_t dstStride) } } - - -} - -namespace X265_NS -{ -// x265 private namespace void setupDCTPrimitives_neon(EncoderPrimitives &p) { p.cu[BLOCK_4x4].nonPsyRdoQuant = nonPsyRdoQuant_neon<2>; -- 2.42.1
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel