diff mbox series

[FFmpeg-devel,3/9] avcodec/mpegutils: Constify ff_print_debug_info2, ff_draw_horiz_band

Message ID DB6PR0101MB22140A1219C449982E58D9B98F629@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com
State Accepted
Commit 68a90ac3e6bc192d78b30faa9f771c14775c93e8
Headers show
Series [FFmpeg-devel,1/9] avcodec/wmv2dec: Zero mb_type array for I pictures | expand

Checks

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

Commit Message

Andreas Rheinhardt Aug. 9, 2022, 6:34 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/mpegutils.c | 11 ++++++-----
 libavcodec/mpegutils.h |  9 +++++----
 2 files changed, 11 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c
index 395bd38ff5..ff9418232b 100644
--- a/libavcodec/mpegutils.c
+++ b/libavcodec/mpegutils.c
@@ -49,7 +49,7 @@  static int add_mb(AVMotionVector *mb, uint32_t mb_type,
 }
 
 void ff_draw_horiz_band(AVCodecContext *avctx,
-                        AVFrame *cur, AVFrame *last,
+                        const AVFrame *cur, const AVFrame *last,
                         int y, int h, int picture_structure,
                         int first_field, int low_delay)
 {
@@ -68,7 +68,7 @@  void ff_draw_horiz_band(AVCodecContext *avctx,
         return;
 
     if (avctx->draw_horiz_band) {
-        AVFrame *src;
+        const AVFrame *src;
         int offset[AV_NUM_DATA_POINTERS];
         int i;
 
@@ -153,9 +153,10 @@  static char get_interlacement_char(int mb_type)
         return ' ';
 }
 
-void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table,
-                         uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2],
-                         int mb_width, int mb_height, int mb_stride, int quarter_sample)
+void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
+                          const uint8_t *mbskip_table, const uint32_t *mbtype_table,
+                          const int8_t *qscale_table, int16_t (*const motion_val[2])[2],
+                          int mb_width, int mb_height, int mb_stride, int quarter_sample)
 {
     if ((avctx->export_side_data & AV_CODEC_EXPORT_DATA_MVS) && mbtype_table && motion_val[0]) {
         const int shift = 1 + quarter_sample;
diff --git a/libavcodec/mpegutils.h b/libavcodec/mpegutils.h
index c92f9192db..386110bb8c 100644
--- a/libavcodec/mpegutils.h
+++ b/libavcodec/mpegutils.h
@@ -127,15 +127,16 @@  enum OutputFormat {
  *
  * @param h is the normal height, this will be reduced automatically if needed
  */
-void ff_draw_horiz_band(AVCodecContext *avctx, AVFrame *cur, AVFrame *last,
+void ff_draw_horiz_band(AVCodecContext *avctx, const AVFrame *cur, const AVFrame *last,
                         int y, int h, int picture_structure, int first_field,
                         int low_delay);
 
 /**
  * Print debugging info for the given picture.
  */
-void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict, uint8_t *mbskip_table,
-                         uint32_t *mbtype_table, int8_t *qscale_table, int16_t (*motion_val[2])[2],
-                         int mb_width, int mb_height, int mb_stride, int quarter_sample);
+void ff_print_debug_info2(AVCodecContext *avctx, AVFrame *pict,
+                          const uint8_t *mbskip_table, const uint32_t *mbtype_table,
+                          const int8_t *qscale_table, int16_t (*const motion_val[2])[2],
+                          int mb_width, int mb_height, int mb_stride, int quarter_sample);
 
 #endif /* AVCODEC_MPEGUTILS_H */