diff mbox series

[FFmpeg-devel,214/217] avcodec/ituh263enc: Remove unused function parameter

Message ID 20201202042244.519127-80-andreas.rheinhardt@gmail.com
State New
Headers show
Series [FFmpeg-devel,01/45] avcodec/a64multienc: Fix memleak upon init failure
Related show

Checks

Context Check Description
andriy/x86 warning Failed to apply patch

Commit Message

Andreas Rheinhardt Dec. 2, 2020, 4:22 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/ituh263enc.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index b1b78218a5..e1debcf63b 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -713,8 +713,7 @@  static av_cold void init_mv_penalty_and_fcode(MpegEncContext *s)
     }
 }
 
-static av_cold void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab,
-                                         uint8_t *len_tab)
+static av_cold void init_uni_h263_rl_tab(const RLTable *rl, uint8_t *len_tab)
 {
     int slevel, run, last;
 
@@ -738,10 +737,9 @@  static av_cold void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab,
                 len=  rl->table_vlc[code][1];
                 bits=bits*2+sign; len++;
 
-                if(code!=rl->n && len < len_tab[index]){
-                    if(bits_tab) bits_tab[index]= bits;
+                if (code != rl->n && len < len_tab[index])
                     len_tab [index]= len;
-                }
+
                 /* ESC */
                 bits= rl->table_vlc[rl->n][0];
                 len = rl->table_vlc[rl->n][1];
@@ -749,10 +747,8 @@  static av_cold void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab,
                 bits=bits*64+run; len+=6;
                 bits=bits*256+(level&0xff); len+=8;
 
-                if(len < len_tab[index]){
-                    if(bits_tab) bits_tab[index]= bits;
+                if (len < len_tab[index])
                     len_tab [index]= len;
-                }
             }
         }
     }
@@ -768,8 +764,8 @@  av_cold void ff_h263_encode_init(MpegEncContext *s)
         ff_rl_init(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
         ff_rl_init(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
 
-        init_uni_h263_rl_tab(&ff_rl_intra_aic, NULL, uni_h263_intra_aic_rl_len);
-        init_uni_h263_rl_tab(&ff_h263_rl_inter    , NULL, uni_h263_inter_rl_len);
+        init_uni_h263_rl_tab(&ff_rl_intra_aic,  uni_h263_intra_aic_rl_len);
+        init_uni_h263_rl_tab(&ff_h263_rl_inter, uni_h263_inter_rl_len);
 
         init_mv_penalty_and_fcode(s);
     }