22 #ifndef AVCODEC_CODEC2UTILS_H
23 #define AVCODEC_CODEC2UTILS_H
30 #define AVPRIV_CODEC2_MODE_MAX 8 //CODEC2_MODE_700C
36 #define AVPRIV_CODEC2_AVOPTIONS(desc, classname, min_val, default_val, option_flags) \
37 { "mode", desc, offsetof(classname, mode), AV_OPT_TYPE_INT, {.i64 = default_val}, min_val, AVPRIV_CODEC2_MODE_MAX, .flags=option_flags, .unit="codec2_mode"},\
38 { "3200", "3200", 0, AV_OPT_TYPE_CONST, {.i64 = 0}, .flags=option_flags, .unit="codec2_mode"},\
39 { "2400", "2400", 0, AV_OPT_TYPE_CONST, {.i64 = 1}, .flags=option_flags, .unit="codec2_mode"},\
40 { "1600", "1600", 0, AV_OPT_TYPE_CONST, {.i64 = 2}, .flags=option_flags, .unit="codec2_mode"},\
41 { "1400", "1400", 0, AV_OPT_TYPE_CONST, {.i64 = 3}, .flags=option_flags, .unit="codec2_mode"},\
42 { "1300", "1300", 0, AV_OPT_TYPE_CONST, {.i64 = 4}, .flags=option_flags, .unit="codec2_mode"},\
43 { "1200", "1200", 0, AV_OPT_TYPE_CONST, {.i64 = 5}, .flags=option_flags, .unit="codec2_mode"},\
44 { "700", "700", 0, AV_OPT_TYPE_CONST, {.i64 = 6}, .flags=option_flags, .unit="codec2_mode"},\
45 { "700B", "700B", 0, AV_OPT_TYPE_CONST, {.i64 = 7}, .flags=option_flags, .unit="codec2_mode"},\
46 { "700C", "700C", 0, AV_OPT_TYPE_CONST, {.i64 = 8}, .flags=option_flags, .unit="codec2_mode"}
62 #define AVPRIV_CODEC2_EXTRADATA_SIZE 4
75 return (ptr[0] << 8) + ptr[1];
static uint8_t avpriv_codec2_mode_from_extradata(uint8_t *ptr)
int avpriv_codec2_mode_block_align(void *logctx, int mode)
int avpriv_codec2_mode_frame_size(void *logctx, int mode)
int avpriv_codec2_mode_bit_rate(void *logctx, int mode)
static uint16_t avpriv_codec2_version_from_extradata(uint8_t *ptr)
static void avpriv_codec2_make_extradata(uint8_t *ptr, int mode)
mode
Use these values in ebur128_init (or'ed).