diff mbox series

[FFmpeg-devel,20/39] avcodec/diracdsp: Don't cast const away unnecessarily

Message ID DB6PR0101MB2214463BE02B8FA2984826548F949@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Commit e207f75ba8c9e74cb606bc36697149fca3a13a4c
Headers show
Series [FFmpeg-devel,01/39] avcodec/hevcdsp: Constify src pointers | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 fail Make failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt July 26, 2022, 10:07 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/diracdsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/diracdsp.c b/libavcodec/diracdsp.c
index aafdddcdc3..284f914f9d 100644
--- a/libavcodec/diracdsp.c
+++ b/libavcodec/diracdsp.c
@@ -139,7 +139,7 @@  ADD_OBMC(32)
 static void put_signed_rect_clamped_8bit_c(uint8_t *dst, int dst_stride, const uint8_t *_src, int src_stride, int width, int height)
 {
     int x, y;
-    int16_t *src = (int16_t *)_src;
+    const int16_t *src = (const int16_t *)_src;
     for (y = 0; y < height; y++) {
         for (x = 0; x < width; x+=4) {
             dst[x  ] = av_clip_uint8(src[x  ] + 128);
@@ -158,7 +158,7 @@  static void put_signed_rect_clamped_ ## PX ## bit_c(uint8_t *_dst, int dst_strid
 {                                                                                                       \
     int x, y;                                                                                           \
     uint16_t *dst = (uint16_t *)_dst;                                                                   \
-    int32_t *src = (int32_t *)_src;                                                                     \
+    const int32_t *src = (const int32_t *)_src;                                                         \
     for (y = 0; y < height; y++) {                                                                      \
         for (x = 0; x < width; x+=4) {                                                                  \
             dst[x  ] = av_clip_uintp2(src[x  ] + (1U << (PX - 1)), PX);                                  \