36 if (
AV_RB32(p->buf) == 0xF07E0001 && p->buf[20] == 0xF7 &&
37 p->buf[6] >= 8 && p->buf[6] <= 28)
46 for (
i = 0;
i < 120;
i += 2) {
47 unsigned sample = ((unsigned)
src[
i + 0] << 25) + ((
unsigned)
src[
i + 1] << 18);
57 for (
i = 0;
i < 120;
i += 3) {
60 sample = ((unsigned)
src[
i + 0] << 25) | ((
unsigned)
src[
i + 1] << 18) | ((unsigned)
src[
i + 2] << 11);
69 for (
i = 0;
i < 120;
i += 4) {
72 sample = ((unsigned)
src[
i + 0] << 25) | ((
unsigned)
src[
i + 1] << 18) | ((unsigned)
src[
i + 2] << 11) | ((
unsigned)
src[
i + 3] << 4);
77#define SDS_3BYTE_TO_INT_DECODE(x) (((x) & 0x7F) | (((x) & 0x7F00) >> 1) | (((x) & 0x7F0000) >> 2))
82 unsigned sample_period;
94 if (
s->bit_depth < 8 ||
s->bit_depth > 28)
97 if (
s->bit_depth < 14) {
100 }
else if (
s->bit_depth < 21) {
144 s->read_block(
s->data, (uint32_t *)
pkt->data);
151 pkt->stream_index = 0;
160 .p.extensions =
"sds",
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
int64_t avio_size(AVIOContext *s)
Get the filesize.
unsigned int avio_rb16(AVIOContext *s)
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
unsigned int avio_rl24(AVIOContext *s)
int avio_r8(AVIOContext *s)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define i(width, name, range_min, range_max)
static int read_probe(const AVProbeData *p)
static int read_header(FFV1Context *f, RangeCoder *c)
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static void byte3_read(const uint8_t *src, uint32_t *dst)
static int sds_probe(const AVProbeData *p)
static int sds_read_header(AVFormatContext *ctx)
static void byte2_read(const uint8_t *src, uint32_t *dst)
#define SDS_3BYTE_TO_INT_DECODE(x)
static int sds_read_packet(AVFormatContext *ctx, AVPacket *pkt)
static void byte4_read(const uint8_t *src, uint32_t *dst)
int nb_channels
Number of channels in this layout.
AVChannelLayout ch_layout
The channel layout and number of channels.
enum AVMediaType codec_type
General type of the encoded data.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t duration
Decoding: duration of the stream, in stream time base.
void(* read_block)(const uint8_t *src, uint32_t *dst)
static AVFormatContext * ctx