SIMD: Add const qualifier where appropriate
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 19 Feb 2017 08:45:54 +0000 (19:45 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sun, 19 Feb 2017 08:49:59 +0000 (19:49 +1100)
Patch-from: lvqcl <lvqcl.mail@gmail.com>

src/libFLAC/lpc_intrin_avx2.c
src/libFLAC/lpc_intrin_sse2.c
src/libFLAC/lpc_intrin_sse41.c

index 01de4fb..b68511e 100644 (file)
@@ -52,7 +52,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_16_intrin_avx2(const FLAC_
 {
        int i;
        FLAC__int32 sum;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
 
        FLAC__ASSERT(order > 0);
        FLAC__ASSERT(order <= 32);
@@ -407,7 +407,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_intrin_avx2(const FLAC__in
 {
        int i;
        FLAC__int32 sum;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
 
        FLAC__ASSERT(order > 0);
        FLAC__ASSERT(order <= 32);
@@ -764,8 +764,8 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_wide_intrin_avx2(const FLA
 {
        int i;
        FLAC__int64 sum;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
-       __m256i pack = _mm256_loadu_si256((const __m256i *)pack_arr);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m256i pack = _mm256_loadu_si256((const __m256i *)pack_arr);
 
        FLAC__ASSERT(order > 0);
        FLAC__ASSERT(order <= 32);
index e8f88dc..cb97b9d 100644 (file)
@@ -55,7 +55,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_16_intrin_sse2(const FLAC_
 {
        int i;
        FLAC__int32 sum;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
 
        FLAC__ASSERT(order > 0);
        FLAC__ASSERT(order <= 32);
index f873e39..9193027 100644 (file)
@@ -56,7 +56,7 @@ FLAC__SSE_TARGET("sse4.1")
 void FLAC__lpc_compute_residual_from_qlp_coefficients_wide_intrin_sse41(const FLAC__int32 *data, uint32_t data_len, const FLAC__int32 qlp_coeff[], uint32_t order, int lp_quantization, FLAC__int32 residual[])
 {
        int i;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
 
        FLAC__ASSERT(order > 0);
        FLAC__ASSERT(order <= 32);
@@ -592,7 +592,7 @@ FLAC__SSE_TARGET("sse4.1")
 void FLAC__lpc_restore_signal_wide_intrin_sse41(const FLAC__int32 residual[], uint32_t data_len, const FLAC__int32 qlp_coeff[], uint32_t order, int lp_quantization, FLAC__int32 data[])
 {
        int i;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
 
        if (!data_len)
                return;
@@ -924,7 +924,7 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients_intrin_sse41(const FLAC__i
 {
        int i;
        FLAC__int32 sum;
-       __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
+       const __m128i cnt = _mm_cvtsi32_si128(lp_quantization);
 
        FLAC__ASSERT(order > 0);
        FLAC__ASSERT(order <= 32);