FFmpeg
Loading...
Searching...
No Matches
dsddec.c File Reference

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

#include "config.h"
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/reverse.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "dsd.h"

Go to the source code of this file.

Macros

#define PRIV_DATA_SIZE   0
 
#define DSD_DECODER(id_, name_, long_name_)
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static av_cold int decode_close (AVCodecContext *avctx)
 
static void repack (AVCodecContext *avctx, uint8_t *dst, const uint8_t *src, int nb_samples)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Detailed Description

Direct Stream Digital (DSD) decoder.

Definition in file dsddec.c.

Macro Definition Documentation

◆ PRIV_DATA_SIZE

#define PRIV_DATA_SIZE   0

Definition at line 51 of file dsddec.c.

◆ DSD_DECODER

#define DSD_DECODER ( id_,
name_,
long_name_ )
Value:
const FFCodec ff_ ## name_ ## _decoder = { \
.p.name = #name_, \
CODEC_LONG_NAME(long_name_), \
.p.type = AVMEDIA_TYPE_AUDIO, \
.p.id = AV_CODEC_ID_##id_, \
.priv_data_size = PRIV_DATA_SIZE, \
.init = decode_init, \
.close = decode_close, \
FF_CODEC_DECODE_CB(decode_frame), \
.p.capabilities = AV_CODEC_CAP_DR1, \
};
#define PRIV_DATA_SIZE
Definition dsddec.c:51
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
static av_cold int decode_init(AVCodecContext *avctx)
Definition 4xm.c:998
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
Definition 4xm.c:837
static av_cold int decode_close(AVCodecContext *avctx)
Definition aacdec.c:1220

Definition at line 154 of file dsddec.c.

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext * avctx)
static

Definition at line 54 of file dsddec.c.

◆ decode_close()

static av_cold int decode_close ( AVCodecContext * avctx)
static

Definition at line 69 of file dsddec.c.

◆ repack()

static void repack ( AVCodecContext * avctx,
uint8_t * dst,
const uint8_t * src,
int nb_samples )
static

Definition at line 81 of file dsddec.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
AVPacket * avpkt )
static

Definition at line 113 of file dsddec.c.