diff options
author | Clément Bœsch <u@pkh.me> | 2016-06-21 22:09:35 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-06-21 22:09:35 +0200 |
commit | 8df1dbd7980a6b09c0b6f43299a49e56d19bd1ca (patch) | |
tree | c19d08d53e0243fec0e083c1522bfee93f969fda /libavcodec | |
parent | ea80e90e134c8325add9e11eb07a52b0af815deb (diff) | |
parent | 5afb94c817abffad030c6b94d7003dca8aace3d5 (diff) | |
download | ffmpeg-8df1dbd7980a6b09c0b6f43299a49e56d19bd1ca.tar.gz |
Merge commit '5afb94c817abffad030c6b94d7003dca8aace3d5'
* commit '5afb94c817abffad030c6b94d7003dca8aace3d5':
Mark read-only tables as static
Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/hevc_cabac.c | 2 | ||||
-rw-r--r-- | libavcodec/opus_silk.c | 6 | ||||
-rw-r--r-- | libavcodec/texturedspenc.c | 6 | ||||
-rw-r--r-- | libavcodec/vp8.c | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c index d1bef8320f..05b2821840 100644 --- a/libavcodec/hevc_cabac.c +++ b/libavcodec/hevc_cabac.c @@ -1039,7 +1039,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, int trafo_size = 1 << log2_trafo_size; int i; int qp,shift,add,scale,scale_m; - const uint8_t level_scale[] = { 40, 45, 51, 57, 64, 72 }; + static const uint8_t level_scale[] = { 40, 45, 51, 57, 64, 72 }; const uint8_t *scale_matrix = NULL; uint8_t dc_scale; int pred_mode_intra = (c_idx == 0) ? lc->tu.intra_pred_mode : diff --git a/libavcodec/opus_silk.c b/libavcodec/opus_silk.c index 73526f9800..9c30b122dc 100644 --- a/libavcodec/opus_silk.c +++ b/libavcodec/opus_silk.c @@ -1323,7 +1323,7 @@ static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc, if (lag_absolute) { /* primary lag is coded absolute */ int highbits, lowbits; - const uint16_t *model[] = { + static const uint16_t *model[] = { silk_model_pitch_lowbits_nb, silk_model_pitch_lowbits_mb, silk_model_pitch_lowbits_wb }; @@ -1357,11 +1357,11 @@ static void silk_decode_frame(SilkContext *s, OpusRangeCoder *rc, ltpfilter = opus_rc_getsymbol(rc, silk_model_ltp_filter); for (i = 0; i < s->subframes; i++) { int index, j; - const uint16_t *filter_sel[] = { + static const uint16_t *filter_sel[] = { silk_model_ltp_filter0_sel, silk_model_ltp_filter1_sel, silk_model_ltp_filter2_sel }; - const int8_t (*filter_taps[])[5] = { + static const int8_t (*filter_taps[])[5] = { silk_ltp_filter0_taps, silk_ltp_filter1_taps, silk_ltp_filter2_taps }; index = opus_rc_getsymbol(rc, filter_sel[ltpfilter]); diff --git a/libavcodec/texturedspenc.c b/libavcodec/texturedspenc.c index 36506a6b55..8b2863033b 100644 --- a/libavcodec/texturedspenc.c +++ b/libavcodec/texturedspenc.c @@ -181,7 +181,7 @@ static unsigned int match_colors(const uint8_t *block, ptrdiff_t stride, int x, y, k = 0; int c0_point, half_point, c3_point; uint8_t color[16]; - const int indexMap[8] = { + static const int indexMap[8] = { 0 << 30, 2 << 30, 0 << 30, 2 << 30, 3 << 30, 3 << 30, 1 << 30, 1 << 30, }; @@ -359,8 +359,8 @@ static int refine_colors(const uint8_t *block, ptrdiff_t stride, /* Additional magic to save a lot of multiplies in the accumulating loop. * The tables contain precomputed products of weights for least squares * system, accumulated inside one 32-bit register */ - const int w1tab[4] = { 3, 0, 2, 1 }; - const int prods[4] = { 0x090000, 0x000900, 0x040102, 0x010402 }; + static const int w1tab[4] = { 3, 0, 2, 1 }; + static const int prods[4] = { 0x090000, 0x000900, 0x040102, 0x010402 }; /* Check if all pixels have the same index */ if ((mask ^ (mask << 2)) < 4) { diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index e60705a187..c1c3eb7072 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1163,10 +1163,10 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_t *segment, uint8_t *ref, int layout, int is_vp7) { VP56RangeCoder *c = &s->c; - const char *vp7_feature_name[] = { "q-index", - "lf-delta", - "partial-golden-update", - "blit-pitch" }; + static const char *vp7_feature_name[] = { "q-index", + "lf-delta", + "partial-golden-update", + "blit-pitch" }; if (is_vp7) { int i; *segment = 0; |