34 int markers[4*16] = {0};
42 int marker, sample_blocks,
sample_rate, sr_code, framesize;
47 state = (state << 16) | bytestream_get_be16(&bufp);
49 if (buf - p->
buf >= 4)
54 (bytestream_get_be16(&bufp) & 0xFC00) == 0xFC00)
57 (bytestream_get_be16(&bufp) & 0x00FC) == 0x00FC)
62 (bytestream_get_be16(&bufp) & 0xFFF0) == 0x07F0)
67 (bytestream_get_be16(&bufp) & 0xF0FF) == 0xF007)
78 sample_blocks =
get_bits(&gb, 7) + 1;
79 if (sample_blocks < 8)
101 marker += 4* sr_code;
109 if (markers[max] < markers[i])
113 if (markers[max] > 3 && p->
buf_size / markers[max] < 32*1024 &&
114 markers[max] * 4 > sum * 3 &&
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void skip_bits_long(GetBitContext *s, int n)
static int dts_probe(AVProbeData *p)
#define FF_ARRAY_ELEMS(a)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
bitstream reader API header.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int buf_size
Size of buf except extra allocated bytes.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
int avpriv_dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst, int max_size)
Convert bitstream to one representation based on sync marker.
const uint32_t avpriv_dca_sample_rates[16]
AVInputFormat ff_dts_demuxer
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
This structure contains the data a format has to probe a file.
static av_always_inline int diff(const uint32_t a, const uint32_t b)