* commit '5afb94c817abffad030c6b94d7003dca8aace3d5': Mark read-only tables as static Merged-by: Clément Bœsch <u@pkh.me>tags/n3.1
| @@ -1039,7 +1039,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, | |||||
| int trafo_size = 1 << log2_trafo_size; | int trafo_size = 1 << log2_trafo_size; | ||||
| int i; | int i; | ||||
| int qp,shift,add,scale,scale_m; | 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; | const uint8_t *scale_matrix = NULL; | ||||
| uint8_t dc_scale; | uint8_t dc_scale; | ||||
| int pred_mode_intra = (c_idx == 0) ? lc->tu.intra_pred_mode : | 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) { | if (lag_absolute) { | ||||
| /* primary lag is coded absolute */ | /* primary lag is coded absolute */ | ||||
| int highbits, lowbits; | 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_nb, silk_model_pitch_lowbits_mb, | ||||
| silk_model_pitch_lowbits_wb | 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); | ltpfilter = opus_rc_getsymbol(rc, silk_model_ltp_filter); | ||||
| for (i = 0; i < s->subframes; i++) { | for (i = 0; i < s->subframes; i++) { | ||||
| int index, j; | 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_filter0_sel, silk_model_ltp_filter1_sel, | ||||
| silk_model_ltp_filter2_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 | silk_ltp_filter0_taps, silk_ltp_filter1_taps, silk_ltp_filter2_taps | ||||
| }; | }; | ||||
| index = opus_rc_getsymbol(rc, filter_sel[ltpfilter]); | 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 x, y, k = 0; | ||||
| int c0_point, half_point, c3_point; | int c0_point, half_point, c3_point; | ||||
| uint8_t color[16]; | uint8_t color[16]; | ||||
| const int indexMap[8] = { | |||||
| static const int indexMap[8] = { | |||||
| 0 << 30, 2 << 30, 0 << 30, 2 << 30, | 0 << 30, 2 << 30, 0 << 30, 2 << 30, | ||||
| 3 << 30, 3 << 30, 1 << 30, 1 << 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. | /* Additional magic to save a lot of multiplies in the accumulating loop. | ||||
| * The tables contain precomputed products of weights for least squares | * The tables contain precomputed products of weights for least squares | ||||
| * system, accumulated inside one 32-bit register */ | * 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 */ | /* Check if all pixels have the same index */ | ||||
| if ((mask ^ (mask << 2)) < 4) { | 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) | uint8_t *segment, uint8_t *ref, int layout, int is_vp7) | ||||
| { | { | ||||
| VP56RangeCoder *c = &s->c; | 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) { | if (is_vp7) { | ||||
| int i; | int i; | ||||
| *segment = 0; | *segment = 0; | ||||
| @@ -161,7 +161,7 @@ static void dump_bih(AVFormatContext *s, BITMAPINFOHEADER *bih) | |||||
| static int shall_we_drop(AVFormatContext *s) | static int shall_we_drop(AVFormatContext *s) | ||||
| { | { | ||||
| struct vfw_ctx *ctx = s->priv_data; | 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); | const int ndropscores = FF_ARRAY_ELEMS(dropscore); | ||||
| unsigned int buffer_fullness = (ctx->curbufsize*100)/s->max_picture_buffer; | 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) | static int save_avio_options(AVFormatContext *s) | ||||
| { | { | ||||
| HLSContext *c = s->priv_data; | HLSContext *c = s->priv_data; | ||||
| const char *opts[] = { | |||||
| static const char *opts[] = { | |||||
| "headers", "http_proxy", "user_agent", "user-agent", "cookies", NULL }; | "headers", "http_proxy", "user_agent", "user-agent", "cookies", NULL }; | ||||
| const char **opt = opts; | const char **opt = opts; | ||||
| uint8_t *buf; | uint8_t *buf; | ||||
| @@ -4934,7 +4934,7 @@ static int mov_create_chapter_track(AVFormatContext *s, int tracknum) | |||||
| pkt.duration = end - pkt.dts; | pkt.duration = end - pkt.dts; | ||||
| if ((t = av_dict_get(c->metadata, "title", NULL, 0))) { | if ((t = av_dict_get(c->metadata, "title", NULL, 0))) { | ||||
| const char encd[12] = { | |||||
| static const char encd[12] = { | |||||
| 0x00, 0x00, 0x00, 0x0C, | 0x00, 0x00, 0x00, 0x0C, | ||||
| 'e', 'n', 'c', 'd', | 'e', 'n', 'c', 'd', | ||||
| 0x00, 0x00, 0x01, 0x00 }; | 0x00, 0x00, 0x01, 0x00 }; | ||||