libdragon
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
libopus_rsp.c File Reference

C-level glue for RSP ucode for Opus decoding. More...

Data Structures

struct  opus_fft_pass_t
 Description of a single pass of the FFT. More...
 
struct  rsp_layout_t
 Layout of samples within RSP during combfilter. More...
 

Macros

#define COMPARE_MDCT_REFERENCE   0
 Compare RSP and C implementation of IMDCT.
 
#define COMPARE_REFERENCE   0
 Compare RSP and C implementation of comb filter.
 
#define COMPARE_REFERENCE_DUAL   0
 Compare RSP and C implementation of dual comb filter.
 
#define RSP_DEEMPHASIS_COMPARE   0
 Compare RSP and C emphasis filter.
 

Functions

 DEFINE_RSP_UCODE (rsp_opus_dsp)
 RSP ucode for DSP functions.
 
 DEFINE_RSP_UCODE (rsp_opus_imdct)
 RSP ucode for IMDCT.
 
void rsp_opus_init (void)
 Initialize Opus RSP acceleration.
 
void rsp_opus_memmove (celt_sig *dst, celt_sig *src, opus_int32 len)
 Do a memmove with RSP to move back samples in the output buffer.
 
void rsp_opus_clear (celt_sig *dst, opus_int32 len)
 Clear output buffer with RSP. Len must be in 32-bit samples (not bytes)
 
 DEFINE_RSP_UCODE (rsp_opus_fft_prerot)
 RSP ucode for IMDCT pre-rotation.
 
 DEFINE_RSP_UCODE (rsp_opus_fft_bfly2)
 RSP ucode for FFT butterfly 2.
 
 DEFINE_RSP_UCODE (rsp_opus_fft_bfly3)
 RSP ucode for FFT butterfly 3.
 
 DEFINE_RSP_UCODE (rsp_opus_fft_bfly4)
 RSP ucode for FFT butterfly 4.
 
 DEFINE_RSP_UCODE (rsp_opus_fft_bfly4m1)
 RSP ucode for FFT butterfly 4 (multiplicity 1)
 
 DEFINE_RSP_UCODE (rsp_opus_fft_bfly5)
 RSP ucode for FFT butterfly 5.
 
 DEFINE_RSP_UCODE (rsp_opus_fft_postrot)
 RSP ucode for IMDCT post-rotation.
 
void rsp_clt_mdct_backward (const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar *OPUS_RESTRICT out, const opus_val16 *OPUS_RESTRICT window, int overlap, int shift, int stride, int B, int NB, int arch)
 Run a IMDCT on RSP.
 
void comb_filter_const_c (opus_val32 *y, opus_val32 *x, int T, int N, opus_val16 g10, opus_val16 g11, opus_val16 g12)
 Reference implementation of comb filter.
 
void rsp_opus_comb_filter_const (opus_val32 *y, opus_val32 *x, int T, int N, opus_val16 g10, opus_val16 g11, opus_val16 g12, int arch)
 Run a comb filter on the RSP.
 
void rsp_opus_comb_filter_dual (opus_val32 *y, opus_val32 *x, int T0, int T1, int N, opus_val16 g00, opus_val16 g01, opus_val16 g02, opus_val16 g10, opus_val16 g11, opus_val16 g12, const opus_val16 *window)
 Run a dual comb filter on the RSP.
 
void deemphasis (celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, int accum)
 Reference implementation of the emphasis filter.
 
void rsp_opus_deemphasis (celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem, int accum)
 Run the emphasis filter on teh RSP.
 

Detailed Description

C-level glue for RSP ucode for Opus decoding.

Author
Giovanni Bajo (giova.nosp@m.nnib.nosp@m.ajo@g.nosp@m.mail.nosp@m..com)

Data Structure Documentation

◆ opus_fft_pass_t

struct opus_fft_pass_t

Description of a single pass of the FFT.

Data Fields
uint16_t consts[8][8] Up to 8 vector constants.
uint32_t next_pass_rdram Pointer to next pass in RDRAM (or 0 if it's the last)
uint32_t func_rdram Address of the butterfly function in RDRAM (overlay)
uint32_t stride
uint32_t m
uint32_t n
uint32_t mm Parameters for the butterfly function.

◆ rsp_layout_t

struct rsp_layout_t

Layout of samples within RSP during combfilter.

Data Fields
int nT0
int nT1
int t1_idx
bool t1_merged
int i_idx
bool i_merged