FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 avpriv_dca_sample_rates [16]
 
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

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 54 of file dca.c.

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

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 91 of file dca.c.

Referenced by avpriv_dca_parse_core_frame_header(), and parse_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 149 of file dca.c.

Referenced by dca_parse_params(), and dts_probe().

Variable Documentation

const uint32_t avpriv_dca_sample_rates[16]
Initial value:
= {
0, 8000, 16000, 32000, 0, 0, 11025, 22050, 44100, 0, 0,
12000, 24000, 48000, 96000, 192000
}

Definition at line 36 of file dca.c.

Referenced by dca_parse_params(), ff_dca_parse_core_frame_header(), parse_frame_header(), and spdif_header_dts().

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 41 of file dca.c.

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

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 46 of file dca.c.

Referenced by dca_parse_params(), and parse_decoder_init().

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

Definition at line 50 of file dca.c.

Referenced by ff_dca_parse_core_frame_header(), and parse_frame_header().