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
8123e19e
Commit
8123e19e
authored
Feb 15, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dcadec: Move remaining tables to dcadata.h
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1567ec43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
89 deletions
+89
-89
dcadata.h
libavcodec/dcadata.h
+89
-0
dcadec.c
libavcodec/dcadec.c
+0
-89
No files found.
libavcodec/dcadata.h
View file @
8123e19e
...
...
@@ -7663,6 +7663,95 @@ static const float dca_default_coeffs[10][6][2] = {
* where Ch(n) represents the subband samples in the (n)th audio channel.
*/
static
const
uint32_t
map_xxch_to_native
[
28
]
=
{
AV_CH_FRONT_CENTER
,
AV_CH_FRONT_LEFT
,
AV_CH_FRONT_RIGHT
,
AV_CH_SIDE_LEFT
,
AV_CH_SIDE_RIGHT
,
AV_CH_LOW_FREQUENCY
,
AV_CH_BACK_CENTER
,
AV_CH_BACK_LEFT
,
AV_CH_BACK_RIGHT
,
AV_CH_SIDE_LEFT
,
/* side surround left -- dup sur side L */
AV_CH_SIDE_RIGHT
,
/* side surround right -- dup sur side R */
AV_CH_FRONT_LEFT_OF_CENTER
,
AV_CH_FRONT_RIGHT_OF_CENTER
,
AV_CH_TOP_FRONT_LEFT
,
AV_CH_TOP_FRONT_CENTER
,
AV_CH_TOP_FRONT_RIGHT
,
AV_CH_LOW_FREQUENCY
,
/* lfe2 -- duplicate lfe1 position */
AV_CH_FRONT_LEFT_OF_CENTER
,
/* side front left -- dup front cntr L */
AV_CH_FRONT_RIGHT_OF_CENTER
,
/* side front right -- dup front cntr R */
AV_CH_TOP_CENTER
,
/* overhead */
AV_CH_TOP_FRONT_LEFT
,
/* side high left -- dup */
AV_CH_TOP_FRONT_RIGHT
,
/* side high right -- dup */
AV_CH_TOP_BACK_CENTER
,
AV_CH_TOP_BACK_LEFT
,
AV_CH_TOP_BACK_RIGHT
,
AV_CH_BACK_CENTER
,
/* rear low center -- dup */
AV_CH_BACK_LEFT
,
/* rear low left -- dup */
AV_CH_BACK_RIGHT
/* read low right -- dup */
};
/* -1 are reserved or unknown */
static
const
int
dca_ext_audio_descr_mask
[]
=
{
DCA_EXT_XCH
,
-
1
,
DCA_EXT_X96
,
DCA_EXT_XCH
|
DCA_EXT_X96
,
-
1
,
-
1
,
DCA_EXT_XXCH
,
-
1
,
};
/* Tables for mapping dts channel configurations to libavcodec multichannel api.
* Some compromises have been made for special configurations. Most configurations
* are never used so complete accuracy is not needed.
*
* L = left, R = right, C = center, S = surround, F = front, R = rear, T = total, OV = overhead.
* S -> side, when both rear and back are configured move one of them to the side channel
* OV -> center back
* All 2 channel configurations -> AV_CH_LAYOUT_STEREO
*/
static
const
uint64_t
dca_core_channel_layout
[]
=
{
AV_CH_FRONT_CENTER
,
///< 1, A
AV_CH_LAYOUT_STEREO
,
///< 2, A + B (dual mono)
AV_CH_LAYOUT_STEREO
,
///< 2, L + R (stereo)
AV_CH_LAYOUT_STEREO
,
///< 2, (L + R) + (L - R) (sum-difference)
AV_CH_LAYOUT_STEREO
,
///< 2, LT + RT (left and right total)
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
,
///< 3, C + L + R
AV_CH_LAYOUT_STEREO
|
AV_CH_BACK_CENTER
,
///< 3, L + R + S
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
|
AV_CH_BACK_CENTER
,
///< 4, C + L + R + S
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
,
///< 4, L + R + SL + SR
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
,
///< 5, C + L + R + SL + SR
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
|
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
,
///< 6, CL + CR + L + R + SL + SR
AV_CH_LAYOUT_STEREO
|
AV_CH_BACK_LEFT
|
AV_CH_BACK_RIGHT
|
AV_CH_FRONT_CENTER
|
AV_CH_BACK_CENTER
,
///< 6, C + L + R + LR + RR + OV
AV_CH_FRONT_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_BACK_CENTER
|
AV_CH_BACK_LEFT
|
AV_CH_BACK_RIGHT
,
///< 6, CF + CR + LF + RF + LR + RR
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
,
///< 7, CL + C + CR + L + R + SL + SR
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
|
AV_CH_BACK_LEFT
|
AV_CH_BACK_RIGHT
,
///< 8, CL + CR + L + R + SL1 + SL2 + SR1 + SR2
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_BACK_CENTER
|
AV_CH_SIDE_RIGHT
,
///< 8, CL + C + CR + L + R + SL + S + SR
};
static
const
int8_t
dca_lfe_index
[]
=
{
1
,
2
,
2
,
2
,
2
,
3
,
2
,
3
,
2
,
3
,
2
,
3
,
1
,
3
,
2
,
3
};
...
...
libavcodec/dcadec.c
View file @
8123e19e
...
...
@@ -98,95 +98,6 @@ enum DCAXxchSpeakerMask {
DCA_XXCH_REAR_LOW_RIGHT
=
0x8000000
,
};
static
const
uint32_t
map_xxch_to_native
[
28
]
=
{
AV_CH_FRONT_CENTER
,
AV_CH_FRONT_LEFT
,
AV_CH_FRONT_RIGHT
,
AV_CH_SIDE_LEFT
,
AV_CH_SIDE_RIGHT
,
AV_CH_LOW_FREQUENCY
,
AV_CH_BACK_CENTER
,
AV_CH_BACK_LEFT
,
AV_CH_BACK_RIGHT
,
AV_CH_SIDE_LEFT
,
/* side surround left -- dup sur side L */
AV_CH_SIDE_RIGHT
,
/* side surround right -- dup sur side R */
AV_CH_FRONT_LEFT_OF_CENTER
,
AV_CH_FRONT_RIGHT_OF_CENTER
,
AV_CH_TOP_FRONT_LEFT
,
AV_CH_TOP_FRONT_CENTER
,
AV_CH_TOP_FRONT_RIGHT
,
AV_CH_LOW_FREQUENCY
,
/* lfe2 -- duplicate lfe1 position */
AV_CH_FRONT_LEFT_OF_CENTER
,
/* side front left -- dup front cntr L */
AV_CH_FRONT_RIGHT_OF_CENTER
,
/* side front right -- dup front cntr R */
AV_CH_TOP_CENTER
,
/* overhead */
AV_CH_TOP_FRONT_LEFT
,
/* side high left -- dup */
AV_CH_TOP_FRONT_RIGHT
,
/* side high right -- dup */
AV_CH_TOP_BACK_CENTER
,
AV_CH_TOP_BACK_LEFT
,
AV_CH_TOP_BACK_RIGHT
,
AV_CH_BACK_CENTER
,
/* rear low center -- dup */
AV_CH_BACK_LEFT
,
/* rear low left -- dup */
AV_CH_BACK_RIGHT
/* read low right -- dup */
};
/* -1 are reserved or unknown */
static
const
int
dca_ext_audio_descr_mask
[]
=
{
DCA_EXT_XCH
,
-
1
,
DCA_EXT_X96
,
DCA_EXT_XCH
|
DCA_EXT_X96
,
-
1
,
-
1
,
DCA_EXT_XXCH
,
-
1
,
};
/* Tables for mapping dts channel configurations to libavcodec multichannel api.
* Some compromises have been made for special configurations. Most configurations
* are never used so complete accuracy is not needed.
*
* L = left, R = right, C = center, S = surround, F = front, R = rear, T = total, OV = overhead.
* S -> side, when both rear and back are configured move one of them to the side channel
* OV -> center back
* All 2 channel configurations -> AV_CH_LAYOUT_STEREO
*/
static
const
uint64_t
dca_core_channel_layout
[]
=
{
AV_CH_FRONT_CENTER
,
///< 1, A
AV_CH_LAYOUT_STEREO
,
///< 2, A + B (dual mono)
AV_CH_LAYOUT_STEREO
,
///< 2, L + R (stereo)
AV_CH_LAYOUT_STEREO
,
///< 2, (L + R) + (L - R) (sum-difference)
AV_CH_LAYOUT_STEREO
,
///< 2, LT + RT (left and right total)
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
,
///< 3, C + L + R
AV_CH_LAYOUT_STEREO
|
AV_CH_BACK_CENTER
,
///< 3, L + R + S
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
|
AV_CH_BACK_CENTER
,
///< 4, C + L + R + S
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
,
///< 4, L + R + SL + SR
AV_CH_LAYOUT_STEREO
|
AV_CH_FRONT_CENTER
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
,
///< 5, C + L + R + SL + SR
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
|
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
,
///< 6, CL + CR + L + R + SL + SR
AV_CH_LAYOUT_STEREO
|
AV_CH_BACK_LEFT
|
AV_CH_BACK_RIGHT
|
AV_CH_FRONT_CENTER
|
AV_CH_BACK_CENTER
,
///< 6, C + L + R + LR + RR + OV
AV_CH_FRONT_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_BACK_CENTER
|
AV_CH_BACK_LEFT
|
AV_CH_BACK_RIGHT
,
///< 6, CF + CR + LF + RF + LR + RR
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
,
///< 7, CL + C + CR + L + R + SL + SR
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_SIDE_RIGHT
|
AV_CH_BACK_LEFT
|
AV_CH_BACK_RIGHT
,
///< 8, CL + CR + L + R + SL1 + SL2 + SR1 + SR2
AV_CH_FRONT_LEFT_OF_CENTER
|
AV_CH_FRONT_CENTER
|
AV_CH_FRONT_RIGHT_OF_CENTER
|
AV_CH_LAYOUT_STEREO
|
AV_CH_SIDE_LEFT
|
AV_CH_BACK_CENTER
|
AV_CH_SIDE_RIGHT
,
///< 8, CL + C + CR + L + R + SL + S + SR
};
#define DCA_DOLBY 101
/* FIXME */
#define DCA_CHANNEL_BITS 6
...
...
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