diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-27 17:36:59 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-01 15:25:48 +0100 |
commit | 2c6f532e0a29527347418d2d8c4ccfe57a6ace0e (patch) | |
tree | ed807102e82b1db61780ce0e1480dcf799d4e4b2 /libavfilter | |
parent | 15baa0c1acd21be99408e6782ae28d868b847b13 (diff) |
Mark some pointers as const
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_afftfilt.c | 2 | ||||
-rw-r--r-- | libavfilter/af_aiir.c | 2 | ||||
-rw-r--r-- | libavfilter/dnn/dnn_backend_native_layers.c | 2 | ||||
-rw-r--r-- | libavfilter/dnn/dnn_backend_native_layers.h | 2 | ||||
-rw-r--r-- | libavfilter/vf_geq.c | 4 | ||||
-rw-r--r-- | libavfilter/vf_qp.c | 4 | ||||
-rw-r--r-- | libavfilter/vf_selectivecolor.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_tonemap_opencl.c | 6 |
8 files changed, 12 insertions, 12 deletions
diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index a6156bf852..9b9001a44b 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -118,7 +118,7 @@ static double realf(void *priv, double x, double ch) { return getreal(priv, x, c static double imagf(void *priv, double x, double ch) { return getimag(priv, x, ch); } static const char *const func2_names[] = { "real", "imag", NULL }; -double (*func2[])(void *, double, double) = { realf, imagf, NULL }; +static double (*const func2[])(void *, double, double) = { realf, imagf, NULL }; static int config_input(AVFilterLink *inlink) { diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c index 59d2232ac9..f2e9d8e4e2 100644 --- a/libavfilter/af_aiir.c +++ b/libavfilter/af_aiir.c @@ -453,7 +453,7 @@ static int read_zp_coefficients(AVFilterContext *ctx, char *item_str, int nb_ite return 0; } -static const char *format[] = { "%lf", "%lf %lfi", "%lf %lfr", "%lf %lfd", "%lf %lfi" }; +static const char *const format[] = { "%lf", "%lf %lfi", "%lf %lfr", "%lf %lfd", "%lf %lfi" }; static int read_channels(AVFilterContext *ctx, int channels, uint8_t *item_str, int ab) { diff --git a/libavfilter/dnn/dnn_backend_native_layers.c b/libavfilter/dnn/dnn_backend_native_layers.c index 638a94e9a3..a23b34f823 100644 --- a/libavfilter/dnn/dnn_backend_native_layers.c +++ b/libavfilter/dnn/dnn_backend_native_layers.c @@ -29,7 +29,7 @@ #include "dnn_backend_native_layer_avgpool.h" #include "dnn_backend_native_layer_dense.h" -LayerFunc layer_funcs[DLT_COUNT] = { +const LayerFunc layer_funcs[DLT_COUNT] = { {NULL, NULL}, {dnn_execute_layer_conv2d, dnn_load_layer_conv2d}, {dnn_execute_layer_depth2space, dnn_load_layer_depth2space}, diff --git a/libavfilter/dnn/dnn_backend_native_layers.h b/libavfilter/dnn/dnn_backend_native_layers.h index dc76ace65a..b9e8a131d5 100644 --- a/libavfilter/dnn/dnn_backend_native_layers.h +++ b/libavfilter/dnn/dnn_backend_native_layers.h @@ -33,6 +33,6 @@ typedef struct LayerFunc { LAYER_LOAD_FUNC pf_load; }LayerFunc; -extern LayerFunc layer_funcs[DLT_COUNT]; +extern const LayerFunc layer_funcs[DLT_COUNT]; #endif diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index d7abf96a68..072cef3ca3 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -270,7 +270,7 @@ static av_cold int geq_init(AVFilterContext *ctx) } for (plane = 0; plane < NB_PLANES; plane++) { - static double (*p[])(void *, double, double) = { + static double (*const p[])(void *, double, double) = { lum , cb , cr , alpha , lumsum, cbsum, crsub, alphasum, }; @@ -283,7 +283,7 @@ static av_cold int geq_init(AVFilterContext *ctx) "gsum", "bsum", "rsum", "alphasum", "psum", NULL }; const char *const *func2_names = geq->is_rgb ? func2_rgb_names : func2_yuv_names; - double (*func2[])(void *, double, double) = { + double (*const func2[])(void *, double, double) = { lum , cb , cr , alpha , p[plane], lumsum, cbsum, crsub, alphasum, p[plane + 4], NULL }; diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c index 306e8e4594..af46fe0ece 100644 --- a/libavfilter/vf_qp.c +++ b/libavfilter/vf_qp.c @@ -55,7 +55,7 @@ static int config_input(AVFilterLink *inlink) int i; int ret; AVExpr *e = NULL; - static const char *var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; + static const char *const var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; if (!s->qp_expr_str) return 0; @@ -144,7 +144,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) AVVideoBlockParams *b = av_video_enc_params_block(par_out, block_idx); int qp = sd_in ? in_qp_global + BLOCK_QP_DELTA(block_idx) : NAN; double var_values[] = { !!sd_in, qp, x, y, s->qstride, s->h, 0}; - static const char *var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; + static const char *const var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }; double temp_val; ret = av_expr_parse_and_eval(&temp_val, s->qp_expr_str, diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c index d8f339d540..9bd79a3e60 100644 --- a/libavfilter/vf_selectivecolor.c +++ b/libavfilter/vf_selectivecolor.c @@ -61,7 +61,7 @@ enum correction_method { NB_CORRECTION_METHODS, }; -static const char *color_names[NB_RANGES] = { +static const char *const color_names[NB_RANGES] = { "red", "yellow", "green", "cyan", "blue", "magenta", "white", "neutral", "black" }; diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index b880228727..2681ebd1b5 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -71,12 +71,12 @@ typedef struct TonemapOpenCLContext { cl_mem util_mem; } TonemapOpenCLContext; -static const char *linearize_funcs[AVCOL_TRC_NB] = { +static const char *const linearize_funcs[AVCOL_TRC_NB] = { [AVCOL_TRC_SMPTE2084] = "eotf_st2084", [AVCOL_TRC_ARIB_STD_B67] = "inverse_oetf_hlg", }; -static const char *delinearize_funcs[AVCOL_TRC_NB] = { +static const char *const delinearize_funcs[AVCOL_TRC_NB] = { [AVCOL_TRC_BT709] = "inverse_eotf_bt1886", [AVCOL_TRC_BT2020_10] = "inverse_eotf_bt1886", }; @@ -91,7 +91,7 @@ static const struct WhitepointCoefficients whitepoint_table[AVCOL_PRI_NB] = { [AVCOL_PRI_BT2020] = { 0.3127, 0.3290 }, }; -static const char *tonemap_func[TONEMAP_MAX] = { +static const char *const tonemap_func[TONEMAP_MAX] = { [TONEMAP_NONE] = "direct", [TONEMAP_LINEAR] = "linear", [TONEMAP_GAMMA] = "gamma", |