diff mbox

[FFmpeg-devel] lavc/mips: Add missing const qualifiers

Message ID 201705011034.23564.cehoyos@ag.or.at
State Accepted
Commit a88b0b0ba7b4ddae9a51d1e9f7ff83654f60807a
Headers show

Commit Message

Carl Eugen Hoyos May 1, 2017, 8:34 a.m. UTC
Hi!

Attached patch fixes many warnings when compiling for mips.

Please comment, Carl Eugen
From a7d2e32806adef148496454b23b5f8fe12cbf396 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Mon, 1 May 2017 10:31:35 +0200
Subject: [PATCH] lavc/mips/hevc_idct_msa: Add missing const qualifier.

Fixes many warnings:
initialization discards 'const' qualifier from pointer target type
---
 libavcodec/mips/hevc_idct_msa.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Michael Niedermayer May 1, 2017, 1:10 p.m. UTC | #1
On Mon, May 01, 2017 at 10:34:23AM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes many warnings when compiling for mips.
> 
> Please comment, Carl Eugen

LGTM, untested though

thx

[...]
Carl Eugen Hoyos May 1, 2017, 9:46 p.m. UTC | #2
2017-05-01 15:10 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> On Mon, May 01, 2017 at 10:34:23AM +0200, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes many warnings when compiling for mips.
>>
>> Please comment, Carl Eugen
>
> LGTM, untested though

Patch applied (tested with Android NDK).

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavcodec/mips/hevc_idct_msa.c b/libavcodec/mips/hevc_idct_msa.c
index 975d91f..d483707 100644
--- a/libavcodec/mips/hevc_idct_msa.c
+++ b/libavcodec/mips/hevc_idct_msa.c
@@ -330,7 +330,7 @@  static void hevc_idct_4x4_msa(int16_t *coeffs)
 
 static void hevc_idct_8x8_msa(int16_t *coeffs)
 {
-    int16_t *filter = &gt8x8_cnst[0];
+    const int16_t *filter = &gt8x8_cnst[0];
     v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
 
     LD_SH8(coeffs, 8, in0, in1, in2, in3, in4, in5, in6, in7);
@@ -349,7 +349,7 @@  static void hevc_idct_16x16_msa(int16_t *coeffs)
     int16_t buf[256];
     int16_t *buf_ptr = &buf[0];
     int16_t *src = coeffs;
-    int16_t *filter = &gt16x16_cnst[0];
+    const int16_t *filter = &gt16x16_cnst[0];
     v8i16 in0, in1, in2, in3, in4, in5, in6, in7;
     v8i16 in8, in9, in10, in11, in12, in13, in14, in15;
     v8i16 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
@@ -429,10 +429,10 @@  static void hevc_idct_8x32_column_msa(int16_t *coeffs, uint8_t buf_pitch,
                                       uint8_t round)
 {
     uint8_t i;
-    int16_t *filter_ptr0 = &gt32x32_cnst0[0];
-    int16_t *filter_ptr1 = &gt32x32_cnst1[0];
-    int16_t *filter_ptr2 = &gt32x32_cnst2[0];
-    int16_t *filter_ptr3 = &gt32x32_cnst3[0];
+    const int16_t *filter_ptr0 = &gt32x32_cnst0[0];
+    const int16_t *filter_ptr1 = &gt32x32_cnst1[0];
+    const int16_t *filter_ptr2 = &gt32x32_cnst2[0];
+    const int16_t *filter_ptr3 = &gt32x32_cnst3[0];
     int16_t *src0 = (coeffs + buf_pitch);
     int16_t *src1 = (coeffs + 2 * buf_pitch);
     int16_t *src2 = (coeffs + 4 * buf_pitch);