25 #define BITSTREAM_READER_LE 51 3, 4, 6, 8, 4096, 8192, 16384, 512, 1024, 2048,
56 int nb_samples, max_nb_samples;
61 max_nb_samples = 16384;
64 max_nb_samples = sample_rate *
71 if (nb_samples <= 0 || nb_samples > max_nb_samples)
95 uint64_t channel_mask = 0;
static const uint16_t frame_duration_type_quants[]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, TAKStreamInfo *ti, int log_level_offset)
Validate and decode a frame header.
#define AV_CH_TOP_FRONT_RIGHT
#define TAK_FORMAT_BPS_BITS
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_CH_TOP_FRONT_LEFT
#define TAK_FRAME_HEADER_NO_BITS
static const int64_t tak_channel_layouts[]
#define AV_CH_TOP_FRONT_CENTER
#define TAK_FRAME_FLAG_IS_LAST
#define TAK_SIZE_FRAME_DURATION_BITS
#define TAK_FORMAT_DATA_TYPE_BITS
void ff_tak_parse_streaminfo(TAKStreamInfo *s, GetBitContext *gb)
#define AV_CH_TOP_BACK_LEFT
int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size)
#define AV_CH_TOP_BACK_CENTER
#define AV_CH_LOW_FREQUENCY
#define TAK_FRAME_HEADER_FLAGS_BITS
#define TAK_FRAME_FLAG_HAS_INFO
Public header for CRC hash function implementation.
#define TAK_FRAME_HEADER_SYNC_ID
static uint64_t get_bits64(GetBitContext *s, int n)
Read 0-64 bits.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define TAK_SIZE_SAMPLES_NUM_BITS
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
#define AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_FRONT_CENTER
#define FF_ARRAY_ELEMS(a)
#define AV_CH_FRONT_RIGHT_OF_CENTER
#define TAK_FRAME_FLAG_HAS_METADATA
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
main external API structure.
static unsigned int get_bits1(GetBitContext *s)
#define AV_CH_TOP_BACK_RIGHT
static void skip_bits(GetBitContext *s, int n)
#define TAK_SAMPLE_RATE_MIN
TAK (Tom's lossless Audio Kompressor) decoder/demuxer common functions.
#define TAK_ENCODER_CODEC_BITS
#define AV_CH_BACK_CENTER
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
#define TAK_ENCODER_PROFILE_BITS
#define TAK_FORMAT_CH_LAYOUT_BITS
#define TAK_FRAME_HEADER_SAMPLE_COUNT_BITS
#define TAK_FRAME_HEADER_SYNC_ID_BITS
#define TAK_FRAME_DURATION_QUANT_SHIFT
#define TAK_FORMAT_VALID_BITS
static const uint8_t * align_get_bits(GetBitContext *s)
#define AV_CH_FRONT_RIGHT
int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size)
Parse the Streaminfo metadata block.
#define TAK_FORMAT_CHANNEL_BITS
static int tak_get_nb_samples(int sample_rate, enum TAKFrameSizeType type)
#define TAK_FORMAT_SAMPLE_RATE_BITS