[FFmpeg-devel] [PATCH] avcodec/mips: Add 'const' to static arrays in HEVC MSA code
shivraj.patil at imgtec.com
shivraj.patil at imgtec.com
Thu Jun 11 10:37:50 CEST 2015
From: Shivraj Patil <shivraj.patil at imgtec.com>
Signed-off-by: Shivraj Patil <shivraj.patil at imgtec.com>
---
libavcodec/mips/hevc_idct_msa.c | 12 ++++++------
libavcodec/mips/hevc_mc_uni_msa.c | 2 +-
libavcodec/mips/hevcpred_msa.c | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/libavcodec/mips/hevc_idct_msa.c b/libavcodec/mips/hevc_idct_msa.c
index b5a4c5a..975d91f 100644
--- a/libavcodec/mips/hevc_idct_msa.c
+++ b/libavcodec/mips/hevc_idct_msa.c
@@ -21,18 +21,18 @@
#include "libavutil/mips/generic_macros_msa.h"
#include "libavcodec/mips/hevcdsp_mips.h"
-static int16_t gt8x8_cnst[16] = {
+static const int16_t gt8x8_cnst[16] = {
64, 64, 83, 36, 89, 50, 18, 75, 64, -64, 36, -83, 75, -89, -50, -18
};
-static int16_t gt16x16_cnst[64] = {
+static const int16_t gt16x16_cnst[64] = {
64, 83, 64, 36, 89, 75, 50, 18, 90, 80, 57, 25, 70, 87, 9, 43,
64, 36, -64, -83, 75, -18, -89, -50, 87, 9, -80, -70, -43, 57, -25, -90,
64, -36, -64, 83, 50, -89, 18, 75, 80, -70, -25, 90, -87, 9, 43, 57,
64, -83, 64, -36, 18, -50, 75, -89, 70, -87, 90, -80, 9, -43, -57, 25
};
-static int16_t gt32x32_cnst0[256] = {
+static const int16_t gt32x32_cnst0[256] = {
90, 90, 88, 85, 82, 78, 73, 67, 61, 54, 46, 38, 31, 22, 13, 4,
90, 82, 67, 46, 22, -4, -31, -54, -73, -85, -90, -88, -78, -61, -38, -13,
88, 67, 31, -13, -54, -82, -90, -78, -46, -4, 38, 73, 90, 85, 61, 22,
@@ -51,18 +51,18 @@ static int16_t gt32x32_cnst0[256] = {
4, -13, 22, -31, 38, -46, 54, -61, 67, -73, 78, -82, 85, -88, 90, -90
};
-static int16_t gt32x32_cnst1[64] = {
+static const int16_t gt32x32_cnst1[64] = {
90, 87, 80, 70, 57, 43, 25, 9, 87, 57, 9, -43, -80, -90, -70, -25,
80, 9, -70, -87, -25, 57, 90, 43, 70, -43, -87, 9, 90, 25, -80, -57,
57, -80, -25, 90, -9, -87, 43, 70, 43, -90, 57, 25, -87, 70, 9, -80,
25, -70, 90, -80, 43, 9, -57, 87, 9, -25, 43, -57, 70, -80, 87, -90
};
-static int16_t gt32x32_cnst2[16] = {
+static const int16_t gt32x32_cnst2[16] = {
89, 75, 50, 18, 75, -18, -89, -50, 50, -89, 18, 75, 18, -50, 75, -89
};
-static int16_t gt32x32_cnst3[16] = {
+static const int16_t gt32x32_cnst3[16] = {
64, 64, 64, 64, 83, 36, -36, -83, 64, -64, -64, 64, 36, -83, 83, -36
};
diff --git a/libavcodec/mips/hevc_mc_uni_msa.c b/libavcodec/mips/hevc_mc_uni_msa.c
index 7d02ce8..61a67c9 100644
--- a/libavcodec/mips/hevc_mc_uni_msa.c
+++ b/libavcodec/mips/hevc_mc_uni_msa.c
@@ -249,7 +249,7 @@ static void copy_width64_msa(uint8_t *src, int32_t src_stride,
copy_16multx8mult_msa(src, src_stride, dst, dst_stride, height, 64);
}
-uint8_t mc_filt_mask_arr[16 * 3] = {
+static const uint8_t mc_filt_mask_arr[16 * 3] = {
/* 8 width cases */
0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
/* 4 width cases */
diff --git a/libavcodec/mips/hevcpred_msa.c b/libavcodec/mips/hevcpred_msa.c
index 8a8aa96..5d9299f 100644
--- a/libavcodec/mips/hevcpred_msa.c
+++ b/libavcodec/mips/hevcpred_msa.c
@@ -22,11 +22,11 @@
#include "libavutil/mips/generic_macros_msa.h"
#include "hevcpred_mips.h"
-static int8_t intra_pred_angle_up[17] = {
+static const int8_t intra_pred_angle_up[17] = {
-32, -26, -21, -17, -13, -9, -5, -2, 0, 2, 5, 9, 13, 17, 21, 26, 32
};
-static int8_t intra_pred_angle_low[16] = {
+static const int8_t intra_pred_angle_low[16] = {
32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26
};
--
2.3.7
More information about the ffmpeg-devel
mailing list