[FFmpeg-cvslog] avcodec/flacenc: Mark pointers/array arguments const which are not changed

Michael Niedermayer git at videolan.org
Tue May 19 19:54:55 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 19 19:47:22 2015 +0200| [215410860f332d335fdf962762175a485777c1a7] | committer: Michael Niedermayer

avcodec/flacenc: Mark pointers/array arguments const which are not changed

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=215410860f332d335fdf962762175a485777c1a7
---

 libavcodec/flacenc.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 16719a9..79f821d 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -509,7 +509,7 @@ static void copy_samples(FlacEncodeContext *s, const void *samples)
 }
 
 
-static uint64_t rice_count_exact(int32_t *res, int n, int k)
+static uint64_t rice_count_exact(const int32_t *res, int n, int k)
 {
     int i;
     uint64_t count = 0;
@@ -637,12 +637,12 @@ static uint64_t calc_optimal_rice_params(RiceContext *rc, int porder,
 }
 
 
-static void calc_sum_top(int pmax, int kmax, uint32_t *data, int n, int pred_order,
+static void calc_sum_top(int pmax, int kmax, const uint32_t *data, int n, int pred_order,
                          uint64_t sums[32][MAX_PARTITIONS])
 {
     int i, k;
     int parts;
-    uint32_t *res, *res_end;
+    const uint32_t *res, *res_end;
 
     /* sums for highest level */
     parts   = (1 << pmax);
@@ -681,7 +681,7 @@ static uint64_t calc_rice_params(RiceContext *rc,
                                  uint32_t udata[FLAC_MAX_BLOCKSIZE],
                                  uint64_t sums[32][MAX_PARTITIONS],
                                  int pmin, int pmax,
-                                 int32_t *data, int n, int pred_order, int exact)
+                                 const int32_t *data, int n, int pred_order, int exact)
 {
     int i;
     uint64_t bits[MAX_PARTITION_ORDER+1];
@@ -1038,7 +1038,7 @@ static void remove_wasted_bits(FlacEncodeContext *s)
 }
 
 
-static int estimate_stereo_mode(int32_t *left_ch, int32_t *right_ch, int n,
+static int estimate_stereo_mode(const int32_t *left_ch, const int32_t *right_ch, int n,
                                 int max_rice_param)
 {
     int i, best;



More information about the ffmpeg-cvslog mailing list