45 for (i = 0; i < avctx->
channels; i++) {
47 memset(s[i].
buf, 0x69,
sizeof(s[i].buf));
84 for (i = 0; i < avctx->
channels; i++) {
87 avpkt->
data + i * src_next, src_stride,
95 #define DSD_DECODER(id_, name_, long_name_) \
96 AVCodec ff_##name_##_decoder = { \
98 .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
99 .type = AVMEDIA_TYPE_AUDIO, \
100 .id = AV_CODEC_ID_##id_, \
101 .init = decode_init, \
102 .decode = decode_frame, \
103 .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, \
104 AV_SAMPLE_FMT_NONE }, \
107 DSD_DECODER(DSD_LSBF, dsd_lsbf,
"DSD (Direct Stream Digital), least significant bit first")
108 DSD_DECODER(DSD_MSBF, dsd_msbf, "DSD (Direct
Stream Digital), most significant bit first")
109 DSD_DECODER(DSD_MSBF_PLANAR, dsd_msbf_planar, "DSD (Direct
Stream Digital), most significant bit first, planar")
110 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
av_cold void ff_init_dsd_data(void)
#define DSD_DECODER(id_, name_, long_name_)
enum AVSampleFormat sample_fmt
audio sample format
void ff_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 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