Commit 8df1dbd7 authored by Clément Bœsch's avatar Clément Bœsch

Merge commit '5afb94c8'

* commit '5afb94c8':
  Mark read-only tables as static
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents ea80e90e 5afb94c8
......@@ -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 :
......
......@@ -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]);
......
......@@ -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) {
......
......@@ -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;
......
......@@ -161,7 +161,7 @@ static void dump_bih(AVFormatContext *s, BITMAPINFOHEADER *bih)
static int shall_we_drop(AVFormatContext *s)
{
struct vfw_ctx *ctx = s->priv_data;
static const uint8_t dropscore[] = {62, 75, 87, 100};
static const uint8_t dropscore[4] = { 62, 75, 87, 100 };
const int ndropscores = FF_ARRAY_ELEMS(dropscore);
unsigned int buffer_fullness = (ctx->curbufsize*100)/s->max_picture_buffer;
......
......@@ -1475,7 +1475,7 @@ static int select_cur_seq_no(HLSContext *c, struct playlist *pls)
static int save_avio_options(AVFormatContext *s)
{
HLSContext *c = s->priv_data;
const char *opts[] = {
static const char *opts[] = {
"headers", "http_proxy", "user_agent", "user-agent", "cookies", NULL };
const char **opt = opts;
uint8_t *buf;
......
......@@ -4934,7 +4934,7 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum)
pkt.duration = end - pkt.dts;
if ((t = av_dict_get(c->metadata, "title", NULL, 0))) {
const char encd[12] = {
static const char encd[12] = {
0x00, 0x00, 0x00, 0x0C,
'e', 'n', 'c', 'd',
0x00, 0x00, 0x01, 0x00 };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment