FFmpeg
Functions | Variables
dca.c File Reference
#include <stdint.h>
#include <string.h>
#include "libavutil/error.h"
#include "dca.h"
#include "dca_core.h"
#include "dca_syncwords.h"
#include "get_bits.h"
#include "put_bits.h"

Go to the source code of this file.

Functions

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. More...
 
int ff_dca_parse_core_frame_header (DCACoreFrameHeader *h, GetBitContext *gb)
 Parse and validate core frame header. More...
 
int avpriv_dca_parse_core_frame_header (DCACoreFrameHeader *h, const uint8_t *buf, int size)
 Parse and validate core frame header. More...
 

Variables

const uint32_t ff_dca_sampling_freqs [16]
 
const uint8_t ff_dca_freq_ranges [16]
 
const uint8_t ff_dca_bits_per_sample [8]
 

Function Documentation

◆ avpriv_dca_convert_bitstream()

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.

Definition at line 49 of file dca.c.

Referenced by dca_parse_params(), dcadec_decode_frame(), and dts_probe().

◆ ff_dca_parse_core_frame_header()

int ff_dca_parse_core_frame_header ( DCACoreFrameHeader h,
GetBitContext gb 
)

Parse and validate core frame header.

Parameters
[out]hPointer to struct where header info is written.
[in]gbcBitContext containing the first 120 bits of the frame.
Returns
0 on success, negative DCA_PARSE_ERROR_ code on failure

Definition at line 86 of file dca.c.

Referenced by avpriv_dca_parse_core_frame_header(), and parse_frame_header().

◆ avpriv_dca_parse_core_frame_header()

int avpriv_dca_parse_core_frame_header ( DCACoreFrameHeader h,
const uint8_t *  buf,
int  size 
)

Parse and validate core frame header.

Parameters
[out]hPointer to struct where header info is written.
[in]bufPointer to the data buffer
[in]sizeSize of the data buffer
Returns
0 on success, negative AVERROR code on failure

Definition at line 144 of file dca.c.

Referenced by dca_parse_params(), and dts_probe().

Variable Documentation

◆ ff_dca_sampling_freqs

const uint32_t ff_dca_sampling_freqs[16]
Initial value:
= {
8000, 16000, 32000, 64000, 128000, 22050, 44100, 88200,
176400, 352800, 12000, 24000, 48000, 96000, 192000, 384000,
}

Definition at line 36 of file dca.c.

Referenced by chs_parse_header(), dca_parse_params(), parse_decoder_init(), and parse_descriptor().

◆ ff_dca_freq_ranges

const uint8_t ff_dca_freq_ranges[16]
Initial value:
= {
0, 1, 2, 3, 4, 1, 2, 3, 4, 4, 0, 1, 2, 3, 4, 4
}

Definition at line 41 of file dca.c.

Referenced by dca_parse_params(), and parse_decoder_init().

◆ ff_dca_bits_per_sample

const uint8_t ff_dca_bits_per_sample[8]
Initial value:
= {
16, 16, 20, 20, 0, 24, 24, 0
}

Definition at line 45 of file dca.c.

Referenced by ff_dca_parse_core_frame_header(), and parse_frame_header().