FFmpeg
Loading...
Searching...
No Matches
dsd2pcm.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  DSDContext
 Per-channel buffer. More...
 

Macros

#define DSD_HTAPS   48 /** number of FIR constants */
 
#define DSD_FIFOSIZE   16 /** must be a power of two */
 
#define DSD_FIFOMASK   (DSD_FIFOSIZE - 1) /** bit mask for FIFO offsets */
 

Functions

void swri_dsd2pcm_init (void)
 
void swri_dsd2pcm_translate (DSDContext *s, size_t samples, const uint8_t *src, ptrdiff_t src_stride, float *dst, ptrdiff_t dst_stride)
 Convert one channel of MSB-first DSD data (one byte = 8 samples) to float PCM at 1/8th of the DSD bit rate.
 

Macro Definition Documentation

◆ DSD_HTAPS

#define DSD_HTAPS   48 /** number of FIR constants */

Definition at line 30 of file dsd2pcm.h.

◆ DSD_FIFOSIZE

#define DSD_FIFOSIZE   16 /** must be a power of two */

Definition at line 31 of file dsd2pcm.h.

Referenced by swri_dsd2pcm_translate().

◆ DSD_FIFOMASK

#define DSD_FIFOMASK   (DSD_FIFOSIZE - 1) /** bit mask for FIFO offsets */

Definition at line 32 of file dsd2pcm.h.

Referenced by swri_dsd2pcm_translate().

Function Documentation

◆ swri_dsd2pcm_init()

void swri_dsd2pcm_init ( void )

Definition at line 89 of file dsd2pcm.c.

◆ swri_dsd2pcm_translate()

void swri_dsd2pcm_translate ( DSDContext * s,
size_t samples,
const uint8_t * src,
ptrdiff_t src_stride,
float * dst,
ptrdiff_t dst_stride )

Convert one channel of MSB-first DSD data (one byte = 8 samples) to float PCM at 1/8th of the DSD bit rate.

Strides are in elements.

Definition at line 95 of file dsd2pcm.c.