[FFmpeg-cvslog] avcodec/cavsdsp: Remove unused function parameter

Andreas Rheinhardt git at videolan.org
Wed Sep 21 21:36:44 EEST 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Sep 20 02:43:02 2022 +0200| [57f3ca20dcb104665c3c5dce04829574dc8d044f] | committer: Andreas Rheinhardt

avcodec/cavsdsp: Remove unused function parameter

Reviewed-by: Rémi Denis-Courmont <remi at remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/cavs.c        | 2 +-
 libavcodec/cavsdsp.c     | 7 +++----
 libavcodec/cavsdsp.h     | 6 +++---
 libavcodec/x86/cavsdsp.c | 7 +++----
 4 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c
index 87bbe26f98..cba0a06e89 100644
--- a/libavcodec/cavs.c
+++ b/libavcodec/cavs.c
@@ -797,7 +797,7 @@ av_cold int ff_cavs_init(AVCodecContext *avctx)
     ff_h264chroma_init(&h->h264chroma, 8);
     ff_idctdsp_init(&h->idsp, avctx);
     ff_videodsp_init(&h->vdsp, 8);
-    ff_cavsdsp_init(&h->cdsp, avctx);
+    ff_cavsdsp_init(&h->cdsp);
     ff_init_scantable_permutation(h->idsp.idct_permutation,
                                   h->cdsp.idct_perm);
     ff_init_scantable(h->idsp.idct_permutation, &h->scantable, ff_zigzag_direct);
diff --git a/libavcodec/cavsdsp.c b/libavcodec/cavsdsp.c
index b096de452c..af46eaf8d2 100644
--- a/libavcodec/cavsdsp.c
+++ b/libavcodec/cavsdsp.c
@@ -22,8 +22,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <stdio.h>
-
 #include "idctdsp.h"
 #include "mathops.h"
 #include "cavsdsp.h"
@@ -548,7 +546,8 @@ CAVS_MC(avg_, 16)
 #define put_cavs_qpel16_mc00_c ff_put_pixels16x16_c
 #define avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c
 
-av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
+av_cold void ff_cavsdsp_init(CAVSDSPContext* c)
+{
 #define dspfunc(PFX, IDX, NUM) \
     c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \
     c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \
@@ -578,6 +577,6 @@ av_cold void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx) {
     c->idct_perm = FF_IDCT_PERM_NONE;
 
 #if ARCH_X86
-    ff_cavsdsp_init_x86(c, avctx);
+    ff_cavsdsp_init_x86(c);
 #endif
 }
diff --git a/libavcodec/cavsdsp.h b/libavcodec/cavsdsp.h
index 9ccaa0addd..2cd9298963 100644
--- a/libavcodec/cavsdsp.h
+++ b/libavcodec/cavsdsp.h
@@ -22,9 +22,9 @@
 #ifndef AVCODEC_CAVSDSP_H
 #define AVCODEC_CAVSDSP_H
 
+#include <stddef.h>
 #include <stdint.h>
 
-#include "avcodec.h"
 #include "qpeldsp.h"
 
 typedef struct CAVSDSPContext {
@@ -38,7 +38,7 @@ typedef struct CAVSDSPContext {
     int idct_perm;
 } CAVSDSPContext;
 
-void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx);
-void ff_cavsdsp_init_x86(CAVSDSPContext* c, AVCodecContext *avctx);
+void ff_cavsdsp_init(CAVSDSPContext* c);
+void ff_cavsdsp_init_x86(CAVSDSPContext* c);
 
 #endif /* AVCODEC_CAVSDSP_H */
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
index 7ceb51a23c..4ad977a034 100644
--- a/libavcodec/x86/cavsdsp.c
+++ b/libavcodec/x86/cavsdsp.c
@@ -345,8 +345,7 @@ static void avg_cavs_qpel16_mc00_sse2(uint8_t *dst, const uint8_t *src,
 }
 #endif
 
-static av_cold void cavsdsp_init_mmx(CAVSDSPContext *c,
-                                     AVCodecContext *avctx)
+static av_cold void cavsdsp_init_mmx(CAVSDSPContext *c)
 {
 #if HAVE_MMX_EXTERNAL
     c->put_cavs_qpel_pixels_tab[1][0] = put_cavs_qpel8_mc00_mmx;
@@ -369,12 +368,12 @@ CAVS_MC(avg_,  8, mmxext)
 CAVS_MC(avg_, 16, mmxext)
 #endif /* HAVE_MMXEXT_INLINE */
 
-av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx)
+av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c)
 {
     av_unused int cpu_flags = av_get_cpu_flags();
 
     if (X86_MMX(cpu_flags))
-        cavsdsp_init_mmx(c, avctx);
+        cavsdsp_init_mmx(c);
 
 #if HAVE_MMXEXT_INLINE
     if (INLINE_MMXEXT(cpu_flags)) {



More information about the ffmpeg-cvslog mailing list