#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
|
| enum | bebf_aot_t {
AOT_AAC_MAIN = 1,
AOT_AAC_LC = 2,
AOT_AAC_SSR = 3,
AOT_AAC_LTP = 4,
AOT_SBR = 5,
AOT_AAC_SCALABLE = 6,
AOT_TWINVQ = 7,
AOT_CELP = 8,
AOT_HVXC = 9,
AOT_ER_AAC_LC = 17,
AOT_ER_AAC_LTP = 19,
AOT_ER_AAC_SCALABLE = 20,
AOT_ER_TWINVQ = 21,
AOT_ER_BSAC = 22,
AOT_ER_AAC_LD = 23,
AOT_ER_CELP = 24,
AOT_ER_HVXC = 25,
AOT_ER_HILN = 26,
AOT_ER_PARAM = 27,
AOT_SSC = 28,
AOT_PS = 29,
AOT_L1 = 32,
AOT_L2 = 33,
AOT_L3 = 34,
AOT_ALS = 36,
AOT_ER_AAC_ELD = 39
} |
| |
| enum | bebf_latm_parser_status_t {
BEBF_LATM_NEED_MORE_DATA,
BEBF_LATM_IS_RAW,
BEBF_LATM_IS_ADTS,
BEBF_LATM_IS_LATM,
BEBF_LATM_IS_UNKNOWN
} |
| |
|
| static void | bebf_seek (bebf_t *bebf, uint32_t nbits) |
| |
| static void | bebf_align (bebf_t *bebf) |
| |
| static void | bebf_set_read (bebf_t *bebf, const uint8_t *rp, uint32_t nbytes) |
| |
| static void | bebf_set_write (bebf_t *bebf, uint8_t *wp) |
| |
| static uint32_t | bebf_get (bebf_t *bebf, uint32_t nbits) |
| |
| static uint32_t | bebf_sniff (bebf_t *bebf, uint32_t nbits) |
| |
| static void | bebf_skip (bebf_t *bebf, uint32_t nbits) |
| |
| static uint32_t | bebf_tell (bebf_t *bebf) |
| |
| static int | bebf_sync (bebf_t *bebf, uint32_t pattern, uint32_t pbits) |
| |
| static void | bebf_put (bebf_t *bebf, uint32_t bits, uint32_t nbits) |
| |
| static size_t | bebf_flush (bebf_t *bebf) |
| |
| static void | bebf_copy (bebf_t *bebf, uint32_t nbits) |
| |
| static int | bebf_latm_configure (bebf_latm_t *latm, uint32_t nbits) |
| |
| static int | bebf_latm_demux (bebf_latm_t *latm, const uint8_t *in, uint32_t nbytes) |
| |
| static void | bebf_latm_open (bebf_latm_t *latm) |
| |
| static void | bebf_latm_close (bebf_latm_t *latm) |
| |
| static bebf_latm_parser_status_t | bebf_latm_test (const uint8_t *in, int nbytes) |
| |
| static int | bebf_latm_parse (bebf_latm_t *latm, const uint8_t *in, int *nbytes) |
| |
◆ AOTF_CHAN
| #define AOTF_CHAN 0x0010 /* custom channel layout */ |
◆ AOTF_CORE
| #define AOTF_CORE 0x0002 /* dependsOnCoreCoder */ |
◆ AOTF_ELD
| #define AOTF_ELD 0x0100 /* enhancedLowDelay */ |
◆ AOTF_EPCNF
| #define AOTF_EPCNF 0x0200 /* epConfig */ |
◆ AOTF_EXT1
| #define AOTF_EXT1 0x0004 /* extensionFlag1 */ |
◆ AOTF_LAYER
| #define AOTF_LAYER 0x0008 /* layerNr */ |
◆ AOTF_LDSBR
| #define AOTF_LDSBR 0x0080 /* lowDelaySbr */ |
◆ AOTF_RESIL
| #define AOTF_RESIL 0x0040 /* errorResilienceFlags */ |
◆ AOTF_SHORT
| #define AOTF_SHORT 0x0001 /* frameLengthFlag */ |
◆ AOTF_SUBFR
| #define AOTF_SUBFR 0x0020 /* subFrames */ |
◆ bebf_ADJ32
| #define bebf_ADJ32 |
( |
|
v | ) |
(((v) >> 24) | (((v) & 0xff0000) >> 8) | (((v) & 0xff00) << 8) | ((v) << 24)) |
◆ BEBF_LATM_GOT_CONF
| #define BEBF_LATM_GOT_CONF 1 |
◆ BEBF_LATM_GOT_FRAME
| #define BEBF_LATM_GOT_FRAME 2 |
◆ bebf_shift
Value: { \
uint64_t b = bebf->readcache; \
bebf->readcache = b; \
}
◆ BEBF_TEST_MAX
| #define BEBF_TEST_MAX (2 * (0x1fff + 3)) |
◆ bebf_UNUSED
◆ LOG_MODULE
| #define LOG_MODULE "latm" |
◆ LOG_VERBOSE
◆ bebf_aot_t
| Enumerator |
|---|
| AOT_AAC_MAIN | |
| AOT_AAC_LC | |
| AOT_AAC_SSR | |
| AOT_AAC_LTP | |
| AOT_SBR | |
| AOT_AAC_SCALABLE | |
| AOT_TWINVQ | |
| AOT_CELP | |
| AOT_HVXC | |
| AOT_ER_AAC_LC | |
| AOT_ER_AAC_LTP | |
| AOT_ER_AAC_SCALABLE | |
| AOT_ER_TWINVQ | |
| AOT_ER_BSAC | |
| AOT_ER_AAC_LD | |
| AOT_ER_CELP | |
| AOT_ER_HVXC | |
| AOT_ER_HILN | |
| AOT_ER_PARAM | |
| AOT_SSC | |
| AOT_PS | |
| AOT_L1 | |
| AOT_L2 | |
| AOT_L3 | |
| AOT_ALS | |
| AOT_ER_AAC_ELD | |
◆ bebf_latm_parser_status_t
| Enumerator |
|---|
| BEBF_LATM_NEED_MORE_DATA | |
| BEBF_LATM_IS_RAW | |
| BEBF_LATM_IS_ADTS | |
| BEBF_LATM_IS_LATM | |
| BEBF_LATM_IS_UNKNOWN | |
◆ bebf_align()
| static void bebf_align |
( |
bebf_t * |
bebf | ) |
|
|
static |
◆ bebf_copy()
| static void bebf_copy |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
◆ bebf_flush()
| static size_t bebf_flush |
( |
bebf_t * |
bebf | ) |
|
|
static |
◆ bebf_get()
| static uint32_t bebf_get |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
◆ bebf_latm_close()
◆ bebf_latm_configure()
| static int bebf_latm_configure |
( |
bebf_latm_t * |
latm, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
Parse and export AAC configuration data.
- Parameters
-
| latm | pointer to bebf_latm_t struct. |
| nbits | count of input bits or 0. |
- Returns
- BEBF_LATM_GOT_CONF or 0.
References AOT_AAC_LC, AOT_ALS, AOT_ER_BSAC, AOT_PS, AOT_SBR, AOTF_CHAN, AOTF_CORE, AOTF_ELD, AOTF_EPCNF, AOTF_EXT1, AOTF_LAYER, AOTF_LDSBR, AOTF_RESIL, AOTF_SHORT, AOTF_SUBFR, bebf_latm_t::bebf, bebf_align(), bebf_copy(), bebf_flush(), bebf_get(), bebf_latm_flags, BEBF_LATM_GOT_CONF, bebf_seek(), bebf_set_write(), bebf_skip(), bebf_sniff(), bebf_tell(), bebf_latm_t::channel_conf, bebf_latm_t::channel_conf2, bebf_latm_t::confbuflen, bebf_latm_t::config, bebf_latm_t::conflen, bebf_latm_t::numchannels, bebf_latm_t::object_type, bebf_latm_t::object_type2, bebf_latm_t::ps, bebf_latm_t::samplerate, bebf_latm_t::samplerate2, bebf_latm_t::samplerate_index, bebf_latm_t::samplerate_index2, bebf_latm_t::samples, and bebf_latm_t::sbr.
Referenced by bebf_latm_demux().
◆ bebf_latm_demux()
| static int bebf_latm_demux |
( |
bebf_latm_t * |
latm, |
|
|
const uint8_t * |
in, |
|
|
uint32_t |
nbytes |
|
) |
| |
|
static |
Demultiplex 1 LATM packet.
- Parameters
-
| latm | pointer to bebf_latm_t struct. |
| in | pointer to packet. |
| nbytes | byte length of packet. |
- Returns
- BEBF_LATM_GOT_* flags.
References bebf_latm_t::bebf, bebf_copy(), bebf_flush(), bebf_get(), bebf_latm_configure(), BEBF_LATM_GOT_FRAME, bebf_set_read(), bebf_set_write(), bebf_skip(), bebf_tell(), bebf_latm_t::conflen, bebf_latm_t::fbuflen, bebf_latm_t::frame, bebf_latm_t::frame_len, bebf_latm_t::frame_len_type, bebf_latm_t::framelen, and bebf_latm_t::version.
Referenced by bebf_latm_parse().
◆ bebf_latm_open()
◆ bebf_latm_parse()
| static int bebf_latm_parse |
( |
bebf_latm_t * |
latm, |
|
|
const uint8_t * |
in, |
|
|
int * |
nbytes |
|
) |
| |
|
static |
Parse and demux LATM.
- Parameters
-
| latm | pointer to bebf_latm_t struct. |
| in | pointer to input data. |
| nbytes | pointer to byte count, will be adjusted to consumed. |
- Returns
- BEBF_LATM_GOT_* flags.
References bebf_latm_demux().
Referenced by faad_decode_audio().
◆ bebf_latm_test()
◆ bebf_put()
| static void bebf_put |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
bits, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
◆ bebf_seek()
| static void bebf_seek |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
◆ bebf_set_read()
| static void bebf_set_read |
( |
bebf_t * |
bebf, |
|
|
const uint8_t * |
rp, |
|
|
uint32_t |
nbytes |
|
) |
| |
|
static |
◆ bebf_set_write()
| static void bebf_set_write |
( |
bebf_t * |
bebf, |
|
|
uint8_t * |
wp |
|
) |
| |
|
static |
◆ bebf_skip()
| static void bebf_skip |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
◆ bebf_sniff()
| static uint32_t bebf_sniff |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
nbits |
|
) |
| |
|
static |
◆ bebf_sync()
| static int bebf_sync |
( |
bebf_t * |
bebf, |
|
|
uint32_t |
pattern, |
|
|
uint32_t |
pbits |
|
) |
| |
|
static |
◆ bebf_tell()
| static uint32_t bebf_tell |
( |
bebf_t * |
bebf | ) |
|
|
static |
◆ bebf_latm_flags
| const uint32_t bebf_latm_flags[40] |
|
static |