[FFmpeg-cvslog] dirac: mark some variables const.

Michael Niedermayer git at videolan.org
Thu Mar 15 22:32:16 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 15 22:12:02 2012 +0100| [1bc85fb32dddf01792ae0850aa9a52d4a5737adb] | committer: Michael Niedermayer

dirac: mark some variables const.

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

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

 libavcodec/diracdsp.c         |    4 ++--
 libavcodec/diracdsp.h         |    4 ++--
 libavcodec/x86/diracdsp_mmx.c |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/diracdsp.c b/libavcodec/diracdsp.c
index 6cf75d8..429241d 100644
--- a/libavcodec/diracdsp.c
+++ b/libavcodec/diracdsp.c
@@ -28,7 +28,7 @@
       +3*((src)[-2*stride] + (src)[3*stride])                   \
       -1*((src)[-3*stride] + (src)[4*stride]) + 16) >> 5)
 
-static void dirac_hpel_filter(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,
+static void dirac_hpel_filter(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, const uint8_t *src,
                               int stride, int width, int height)
 {
     int x, y;
@@ -98,7 +98,7 @@ PIXOP_BILINEAR(avg, OP_AVG, 32)
             block += stride;                                            \
         }                                                               \
     }                                                                   \
-    static void biweight_dirac_pixels ## W ## _c(uint8_t *dst, uint8_t *src, int stride, int log2_denom, \
+    static void biweight_dirac_pixels ## W ## _c(uint8_t *dst, const uint8_t *src, int stride, int log2_denom, \
                                                  int weightd, int weights, int h) { \
         int x;                                                          \
         while (h--) {                                                   \
diff --git a/libavcodec/diracdsp.h b/libavcodec/diracdsp.h
index ecd12d6..613ca5b 100644
--- a/libavcodec/diracdsp.h
+++ b/libavcodec/diracdsp.h
@@ -24,10 +24,10 @@
 #include <stdint.h>
 
 typedef void (*dirac_weight_func)(uint8_t *block, int stride, int log2_denom, int weight, int h);
-typedef void (*dirac_biweight_func)(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int h);
+typedef void (*dirac_biweight_func)(uint8_t *dst, const uint8_t *src, int stride, int log2_denom, int weightd, int weights, int h);
 
 typedef struct {
-    void (*dirac_hpel_filter)(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src, int stride, int width, int height);
+    void (*dirac_hpel_filter)(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, const uint8_t *src, int stride, int width, int height);
     /**
      * dirac_pixels_tab[width][subpel]
      * width is 2 for 32, 1 for 16, 0 for 8
diff --git a/libavcodec/x86/diracdsp_mmx.c b/libavcodec/x86/diracdsp_mmx.c
index a343bdd..693a9af 100644
--- a/libavcodec/x86/diracdsp_mmx.c
+++ b/libavcodec/x86/diracdsp_mmx.c
@@ -27,11 +27,11 @@ void ff_put_signed_rect_clamped_mmx(uint8_t *dst, int dst_stride, const int16_t
 void ff_put_signed_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
 
 #define HPEL_FILTER(MMSIZE, EXT)                                                             \
-    void ff_dirac_hpel_filter_v_ ## EXT(uint8_t *, uint8_t *, int, int);                     \
-    void ff_dirac_hpel_filter_h_ ## EXT(uint8_t *, uint8_t *, int);                          \
+    void ff_dirac_hpel_filter_v_ ## EXT(uint8_t *, const uint8_t *, int, int);               \
+    void ff_dirac_hpel_filter_h_ ## EXT(uint8_t *, const uint8_t *, int);                    \
                                                                                              \
     static void dirac_hpel_filter_ ## EXT(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc,       \
-                                          uint8_t *src, int stride, int width, int height)   \
+                                          const uint8_t *src, int stride, int width, int height)   \
     {                                                                                        \
         while( height-- )                                                                    \
         {                                                                                    \



More information about the ffmpeg-cvslog mailing list