35 #define FIFOMASK (FIFOSIZE - 1)
37 #if FIFOSIZE * 8 < HTAPS * 2
38 #error "FIFOSIZE too small"
50 const unsigned char *
src, ptrdiff_t src_stride,
51 float *dst, ptrdiff_t dst_stride)
59 while (samples-- > 0) {
69 unsigned char b = s->
buf[(pos - (CTABLES*2 - 1) + i) &
FIFOMASK];
102 for (i = 0; i < avctx->
channels; i++) {
104 memset(s[i].
buf, 0x69,
sizeof(s[i].buf));
119 int *got_frame_ptr,
AVPacket *avpkt)
141 for (i = 0; i < avctx->
channels; i++) {
144 avpkt->
data + i * src_next, src_stride,
152 #define DSD_DECODER(id_, name_, long_name_) \
153 AVCodec ff_##name_##_decoder = { \
155 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
156 .type = AVMEDIA_TYPE_AUDIO, \
157 .id = AV_CODEC_ID_##id_, \
158 .init = decode_init, \
159 .decode = decode_frame, \
160 .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \
161 AV_SAMPLE_FMT_NONE }, \
164 DSD_DECODER(DSD_LSBF, dsd_lsbf,
"DSD (Direct Stream Digital), least significant bit first")
165 DSD_DECODER(DSD_MSBF, dsd_msbf, "DSD (Direct
Stream Digital), most significant bit first")
166 DSD_DECODER(DSD_MSBF_PLANAR, dsd_msbf_planar, "DSD (Direct
Stream Digital), most significant bit first, planar")
167 DSD_DECODER(DSD_LSBF_PLANAR, dsd_lsbf_planar, "DSD (Direct
Stream Digital), least significant bit first, planar")
This structure describes decoded (raw) audio or video data.
ptrdiff_t const GLvoid * data
#define DSD_DECODER(id_, name_, long_name_)
enum AVSampleFormat sample_fmt
audio sample format
static av_cold void init_static_data(void)
static float ctables[CTABLES][256]
const uint8_t ff_reverse[256]
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)
Libavcodec external API header.
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static av_cold void dsd_ctables_tableinit(void)
unsigned char buf[FIFOSIZE]
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
common internal api header.
int channels
number of audio channels
static av_cold int decode_init(AVCodecContext *avctx)
#define av_malloc_array(a, b)
uint8_t ** extended_data
pointers to the data planes/channels.
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame