[FFmpeg-cvslog] avcodec/magicyuvenc: Add const where appropriate

Andreas Rheinhardt git at videolan.org
Wed Feb 23 13:05:09 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Feb 22 21:35:33 2022 +0100| [416d4be6262de8391bdc6a864a42488bf6b84efb] | committer: Andreas Rheinhardt

avcodec/magicyuvenc: Add const where appropriate

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/magicyuvenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/magicyuvenc.c b/libavcodec/magicyuvenc.c
index 4440ab3ce2..ffb0be1d14 100644
--- a/libavcodec/magicyuvenc.c
+++ b/libavcodec/magicyuvenc.c
@@ -69,12 +69,12 @@ typedef struct MagicYUVContext {
     unsigned             tables_size;
     HuffEntry            he[4][256];
     LLVidEncDSPContext   llvidencdsp;
-    void (*predict)(struct MagicYUVContext *s, uint8_t *src, uint8_t *dst,
+    void (*predict)(struct MagicYUVContext *s, const uint8_t *src, uint8_t *dst,
                     ptrdiff_t stride, int width, int height);
 } MagicYUVContext;
 
 static void left_predict(MagicYUVContext *s,
-                         uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+                         const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
                          int width, int height)
 {
     uint8_t prev = 0;
@@ -98,7 +98,7 @@ static void left_predict(MagicYUVContext *s,
 }
 
 static void gradient_predict(MagicYUVContext *s,
-                             uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+                             const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
                              int width, int height)
 {
     int left = 0, top, lefttop;
@@ -126,7 +126,7 @@ static void gradient_predict(MagicYUVContext *s,
 }
 
 static void median_predict(MagicYUVContext *s,
-                           uint8_t *src, uint8_t *dst, ptrdiff_t stride,
+                           const uint8_t *src, uint8_t *dst, ptrdiff_t stride,
                            int width, int height)
 {
     int left = 0, lefttop;



More information about the ffmpeg-cvslog mailing list