FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dsddec.c File Reference

Direct Stream Digital (DSD) decoder. More...

#include "libavcodec/internal.h"
#include "libavcodec/mathops.h"
#include "avcodec.h"
#include "dsd_tablegen.h"

Go to the source code of this file.

Data Structures

struct  DSDContext
 Per-channel buffer. More...
 

Macros

#define FIFOSIZE   16 /** must be a power of two */
 
#define FIFOMASK   (FIFOSIZE - 1) /** bit mask for FIFO offsets */
 
#define DSD_DECODER(id_, name_, long_name_)
 

Functions

static void dsd2pcm_translate (DSDContext *s, size_t samples, int lsbf, const unsigned char *src, ptrdiff_t src_stride, float *dst, ptrdiff_t dst_stride)
 
static av_cold void init_static_data (void)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 

Detailed Description

Direct Stream Digital (DSD) decoder.

Definition in file dsddec.c.

Macro Definition Documentation

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

Definition at line 34 of file dsddec.c.

#define FIFOMASK   (FIFOSIZE - 1) /** bit mask for FIFO offsets */

Definition at line 35 of file dsddec.c.

Referenced by dsd2pcm_translate().

#define DSD_DECODER (   id_,
  name_,
  long_name_ 
)
Value:
AVCodec ff_##name_##_decoder = { \
.name = #name_, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.type = AVMEDIA_TYPE_AUDIO, \
.id = AV_CODEC_ID_##id_, \
.init = decode_init, \
.decode = decode_frame, \
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \
};
float, planar
Definition: samplefmt.h:70
AVCodec.
Definition: avcodec.h:3472
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
const char * name
Name of the codec implementation.
Definition: avcodec.h:3479
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:59
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dsddec.c:118
static av_cold int decode_init(AVCodecContext *avctx)
Definition: dsddec.c:91

Definition at line 152 of file dsddec.c.

Function Documentation

static void dsd2pcm_translate ( DSDContext s,
size_t  samples,
int  lsbf,
const unsigned char *  src,
ptrdiff_t  src_stride,
float *  dst,
ptrdiff_t  dst_stride 
)
static

Definition at line 49 of file dsddec.c.

Referenced by decode_frame().

static av_cold void init_static_data ( void  )
static

Definition at line 82 of file dsddec.c.

Referenced by decode_init().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 91 of file dsddec.c.

static int decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 118 of file dsddec.c.