Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c766eb1c
Commit
c766eb1c
authored
Aug 09, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: add macros for option names to make them more understandable.
parent
9542ca9f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
76 deletions
+94
-76
ac3enc.c
libavcodec/ac3enc.c
+46
-45
ac3enc.h
libavcodec/ac3enc.h
+17
-0
ac3enc_opts_template.c
libavcodec/ac3enc_opts_template.c
+31
-31
No files found.
libavcodec/ac3enc.c
View file @
c766eb1c
This diff is collapsed.
Click to expand it.
libavcodec/ac3enc.h
View file @
c766eb1c
...
...
@@ -65,6 +65,23 @@ typedef int32_t CoefType;
typedef
int64_t
CoefSumType
;
#endif
/* common option values */
#define AC3ENC_OPT_NONE -1
#define AC3ENC_OPT_AUTO -1
#define AC3ENC_OPT_OFF 0
#define AC3ENC_OPT_ON 1
#define AC3ENC_OPT_NOT_INDICATED 0
#define AC3ENC_OPT_MODE_ON 1
#define AC3ENC_OPT_MODE_OFF 2
/* specific option values */
#define AC3ENC_OPT_LARGE_ROOM 1
#define AC3ENC_OPT_SMALL_ROOM 2
#define AC3ENC_OPT_DOWNMIX_LTRT 1
#define AC3ENC_OPT_DOWNMIX_LORO 2
#define AC3ENC_OPT_ADCONV_STANDARD 0
#define AC3ENC_OPT_ADCONV_HDCD 1
/**
* Encoding Options used by AVOption.
...
...
libavcodec/ac3enc_opts_template.c
View file @
c766eb1c
...
...
@@ -37,46 +37,46 @@ static const AVOption eac3_options[] = {
{
"surround_mixlev"
,
"Surround Mix Level"
,
OFFSET
(
surround_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
LEVEL_MINUS_6DB
},
0
.
0
,
1
.
0
,
AC3ENC_PARAM
},
#endif
/* audio production information */
{
"mixing_level"
,
"Mixing Level"
,
OFFSET
(
mixing_level
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
111
,
AC3ENC_PARAM
},
{
"room_type"
,
"Room Type"
,
OFFSET
(
room_type
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
2
,
AC3ENC_PARAM
,
"room_type"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"room_type"
},
{
"large"
,
"Large Room"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"room_type"
},
{
"small"
,
"Small Room"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
2
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"room_type"
},
{
"mixing_level"
,
"Mixing Level"
,
OFFSET
(
mixing_level
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
111
,
AC3ENC_PARAM
},
{
"room_type"
,
"Room Type"
,
OFFSET
(
room_type
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
AC3ENC_OPT_SMALL_ROOM
,
AC3ENC_PARAM
,
"room_type"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_NOT_INDICATED
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"room_type"
},
{
"large"
,
"Large Room"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_LARGE_ROOM
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"room_type"
},
{
"small"
,
"Small Room"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_SMALL_ROOM
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"room_type"
},
/* other metadata options */
{
"copyright"
,
"Copyright Bit"
,
OFFSET
(
copyright
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
1
,
AC3ENC_PARAM
},
{
"copyright"
,
"Copyright Bit"
,
OFFSET
(
copyright
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
1
,
AC3ENC_PARAM
},
{
"dialnorm"
,
"Dialogue Level (dB)"
,
OFFSET
(
dialogue_level
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
31
},
-
31
,
-
1
,
AC3ENC_PARAM
},
{
"dsur_mode"
,
"Dolby Surround Mode"
,
OFFSET
(
dolby_surround_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
2
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"on"
,
"Dolby Surround Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"off"
,
"Not Dolby Surround Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
2
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"original"
,
"Original Bit Stream"
,
OFFSET
(
original
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
1
,
AC3ENC_PARAM
},
{
"dsur_mode"
,
"Dolby Surround Mode"
,
OFFSET
(
dolby_surround_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
AC3ENC_OPT_MODE_OFF
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_NOT_INDICATED
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"on"
,
"Dolby Surround Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_MODE_ON
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"off"
,
"Not Dolby Surround Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_MODE_OFF
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsur_mode"
},
{
"original"
,
"Original Bit Stream"
,
OFFSET
(
original
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
1
,
AC3ENC_PARAM
},
/* extended bitstream information */
{
"dmix_mode"
,
"Preferred Stereo Downmix Mode"
,
OFFSET
(
preferred_stereo_downmix
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
2
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"ltrt"
,
"Lt/Rt Downmix Preferred"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"loro"
,
"Lo/Ro Downmix Preferred"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
2
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"dmix_mode"
,
"Preferred Stereo Downmix Mode"
,
OFFSET
(
preferred_stereo_downmix
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
AC3ENC_OPT_DOWNMIX_LORO
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_NOT_INDICATED
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"ltrt"
,
"Lt/Rt Downmix Preferred"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_DOWNMIX_LTRT
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"loro"
,
"Lo/Ro Downmix Preferred"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_DOWNMIX_LORO
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dmix_mode"
},
{
"ltrt_cmixlev"
,
"Lt/Rt Center Mix Level"
,
OFFSET
(
ltrt_center_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
AC3ENC_PARAM
},
{
"ltrt_surmixlev"
,
"Lt/Rt Surround Mix Level"
,
OFFSET
(
ltrt_surround_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
AC3ENC_PARAM
},
{
"loro_cmixlev"
,
"Lo/Ro Center Mix Level"
,
OFFSET
(
loro_center_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
AC3ENC_PARAM
},
{
"loro_surmixlev"
,
"Lo/Ro Surround Mix Level"
,
OFFSET
(
loro_surround_mix_level
),
FF_OPT_TYPE_FLOAT
,
{.
dbl
=
-
1
.
0
},
-
1
.
0
,
2
.
0
,
AC3ENC_PARAM
},
{
"dsurex_mode"
,
"Dolby Surround EX Mode"
,
OFFSET
(
dolby_surround_ex_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
2
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"on"
,
"Dolby Surround EX Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"off"
,
"Not Dolby Surround EX Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
2
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"dheadphone_mode"
,
"Dolby Headphone Mode"
,
OFFSET
(
dolby_headphone_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
2
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"on"
,
"Dolby Headphone Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"off"
,
"Not Dolby Headphone Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
2
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"ad_conv_type"
,
"A/D Converter Type"
,
OFFSET
(
ad_converter_type
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
1
,
AC3ENC_PARAM
,
"ad_conv_type"
},
{
"standard"
,
"Standard (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
0
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"ad_conv_type"
},
{
"hdcd"
,
"HDCD"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"ad_conv_type"
},
{
"dsurex_mode"
,
"Dolby Surround EX Mode"
,
OFFSET
(
dolby_surround_ex_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
AC3ENC_OPT_MODE_OFF
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_NOT_INDICATED
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"on"
,
"Dolby Surround EX Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_MODE_ON
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"off"
,
"Not Dolby Surround EX Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_MODE_OFF
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dsurex_mode"
},
{
"dheadphone_mode"
,
"Dolby Headphone Mode"
,
OFFSET
(
dolby_headphone_mode
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
AC3ENC_OPT_MODE_OFF
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"notindicated"
,
"Not Indicated (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_NOT_INDICATED
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"on"
,
"Dolby Headphone Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_MODE_ON
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"off"
,
"Not Dolby Headphone Encoded"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_MODE_OFF
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"dheadphone_mode"
},
{
"ad_conv_type"
,
"A/D Converter Type"
,
OFFSET
(
ad_converter_type
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_NONE
},
AC3ENC_OPT_NONE
,
AC3ENC_OPT_ADCONV_HDCD
,
AC3ENC_PARAM
,
"ad_conv_type"
},
{
"standard"
,
"Standard (default)"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_ADCONV_STANDARD
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"ad_conv_type"
},
{
"hdcd"
,
"HDCD"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_ADCONV_HDCD
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"ad_conv_type"
},
/* Other Encoding Options */
{
"stereo_rematrixing"
,
"Stereo Rematrixing"
,
OFFSET
(
stereo_rematrixing
),
FF_OPT_TYPE_INT
,
{.
dbl
=
1
},
0
,
1
,
AC3ENC_PARAM
},
{
"stereo_rematrixing"
,
"Stereo Rematrixing"
,
OFFSET
(
stereo_rematrixing
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_ON
},
AC3ENC_OPT_OFF
,
AC3ENC_OPT_ON
,
AC3ENC_PARAM
},
#if AC3ENC_TYPE != AC3ENC_TYPE_AC3_FIXED
{
"channel_coupling"
,
"Channel Coupling"
,
OFFSET
(
channel_coupling
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
1
,
AC3ENC_PARAM
,
"channel_coupling"
},
{
"auto"
,
"Selected by the Encoder"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
-
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"channel_coupling"
},
{
"cpl_start_band"
,
"Coupling Start Band"
,
OFFSET
(
cpl_start
),
FF_OPT_TYPE_INT
,
{.
dbl
=
-
1
},
-
1
,
15
,
AC3ENC_PARAM
,
"cpl_start_band"
},
{
"auto"
,
"Selected by the Encoder"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
-
1
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"cpl_start_band"
},
{
"channel_coupling"
,
"Channel Coupling"
,
OFFSET
(
channel_coupling
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_AUTO
},
AC3ENC_OPT_AUTO
,
AC3ENC_OPT_ON
,
AC3ENC_PARAM
,
"channel_coupling"
},
{
"auto"
,
"Selected by the Encoder"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_AUTO
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"channel_coupling"
},
{
"cpl_start_band"
,
"Coupling Start Band"
,
OFFSET
(
cpl_start
),
FF_OPT_TYPE_INT
,
{.
dbl
=
AC3ENC_OPT_AUTO
},
AC3ENC_OPT_AUTO
,
15
,
AC3ENC_PARAM
,
"cpl_start_band"
},
{
"auto"
,
"Selected by the Encoder"
,
0
,
FF_OPT_TYPE_CONST
,
{.
dbl
=
AC3ENC_OPT_AUTO
},
INT_MIN
,
INT_MAX
,
AC3ENC_PARAM
,
"cpl_start_band"
},
#endif
{
NULL
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment