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
4e4dbb99
Commit
4e4dbb99
authored
May 23, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dcadec: fix xxch_dmix_coeff and xxch_dmix_sf after merge
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c867be03
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
dcadec.c
libavcodec/dcadec.c
+6
-6
No files found.
libavcodec/dcadec.c
View file @
4e4dbb99
...
...
@@ -478,6 +478,8 @@ typedef struct {
FmtConvertContext
fmt_conv
;
}
DCAContext
;
static
float
dca_dmix_code
(
unsigned
code
);
static
const
uint16_t
dca_vlc_offs
[]
=
{
0
,
512
,
640
,
768
,
1282
,
1794
,
2436
,
3080
,
3770
,
4454
,
5364
,
5372
,
5380
,
5388
,
5392
,
5396
,
5412
,
5420
,
5428
,
5460
,
5492
,
5508
,
...
...
@@ -568,7 +570,7 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
static
const
int
bitlen
[
11
]
=
{
0
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
3
};
static
const
int
thr
[
11
]
=
{
0
,
1
,
3
,
3
,
3
,
3
,
7
,
7
,
7
,
7
,
7
};
int
hdr_pos
=
0
,
hdr_size
=
0
;
float
s
ign
,
mag
,
s
cale_factor
;
float
scale_factor
;
int
this_chans
,
acc_mask
;
int
embedded_downmix
;
int
nchans
,
mask
[
8
];
...
...
@@ -598,8 +600,8 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
/* check for downmixing information */
if
(
get_bits1
(
&
s
->
gb
))
{
embedded_downmix
=
get_bits1
(
&
s
->
gb
);
scale_factor
=
1
.
0
f
/
dca_dmixtable
[(
get_bits
(
&
s
->
gb
,
6
)
-
1
)
<<
2
]
;
coeff
=
get_bits
(
&
s
->
gb
,
6
);
scale_factor
=
-
1
.
0
f
/
dca_dmix_code
(
FFMAX
(
coeff
<<
2
,
4
)
-
3
)
;
s
->
xxch_dmix_sf
[
s
->
xxch_chset
]
=
scale_factor
;
...
...
@@ -619,10 +621,8 @@ static int dca_parse_audio_coding_header(DCAContext *s, int base_channel,
}
coeff
=
get_bits
(
&
s
->
gb
,
7
);
sign
=
(
coeff
&
64
)
?
1
.
0
:
-
1
.
0
;
mag
=
dca_dmixtable
[((
coeff
&
63
)
-
1
)
<<
2
];
ichan
=
dca_xxch2index
(
s
,
1
<<
i
);
s
->
xxch_dmix_coeff
[
j
][
ichan
]
=
sign
*
mag
;
s
->
xxch_dmix_coeff
[
j
][
ichan
]
=
dca_dmix_code
(
FFMAX
(
coeff
<<
2
,
3
)
-
3
)
;
}
}
}
...
...
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