Re: [FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-06 Thread Andreas Rheinhardt
Mark Reid:
> On Tue, Dec 6, 2022 at 8:11 PM Andreas Rheinhardt <
> andreas.rheinha...@outlook.com> wrote:
> 
>> mindm...@gmail.com:
>>> From: Mark Reid 
>>>
>>> Also renamed bswap_buf to bswap32_buf
>>> ---
>>>  configure | 56 ---
>>>  libavcodec/4xm.c  | 14 ++---
>>>  libavcodec/Makefile   |  1 -
>>>  libavcodec/ac3dec.c   |  4 +-
>>>  libavcodec/ac3dec.h   |  4 +-
>>>  libavcodec/alsdec.c   | 12 ++--
>>>  libavcodec/apedec.c   | 10 ++--
>>>  libavcodec/asv.c  |  4 +-
>>>  libavcodec/asv.h  |  4 +-
>>>  libavcodec/asvdec.c   |  4 +-
>>>  libavcodec/asvenc.c   |  4 +-
>>>  libavcodec/cllc.c |  6 +-
>>>  libavcodec/eamad.c|  6 +-
>>>  libavcodec/eatqi.c| 10 ++--
>>>  libavcodec/exr.c  |  6 +-
>>>  libavcodec/flacenc.c  |  6 +-
>>>  libavcodec/fraps.c| 10 ++--
>>>  libavcodec/hevcdec.c  |  4 +-
>>>  libavcodec/hevcdec.h  |  4 +-
>>>  libavcodec/huffyuvdec.c   | 14 ++---
>>>  libavcodec/huffyuvenc.c   |  8 +--
>>>  libavcodec/imc.c  |  6 +-
>>>  libavcodec/imm4.c | 12 ++--
>>>  libavcodec/mdec.c |  6 +-
>>>  libavcodec/mimic.c| 12 ++--
>>>  libavcodec/mobiclip.c |  6 +-
>>>  libavcodec/motionpixels.c | 10 ++--
>>>  libavcodec/mpc.h  |  4 +-
>>>  libavcodec/mpc7.c |  8 +--
>>>  libavcodec/rawdec.c   |  8 +--
>>>  libavcodec/riscv/Makefile |  3 -
>>>  libavcodec/shorten.c  |  7 ++-
>>>  libavcodec/truemotion2.c  | 11 ++--
>>>  libavcodec/truespeech.c   |  8 +--
>>>  libavcodec/utvideo.h  |  4 +-
>>>  libavcodec/utvideodec.c   | 16 +++---
>>>  libavcodec/utvideoenc.c   | 10 ++--
>>>  libavcodec/x86/Makefile   |  2 -
>>>  libavcodec/ylc.c  | 18 +++---
>>>  libavutil/Makefile|  2 +
>>>  {libavcodec => libavutil}/bswapdsp.c  | 17 +++---
>>>  {libavcodec => libavutil}/bswapdsp.h  | 16 +++---
>>>  libavutil/riscv/Makefile  |  7 ++-
>>>  .../riscv/bswapdsp_init.c |  9 +--
>>>  .../riscv/bswapdsp_rvb.S  |  0
>>>  .../riscv/bswapdsp_rvv.S  |  0
>>>  libavutil/version.h   |  2 +-
>>>  libavutil/x86/Makefile|  8 ++-
>>>  {libavcodec => libavutil}/x86/bswapdsp.asm|  4 +-
>>>  {libavcodec => libavutil}/x86/bswapdsp_init.c | 17 +++---
>>>  tests/checkasm/Makefile   |  2 +-
>>>  tests/checkasm/bswapdsp.c |  8 +--
>>>  tests/checkasm/checkasm.c |  4 +-
>>>  53 files changed, 216 insertions(+), 222 deletions(-)
>>>  rename {libavcodec => libavutil}/bswapdsp.c (80%)
>>>  rename {libavcodec => libavutil}/bswapdsp.h (71%)
>>>  rename {libavcodec => libavutil}/riscv/bswapdsp_init.c (85%)
>>>  rename {libavcodec => libavutil}/riscv/bswapdsp_rvb.S (100%)
>>>  rename {libavcodec => libavutil}/riscv/bswapdsp_rvv.S (100%)
>>>  rename {libavcodec => libavutil}/x86/bswapdsp.asm (97%)
>>>  rename {libavcodec => libavutil}/x86/bswapdsp_init.c (80%)
>>>
>>> diff --git a/configure b/configure
>>> index f4eedfc207..03b502ea37 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2421,7 +2421,6 @@ CONFIG_EXTRA="
>>>  audio_frame_queue
>>>  audiodsp
>>>  blockdsp
>>> -bswapdsp
>>>  cabac
>>>  cbs
>>>  cbs_av1
>>> @@ -2749,8 +2748,8 @@ aac_decoder_select="adts_header mpeg4audio sinewin"
>>>  aac_fixed_decoder_select="adts_header mpeg4audio"
>>>  aac_encoder_select="audio_frame_queue iirfilter lpc sinewin"
>>>  aac_latm_decoder_select="aac_decoder aac_latm_parser"
>>> -ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert"
>>> -ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp"
>>> +ac3_decoder_select="ac3_parser ac3dsp fmtconvert"
>>> +ac3_fixed_decoder_select="ac3_parser ac3dsp"
>>>  ac3_encoder_select="ac3dsp audiodsp me_cmp"
>>>  ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp"
>>>  acelp_kelvin_decoder_select="audiodsp"
>>> @@ -2759,20 +2758,20 @@ adpcm_g722_encoder_select="g722dsp"
>>>  agm_decoder_select="idctdsp"
>>>  aic_decoder_select="golomb idctdsp"
>>>  alac_encoder_select="lpc"
>>> 

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-06 Thread Mark Reid
On Tue, Dec 6, 2022 at 8:11 PM Andreas Rheinhardt <
andreas.rheinha...@outlook.com> wrote:

> mindm...@gmail.com:
> > From: Mark Reid 
> >
> > Also renamed bswap_buf to bswap32_buf
> > ---
> >  configure | 56 ---
> >  libavcodec/4xm.c  | 14 ++---
> >  libavcodec/Makefile   |  1 -
> >  libavcodec/ac3dec.c   |  4 +-
> >  libavcodec/ac3dec.h   |  4 +-
> >  libavcodec/alsdec.c   | 12 ++--
> >  libavcodec/apedec.c   | 10 ++--
> >  libavcodec/asv.c  |  4 +-
> >  libavcodec/asv.h  |  4 +-
> >  libavcodec/asvdec.c   |  4 +-
> >  libavcodec/asvenc.c   |  4 +-
> >  libavcodec/cllc.c |  6 +-
> >  libavcodec/eamad.c|  6 +-
> >  libavcodec/eatqi.c| 10 ++--
> >  libavcodec/exr.c  |  6 +-
> >  libavcodec/flacenc.c  |  6 +-
> >  libavcodec/fraps.c| 10 ++--
> >  libavcodec/hevcdec.c  |  4 +-
> >  libavcodec/hevcdec.h  |  4 +-
> >  libavcodec/huffyuvdec.c   | 14 ++---
> >  libavcodec/huffyuvenc.c   |  8 +--
> >  libavcodec/imc.c  |  6 +-
> >  libavcodec/imm4.c | 12 ++--
> >  libavcodec/mdec.c |  6 +-
> >  libavcodec/mimic.c| 12 ++--
> >  libavcodec/mobiclip.c |  6 +-
> >  libavcodec/motionpixels.c | 10 ++--
> >  libavcodec/mpc.h  |  4 +-
> >  libavcodec/mpc7.c |  8 +--
> >  libavcodec/rawdec.c   |  8 +--
> >  libavcodec/riscv/Makefile |  3 -
> >  libavcodec/shorten.c  |  7 ++-
> >  libavcodec/truemotion2.c  | 11 ++--
> >  libavcodec/truespeech.c   |  8 +--
> >  libavcodec/utvideo.h  |  4 +-
> >  libavcodec/utvideodec.c   | 16 +++---
> >  libavcodec/utvideoenc.c   | 10 ++--
> >  libavcodec/x86/Makefile   |  2 -
> >  libavcodec/ylc.c  | 18 +++---
> >  libavutil/Makefile|  2 +
> >  {libavcodec => libavutil}/bswapdsp.c  | 17 +++---
> >  {libavcodec => libavutil}/bswapdsp.h  | 16 +++---
> >  libavutil/riscv/Makefile  |  7 ++-
> >  .../riscv/bswapdsp_init.c |  9 +--
> >  .../riscv/bswapdsp_rvb.S  |  0
> >  .../riscv/bswapdsp_rvv.S  |  0
> >  libavutil/version.h   |  2 +-
> >  libavutil/x86/Makefile|  8 ++-
> >  {libavcodec => libavutil}/x86/bswapdsp.asm|  4 +-
> >  {libavcodec => libavutil}/x86/bswapdsp_init.c | 17 +++---
> >  tests/checkasm/Makefile   |  2 +-
> >  tests/checkasm/bswapdsp.c |  8 +--
> >  tests/checkasm/checkasm.c |  4 +-
> >  53 files changed, 216 insertions(+), 222 deletions(-)
> >  rename {libavcodec => libavutil}/bswapdsp.c (80%)
> >  rename {libavcodec => libavutil}/bswapdsp.h (71%)
> >  rename {libavcodec => libavutil}/riscv/bswapdsp_init.c (85%)
> >  rename {libavcodec => libavutil}/riscv/bswapdsp_rvb.S (100%)
> >  rename {libavcodec => libavutil}/riscv/bswapdsp_rvv.S (100%)
> >  rename {libavcodec => libavutil}/x86/bswapdsp.asm (97%)
> >  rename {libavcodec => libavutil}/x86/bswapdsp_init.c (80%)
> >
> > diff --git a/configure b/configure
> > index f4eedfc207..03b502ea37 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2421,7 +2421,6 @@ CONFIG_EXTRA="
> >  audio_frame_queue
> >  audiodsp
> >  blockdsp
> > -bswapdsp
> >  cabac
> >  cbs
> >  cbs_av1
> > @@ -2749,8 +2748,8 @@ aac_decoder_select="adts_header mpeg4audio sinewin"
> >  aac_fixed_decoder_select="adts_header mpeg4audio"
> >  aac_encoder_select="audio_frame_queue iirfilter lpc sinewin"
> >  aac_latm_decoder_select="aac_decoder aac_latm_parser"
> > -ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert"
> > -ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp"
> > +ac3_decoder_select="ac3_parser ac3dsp fmtconvert"
> > +ac3_fixed_decoder_select="ac3_parser ac3dsp"
> >  ac3_encoder_select="ac3dsp audiodsp me_cmp"
> >  ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp"
> >  acelp_kelvin_decoder_select="audiodsp"
> > @@ -2759,20 +2758,20 @@ adpcm_g722_encoder_select="g722dsp"
> >  agm_decoder_select="idctdsp"
> >  aic_decoder_select="golomb idctdsp"
> >  alac_encoder_select="lpc"
> > -als_decoder_select="bswapdsp 

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-06 Thread Andreas Rheinhardt
mindm...@gmail.com:
> From: Mark Reid 
> 
> Also renamed bswap_buf to bswap32_buf
> ---
>  configure | 56 ---
>  libavcodec/4xm.c  | 14 ++---
>  libavcodec/Makefile   |  1 -
>  libavcodec/ac3dec.c   |  4 +-
>  libavcodec/ac3dec.h   |  4 +-
>  libavcodec/alsdec.c   | 12 ++--
>  libavcodec/apedec.c   | 10 ++--
>  libavcodec/asv.c  |  4 +-
>  libavcodec/asv.h  |  4 +-
>  libavcodec/asvdec.c   |  4 +-
>  libavcodec/asvenc.c   |  4 +-
>  libavcodec/cllc.c |  6 +-
>  libavcodec/eamad.c|  6 +-
>  libavcodec/eatqi.c| 10 ++--
>  libavcodec/exr.c  |  6 +-
>  libavcodec/flacenc.c  |  6 +-
>  libavcodec/fraps.c| 10 ++--
>  libavcodec/hevcdec.c  |  4 +-
>  libavcodec/hevcdec.h  |  4 +-
>  libavcodec/huffyuvdec.c   | 14 ++---
>  libavcodec/huffyuvenc.c   |  8 +--
>  libavcodec/imc.c  |  6 +-
>  libavcodec/imm4.c | 12 ++--
>  libavcodec/mdec.c |  6 +-
>  libavcodec/mimic.c| 12 ++--
>  libavcodec/mobiclip.c |  6 +-
>  libavcodec/motionpixels.c | 10 ++--
>  libavcodec/mpc.h  |  4 +-
>  libavcodec/mpc7.c |  8 +--
>  libavcodec/rawdec.c   |  8 +--
>  libavcodec/riscv/Makefile |  3 -
>  libavcodec/shorten.c  |  7 ++-
>  libavcodec/truemotion2.c  | 11 ++--
>  libavcodec/truespeech.c   |  8 +--
>  libavcodec/utvideo.h  |  4 +-
>  libavcodec/utvideodec.c   | 16 +++---
>  libavcodec/utvideoenc.c   | 10 ++--
>  libavcodec/x86/Makefile   |  2 -
>  libavcodec/ylc.c  | 18 +++---
>  libavutil/Makefile|  2 +
>  {libavcodec => libavutil}/bswapdsp.c  | 17 +++---
>  {libavcodec => libavutil}/bswapdsp.h  | 16 +++---
>  libavutil/riscv/Makefile  |  7 ++-
>  .../riscv/bswapdsp_init.c |  9 +--
>  .../riscv/bswapdsp_rvb.S  |  0
>  .../riscv/bswapdsp_rvv.S  |  0
>  libavutil/version.h   |  2 +-
>  libavutil/x86/Makefile|  8 ++-
>  {libavcodec => libavutil}/x86/bswapdsp.asm|  4 +-
>  {libavcodec => libavutil}/x86/bswapdsp_init.c | 17 +++---
>  tests/checkasm/Makefile   |  2 +-
>  tests/checkasm/bswapdsp.c |  8 +--
>  tests/checkasm/checkasm.c |  4 +-
>  53 files changed, 216 insertions(+), 222 deletions(-)
>  rename {libavcodec => libavutil}/bswapdsp.c (80%)
>  rename {libavcodec => libavutil}/bswapdsp.h (71%)
>  rename {libavcodec => libavutil}/riscv/bswapdsp_init.c (85%)
>  rename {libavcodec => libavutil}/riscv/bswapdsp_rvb.S (100%)
>  rename {libavcodec => libavutil}/riscv/bswapdsp_rvv.S (100%)
>  rename {libavcodec => libavutil}/x86/bswapdsp.asm (97%)
>  rename {libavcodec => libavutil}/x86/bswapdsp_init.c (80%)
> 
> diff --git a/configure b/configure
> index f4eedfc207..03b502ea37 100755
> --- a/configure
> +++ b/configure
> @@ -2421,7 +2421,6 @@ CONFIG_EXTRA="
>  audio_frame_queue
>  audiodsp
>  blockdsp
> -bswapdsp
>  cabac
>  cbs
>  cbs_av1
> @@ -2749,8 +2748,8 @@ aac_decoder_select="adts_header mpeg4audio sinewin"
>  aac_fixed_decoder_select="adts_header mpeg4audio"
>  aac_encoder_select="audio_frame_queue iirfilter lpc sinewin"
>  aac_latm_decoder_select="aac_decoder aac_latm_parser"
> -ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert"
> -ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp"
> +ac3_decoder_select="ac3_parser ac3dsp fmtconvert"
> +ac3_fixed_decoder_select="ac3_parser ac3dsp"
>  ac3_encoder_select="ac3dsp audiodsp me_cmp"
>  ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp"
>  acelp_kelvin_decoder_select="audiodsp"
> @@ -2759,20 +2758,20 @@ adpcm_g722_encoder_select="g722dsp"
>  agm_decoder_select="idctdsp"
>  aic_decoder_select="golomb idctdsp"
>  alac_encoder_select="lpc"
> -als_decoder_select="bswapdsp mpeg4audio"
> +als_decoder_select="mpeg4audio"
>  amrnb_decoder_select="lsp"
>  amrwb_decoder_select="lsp"
>  amv_decoder_select="sp5x_decoder exif"
>  amv_encoder_select="jpegtables mpegvideoenc"
> -ape_decoder_select="bswapdsp llauddsp"
> +ape_decoder_select="llauddsp"
>  

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-06 Thread Mark Reid
On Tue, Dec 6, 2022 at 10:21 AM James Almer  wrote:

> On 12/5/2022 7:16 PM, mindm...@gmail.com wrote:
> > diff --git a/libavcodec/bswapdsp.h b/libavutil/bswapdsp.h
> > similarity index 71%
> > rename from libavcodec/bswapdsp.h
> > rename to libavutil/bswapdsp.h
> > index 6f4db66115..b540560d6a 100644
> > --- a/libavcodec/bswapdsp.h
> > +++ b/libavutil/bswapdsp.h
> > @@ -16,18 +16,16 @@
> >   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> 02110-1301 USA
> >   */
> >
> > -#ifndef AVCODEC_BSWAPDSP_H
> > -#define AVCODEC_BSWAPDSP_H
> > +#ifndef AVUTIL_BSWAPDSP_H
> > +#define AVUTIL_BSWAPDSP_H
> >
> >  #include 
> >
> > -typedef struct BswapDSPContext {
> > -void (*bswap_buf)(uint32_t *dst, const uint32_t *src, int w);
> > +typedef struct AVBSwapDSPContext {
> > +void (*bswap32_buf)(uint32_t *dst, const uint32_t *src, int len);
> >  void (*bswap16_buf)(uint16_t *dst, const uint16_t *src, int len);
> > -} BswapDSPContext;
> > +} AVBSwapDSPContext;
> >
> > -void ff_bswapdsp_init(BswapDSPContext *c);
> > -void ff_bswapdsp_init_riscv(BswapDSPContext *c);
> > -void ff_bswapdsp_init_x86(BswapDSPContext *c);
> > +void av_bswapdsp_init(AVBSwapDSPContext *c);
> >
> > -#endif /* AVCODEC_BSWAPDSP_H */
> > +#endif /* AVUTIL_BSWAPDSP_H */
>
> For what's supposed to become an installer header, this is barebones in
> the documentation department.
>
> Also, does this have any real use for API users? If you want to access
> these functions from swscale as well as lavc, you could either duplicate
> the code, or use the avpriv prefix.
> I'm not a fan of adding public API for something that has no use outside
> of our own libraries.
>

I agree, I don't see a need for this to be public. I'll change it to use
the avpriv prefix if that's okay.
I'll add a little doc to the header too anyway.

the blockdsp is disappearing from configure is a mistake, I'll fix that too



> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-06 Thread James Almer

On 12/5/2022 7:16 PM, mindm...@gmail.com wrote:

diff --git a/libavcodec/bswapdsp.h b/libavutil/bswapdsp.h
similarity index 71%
rename from libavcodec/bswapdsp.h
rename to libavutil/bswapdsp.h
index 6f4db66115..b540560d6a 100644
--- a/libavcodec/bswapdsp.h
+++ b/libavutil/bswapdsp.h
@@ -16,18 +16,16 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_BSWAPDSP_H

-#define AVCODEC_BSWAPDSP_H
+#ifndef AVUTIL_BSWAPDSP_H
+#define AVUTIL_BSWAPDSP_H
 
 #include 
 
-typedef struct BswapDSPContext {

-void (*bswap_buf)(uint32_t *dst, const uint32_t *src, int w);
+typedef struct AVBSwapDSPContext {
+void (*bswap32_buf)(uint32_t *dst, const uint32_t *src, int len);
 void (*bswap16_buf)(uint16_t *dst, const uint16_t *src, int len);
-} BswapDSPContext;
+} AVBSwapDSPContext;
 
-void ff_bswapdsp_init(BswapDSPContext *c);

-void ff_bswapdsp_init_riscv(BswapDSPContext *c);
-void ff_bswapdsp_init_x86(BswapDSPContext *c);
+void av_bswapdsp_init(AVBSwapDSPContext *c);
 
-#endif /* AVCODEC_BSWAPDSP_H */

+#endif /* AVUTIL_BSWAPDSP_H */


For what's supposed to become an installer header, this is barebones in 
the documentation department.


Also, does this have any real use for API users? If you want to access 
these functions from swscale as well as lavc, you could either duplicate 
the code, or use the avpriv prefix.
I'm not a fan of adding public API for something that has no use outside 
of our own libraries.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-06 Thread Michael Niedermayer
On Mon, Dec 05, 2022 at 02:16:40PM -0800, mindm...@gmail.com wrote:
> From: Mark Reid 
> 
> Also renamed bswap_buf to bswap32_buf
> ---
>  configure | 56 ---
>  libavcodec/4xm.c  | 14 ++---
>  libavcodec/Makefile   |  1 -
>  libavcodec/ac3dec.c   |  4 +-
>  libavcodec/ac3dec.h   |  4 +-
>  libavcodec/alsdec.c   | 12 ++--
>  libavcodec/apedec.c   | 10 ++--
>  libavcodec/asv.c  |  4 +-
>  libavcodec/asv.h  |  4 +-
>  libavcodec/asvdec.c   |  4 +-
>  libavcodec/asvenc.c   |  4 +-
>  libavcodec/cllc.c |  6 +-
>  libavcodec/eamad.c|  6 +-
>  libavcodec/eatqi.c| 10 ++--
>  libavcodec/exr.c  |  6 +-
>  libavcodec/flacenc.c  |  6 +-
>  libavcodec/fraps.c| 10 ++--
>  libavcodec/hevcdec.c  |  4 +-
>  libavcodec/hevcdec.h  |  4 +-
>  libavcodec/huffyuvdec.c   | 14 ++---
>  libavcodec/huffyuvenc.c   |  8 +--
>  libavcodec/imc.c  |  6 +-
>  libavcodec/imm4.c | 12 ++--
>  libavcodec/mdec.c |  6 +-
>  libavcodec/mimic.c| 12 ++--
>  libavcodec/mobiclip.c |  6 +-
>  libavcodec/motionpixels.c | 10 ++--
>  libavcodec/mpc.h  |  4 +-
>  libavcodec/mpc7.c |  8 +--
>  libavcodec/rawdec.c   |  8 +--
>  libavcodec/riscv/Makefile |  3 -
>  libavcodec/shorten.c  |  7 ++-
>  libavcodec/truemotion2.c  | 11 ++--
>  libavcodec/truespeech.c   |  8 +--
>  libavcodec/utvideo.h  |  4 +-
>  libavcodec/utvideodec.c   | 16 +++---
>  libavcodec/utvideoenc.c   | 10 ++--
>  libavcodec/x86/Makefile   |  2 -
>  libavcodec/ylc.c  | 18 +++---
>  libavutil/Makefile|  2 +
>  {libavcodec => libavutil}/bswapdsp.c  | 17 +++---
>  {libavcodec => libavutil}/bswapdsp.h  | 16 +++---
>  libavutil/riscv/Makefile  |  7 ++-
>  .../riscv/bswapdsp_init.c |  9 +--
>  .../riscv/bswapdsp_rvb.S  |  0
>  .../riscv/bswapdsp_rvv.S  |  0
>  libavutil/version.h   |  2 +-
>  libavutil/x86/Makefile|  8 ++-
>  {libavcodec => libavutil}/x86/bswapdsp.asm|  4 +-
>  {libavcodec => libavutil}/x86/bswapdsp_init.c | 17 +++---
>  tests/checkasm/Makefile   |  2 +-
>  tests/checkasm/bswapdsp.c |  8 +--
>  tests/checkasm/checkasm.c |  4 +-
>  53 files changed, 216 insertions(+), 222 deletions(-)
>  rename {libavcodec => libavutil}/bswapdsp.c (80%)
>  rename {libavcodec => libavutil}/bswapdsp.h (71%)
>  rename {libavcodec => libavutil}/riscv/bswapdsp_init.c (85%)
>  rename {libavcodec => libavutil}/riscv/bswapdsp_rvb.S (100%)
>  rename {libavcodec => libavutil}/riscv/bswapdsp_rvv.S (100%)
>  rename {libavcodec => libavutil}/x86/bswapdsp.asm (97%)
>  rename {libavcodec => libavutil}/x86/bswapdsp_init.c (80%)
> 
> diff --git a/configure b/configure
> index f4eedfc207..03b502ea37 100755
> --- a/configure
> +++ b/configure
> @@ -2421,7 +2421,6 @@ CONFIG_EXTRA="
>  audio_frame_queue
>  audiodsp
>  blockdsp
> -bswapdsp
>  cabac
>  cbs
>  cbs_av1
> @@ -2749,8 +2748,8 @@ aac_decoder_select="adts_header mpeg4audio sinewin"
>  aac_fixed_decoder_select="adts_header mpeg4audio"
>  aac_encoder_select="audio_frame_queue iirfilter lpc sinewin"
>  aac_latm_decoder_select="aac_decoder aac_latm_parser"
> -ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert"
> -ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp"
> +ac3_decoder_select="ac3_parser ac3dsp fmtconvert"
> +ac3_fixed_decoder_select="ac3_parser ac3dsp"
>  ac3_encoder_select="ac3dsp audiodsp me_cmp"
>  ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp"
>  acelp_kelvin_decoder_select="audiodsp"
> @@ -2759,20 +2758,20 @@ adpcm_g722_encoder_select="g722dsp"
>  agm_decoder_select="idctdsp"
>  aic_decoder_select="golomb idctdsp"
>  alac_encoder_select="lpc"
> -als_decoder_select="bswapdsp mpeg4audio"
> +als_decoder_select="mpeg4audio"
>  amrnb_decoder_select="lsp"
>  amrwb_decoder_select="lsp"
>  amv_decoder_select="sp5x_decoder exif"
>  amv_encoder_select="jpegtables mpegvideoenc"
> -ape_decoder_select="bswapdsp 

[FFmpeg-devel] [PATCH v2 1/2] avutil: move bswapdsp from avcodec to avutil

2022-12-05 Thread mindmark
From: Mark Reid 

Also renamed bswap_buf to bswap32_buf
---
 configure | 56 ---
 libavcodec/4xm.c  | 14 ++---
 libavcodec/Makefile   |  1 -
 libavcodec/ac3dec.c   |  4 +-
 libavcodec/ac3dec.h   |  4 +-
 libavcodec/alsdec.c   | 12 ++--
 libavcodec/apedec.c   | 10 ++--
 libavcodec/asv.c  |  4 +-
 libavcodec/asv.h  |  4 +-
 libavcodec/asvdec.c   |  4 +-
 libavcodec/asvenc.c   |  4 +-
 libavcodec/cllc.c |  6 +-
 libavcodec/eamad.c|  6 +-
 libavcodec/eatqi.c| 10 ++--
 libavcodec/exr.c  |  6 +-
 libavcodec/flacenc.c  |  6 +-
 libavcodec/fraps.c| 10 ++--
 libavcodec/hevcdec.c  |  4 +-
 libavcodec/hevcdec.h  |  4 +-
 libavcodec/huffyuvdec.c   | 14 ++---
 libavcodec/huffyuvenc.c   |  8 +--
 libavcodec/imc.c  |  6 +-
 libavcodec/imm4.c | 12 ++--
 libavcodec/mdec.c |  6 +-
 libavcodec/mimic.c| 12 ++--
 libavcodec/mobiclip.c |  6 +-
 libavcodec/motionpixels.c | 10 ++--
 libavcodec/mpc.h  |  4 +-
 libavcodec/mpc7.c |  8 +--
 libavcodec/rawdec.c   |  8 +--
 libavcodec/riscv/Makefile |  3 -
 libavcodec/shorten.c  |  7 ++-
 libavcodec/truemotion2.c  | 11 ++--
 libavcodec/truespeech.c   |  8 +--
 libavcodec/utvideo.h  |  4 +-
 libavcodec/utvideodec.c   | 16 +++---
 libavcodec/utvideoenc.c   | 10 ++--
 libavcodec/x86/Makefile   |  2 -
 libavcodec/ylc.c  | 18 +++---
 libavutil/Makefile|  2 +
 {libavcodec => libavutil}/bswapdsp.c  | 17 +++---
 {libavcodec => libavutil}/bswapdsp.h  | 16 +++---
 libavutil/riscv/Makefile  |  7 ++-
 .../riscv/bswapdsp_init.c |  9 +--
 .../riscv/bswapdsp_rvb.S  |  0
 .../riscv/bswapdsp_rvv.S  |  0
 libavutil/version.h   |  2 +-
 libavutil/x86/Makefile|  8 ++-
 {libavcodec => libavutil}/x86/bswapdsp.asm|  4 +-
 {libavcodec => libavutil}/x86/bswapdsp_init.c | 17 +++---
 tests/checkasm/Makefile   |  2 +-
 tests/checkasm/bswapdsp.c |  8 +--
 tests/checkasm/checkasm.c |  4 +-
 53 files changed, 216 insertions(+), 222 deletions(-)
 rename {libavcodec => libavutil}/bswapdsp.c (80%)
 rename {libavcodec => libavutil}/bswapdsp.h (71%)
 rename {libavcodec => libavutil}/riscv/bswapdsp_init.c (85%)
 rename {libavcodec => libavutil}/riscv/bswapdsp_rvb.S (100%)
 rename {libavcodec => libavutil}/riscv/bswapdsp_rvv.S (100%)
 rename {libavcodec => libavutil}/x86/bswapdsp.asm (97%)
 rename {libavcodec => libavutil}/x86/bswapdsp_init.c (80%)

diff --git a/configure b/configure
index f4eedfc207..03b502ea37 100755
--- a/configure
+++ b/configure
@@ -2421,7 +2421,6 @@ CONFIG_EXTRA="
 audio_frame_queue
 audiodsp
 blockdsp
-bswapdsp
 cabac
 cbs
 cbs_av1
@@ -2749,8 +2748,8 @@ aac_decoder_select="adts_header mpeg4audio sinewin"
 aac_fixed_decoder_select="adts_header mpeg4audio"
 aac_encoder_select="audio_frame_queue iirfilter lpc sinewin"
 aac_latm_decoder_select="aac_decoder aac_latm_parser"
-ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert"
-ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp"
+ac3_decoder_select="ac3_parser ac3dsp fmtconvert"
+ac3_fixed_decoder_select="ac3_parser ac3dsp"
 ac3_encoder_select="ac3dsp audiodsp me_cmp"
 ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp"
 acelp_kelvin_decoder_select="audiodsp"
@@ -2759,20 +2758,20 @@ adpcm_g722_encoder_select="g722dsp"
 agm_decoder_select="idctdsp"
 aic_decoder_select="golomb idctdsp"
 alac_encoder_select="lpc"
-als_decoder_select="bswapdsp mpeg4audio"
+als_decoder_select="mpeg4audio"
 amrnb_decoder_select="lsp"
 amrwb_decoder_select="lsp"
 amv_decoder_select="sp5x_decoder exif"
 amv_encoder_select="jpegtables mpegvideoenc"
-ape_decoder_select="bswapdsp llauddsp"
+ape_decoder_select="llauddsp"
 apng_decoder_select="inflate_wrapper"
 apng_encoder_select="deflate_wrapper llvidencdsp"
 aptx_encoder_select="audio_frame_queue"
 aptx_hd_encoder_select="audio_frame_queue"
-asv1_decoder_select="blockdsp bswapdsp idctdsp"