Declare static immutable variables as const
Use NULL instead 0 for null pointers.
Change-Id: I7d5de384f0cea6d3ae514f5cdf44e8cc6423c67e
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index d5ee13a..c931418 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -181,7 +181,7 @@
// coeff_cost_upd_freq: COST_UPD_OFF
// mode_cost_upd_freq: COST_UPD_OFF
// mv_cost_upd_freq: COST_UPD_OFF
-static struct av1_extracfg default_extra_cfg = {
+static const struct av1_extracfg default_extra_cfg = {
7, // cpu_used
1, // enable_auto_alt_ref
0, // enable_auto_bwd_ref
@@ -242,7 +242,7 @@
0, // error_resilient_mode off by default.
0, // s_frame_mode off by default.
0, // film_grain_test_vector
- 0, // film_grain_table_filename
+ NULL, // film_grain_table_filename
0, // motion_vector_unit_test
1, // CDF update mode
1, // enable rectangular partitions
@@ -317,7 +317,7 @@
NULL, // two_pass_output
};
#else
-static struct av1_extracfg default_extra_cfg = {
+static const struct av1_extracfg default_extra_cfg = {
0, // cpu_used
1, // enable_auto_alt_ref
0, // enable_auto_bwd_ref
@@ -378,7 +378,7 @@
0, // error_resilient_mode off by default.
0, // s_frame_mode off by default.
0, // film_grain_test_vector
- 0, // film_grain_table_filename
+ NULL, // film_grain_table_filename
0, // motion_vector_unit_test
1, // CDF update mode
1, // enable rectangular partitions
@@ -3743,7 +3743,7 @@
arg);
}
-static aom_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
+static const aom_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
{ AV1_COPY_REFERENCE, ctrl_copy_reference },
{ AOME_USE_REFERENCE, ctrl_use_reference },