diff mbox series

[FFmpeg-devel] lavc/fmtconvert: remove dead int32_to_float

Message ID 20220916192718.55949-1-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel] lavc/fmtconvert: remove dead int32_to_float | 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

Rémi Denis-Courmont Sept. 16, 2022, 7:27 p.m. UTC
From: Rémi Denis-Courmont <remi@remlab.net>

This is not used anywhere and has no implementations other than the
plain C one.
---
 libavcodec/fmtconvert.c |  9 ---------
 libavcodec/fmtconvert.h | 10 ----------
 2 files changed, 19 deletions(-)

Comments

Andreas Rheinhardt Sept. 16, 2022, 7:31 p.m. UTC | #1
remi@remlab.net:
> From: Rémi Denis-Courmont <remi@remlab.net>
> 
> This is not used anywhere and has no implementations other than the
> plain C one.
> ---
>  libavcodec/fmtconvert.c |  9 ---------
>  libavcodec/fmtconvert.h | 10 ----------
>  2 files changed, 19 deletions(-)
> 
> diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
> index fd56a63c77..00f55f8f1e 100644
> --- a/libavcodec/fmtconvert.c
> +++ b/libavcodec/fmtconvert.c
> @@ -33,14 +33,6 @@ static void int32_to_float_fmul_scalar_c(float *dst, const int32_t *src,
>          dst[i] = src[i] * mul;
>  }
>  
> -static void int32_to_float_c(float *dst, const int32_t *src, intptr_t len)
> -{
> -    int i;
> -
> -    for (i = 0; i < len; i++)
> -        dst[i] = (float)src[i];
> -}
> -
>  static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
>                                           const int32_t *src, const float *mul,
>                                           int len)
> @@ -52,7 +44,6 @@ static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
>  
>  av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
>  {
> -    c->int32_to_float             = int32_to_float_c;
>      c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c;
>      c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c;
>  
> diff --git a/libavcodec/fmtconvert.h b/libavcodec/fmtconvert.h
> index a1b17e4f04..b2df7a9629 100644
> --- a/libavcodec/fmtconvert.h
> +++ b/libavcodec/fmtconvert.h
> @@ -37,16 +37,6 @@ typedef struct FmtConvertContext {
>       */
>      void (*int32_to_float_fmul_scalar)(float *dst, const int32_t *src,
>                                         float mul, int len);
> -    /**
> -     * Convert an array of int32_t to float.
> -     * @param dst destination array of float.
> -     *            constraints: 32-byte aligned
> -     * @param src source array of int32_t.
> -     *            constraints: 32-byte aligned
> -     * @param len number of elements to convert.
> -     *            constraints: multiple of 8
> -     */
> -    void (*int32_to_float)(float *dst, const int32_t *src, intptr_t len);
>  
>      /**
>       * Convert an array of int32_t to float and multiply by a float value from another array,

Seems like the last usage of this was removed in
46089967722f74e794865a044f5f682f26628802. This should be mentioned in
the commit message. LGTM apart from that; nice catch.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
index fd56a63c77..00f55f8f1e 100644
--- a/libavcodec/fmtconvert.c
+++ b/libavcodec/fmtconvert.c
@@ -33,14 +33,6 @@  static void int32_to_float_fmul_scalar_c(float *dst, const int32_t *src,
         dst[i] = src[i] * mul;
 }
 
-static void int32_to_float_c(float *dst, const int32_t *src, intptr_t len)
-{
-    int i;
-
-    for (i = 0; i < len; i++)
-        dst[i] = (float)src[i];
-}
-
 static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
                                          const int32_t *src, const float *mul,
                                          int len)
@@ -52,7 +44,6 @@  static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
 
 av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
 {
-    c->int32_to_float             = int32_to_float_c;
     c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c;
     c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c;
 
diff --git a/libavcodec/fmtconvert.h b/libavcodec/fmtconvert.h
index a1b17e4f04..b2df7a9629 100644
--- a/libavcodec/fmtconvert.h
+++ b/libavcodec/fmtconvert.h
@@ -37,16 +37,6 @@  typedef struct FmtConvertContext {
      */
     void (*int32_to_float_fmul_scalar)(float *dst, const int32_t *src,
                                        float mul, int len);
-    /**
-     * Convert an array of int32_t to float.
-     * @param dst destination array of float.
-     *            constraints: 32-byte aligned
-     * @param src source array of int32_t.
-     *            constraints: 32-byte aligned
-     * @param len number of elements to convert.
-     *            constraints: multiple of 8
-     */
-    void (*int32_to_float)(float *dst, const int32_t *src, intptr_t len);
 
     /**
      * Convert an array of int32_t to float and multiply by a float value from another array,