FFmpeg
Macros | Functions
audio_convert_init.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/x86/cpu.h"
#include "libswresample/swresample_internal.h"
#include "libswresample/audioconvert.h"

Go to the source code of this file.

Macros

#define PROTO(pre, in, out, cap)   void ff ## pre ## in## _to_ ##out## _a_ ##cap(uint8_t **dst, const uint8_t **src, int len);
 
#define PROTO2(pre, out, cap)   PROTO(pre, int16, out, cap) PROTO(pre, int32, out, cap) PROTO(pre, float, out, cap)
 
#define PROTO3(pre, cap)   PROTO2(pre, int16, cap) PROTO2(pre, int32, cap) PROTO2(pre, float, cap)
 
#define PROTO4(pre)   PROTO3(pre, mmx) PROTO3(pre, sse) PROTO3(pre, sse2) PROTO3(pre, ssse3) PROTO3(pre, sse4) PROTO3(pre, avx) PROTO3(pre, avx2)
 
#define MULTI_CAPS_FUNC(flag, cap)
 

Functions

av_cold void swri_audio_convert_init_x86 (struct AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels)
 

Macro Definition Documentation

◆ PROTO

#define PROTO (   pre,
  in,
  out,
  cap 
)    void ff ## pre ## in## _to_ ##out## _a_ ##cap(uint8_t **dst, const uint8_t **src, int len);

Definition at line 26 of file audio_convert_init.c.

◆ PROTO2

#define PROTO2 (   pre,
  out,
  cap 
)    PROTO(pre, int16, out, cap) PROTO(pre, int32, out, cap) PROTO(pre, float, out, cap)

Definition at line 27 of file audio_convert_init.c.

◆ PROTO3

#define PROTO3 (   pre,
  cap 
)    PROTO2(pre, int16, cap) PROTO2(pre, int32, cap) PROTO2(pre, float, cap)

Definition at line 28 of file audio_convert_init.c.

◆ PROTO4

#define PROTO4 (   pre)    PROTO3(pre, mmx) PROTO3(pre, sse) PROTO3(pre, sse2) PROTO3(pre, ssse3) PROTO3(pre, sse4) PROTO3(pre, avx) PROTO3(pre, avx2)

Definition at line 29 of file audio_convert_init.c.

◆ MULTI_CAPS_FUNC

#define MULTI_CAPS_FUNC (   flag,
  cap 
)
Value:
if (EXTERNAL_##flag(mm_flags)) {\
if( out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_S16 || out_fmt == AV_SAMPLE_FMT_S32P && in_fmt == AV_SAMPLE_FMT_S16P)\
ac->simd_f = ff_int16_to_int32_a_ ## cap;\
if( out_fmt == AV_SAMPLE_FMT_S16 && in_fmt == AV_SAMPLE_FMT_S32 || out_fmt == AV_SAMPLE_FMT_S16P && in_fmt == AV_SAMPLE_FMT_S32P)\
ac->simd_f = ff_int32_to_int16_a_ ## cap;\
}

Function Documentation

◆ swri_audio_convert_init_x86()

av_cold void swri_audio_convert_init_x86 ( struct AudioConvert ac,
enum AVSampleFormat  out_fmt,
enum AVSampleFormat  in_fmt,
int  channels 
)

Definition at line 37 of file audio_convert_init.c.

AV_SAMPLE_FMT_S32P
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
Definition: samplefmt.h:68
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:67
flag
#define flag(name)
Definition: cbs_av1.c:553
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:61
AV_SAMPLE_FMT_S32
@ AV_SAMPLE_FMT_S32
signed 32 bits
Definition: samplefmt.h:62