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
a0d17b6d
Commit
a0d17b6d
authored
Aug 07, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: scale floating-point coupling channel coefficients in
scale_coefficients() rather than in apply_channel_coupling()
parent
3e5722a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
ac3enc_float.c
libavcodec/ac3enc_float.c
+4
-3
ac3enc_template.c
libavcodec/ac3enc_template.c
+0
-4
No files found.
libavcodec/ac3enc_float.c
View file @
a0d17b6d
...
...
@@ -104,9 +104,10 @@ static int normalize_samples(AC3EncodeContext *s)
static
void
scale_coefficients
(
AC3EncodeContext
*
s
)
{
int
chan_size
=
AC3_MAX_COEFS
*
s
->
num_blocks
;
s
->
ac3dsp
.
float_to_fixed24
(
s
->
fixed_coef_buffer
+
chan_size
,
s
->
mdct_coef_buffer
+
chan_size
,
chan_size
*
s
->
channels
);
int
cpl
=
s
->
cpl_on
;
s
->
ac3dsp
.
float_to_fixed24
(
s
->
fixed_coef_buffer
+
(
chan_size
*
!
cpl
),
s
->
mdct_coef_buffer
+
(
chan_size
*
!
cpl
),
chan_size
*
(
s
->
channels
+
cpl
));
}
...
...
libavcodec/ac3enc_template.c
View file @
a0d17b6d
...
...
@@ -168,10 +168,6 @@ static void apply_channel_coupling(AC3EncodeContext *s)
/* coefficients must be clipped in order to be encoded */
clip_coefficients
(
&
s
->
dsp
,
cpl_coef
,
num_cpl_coefs
);
/* scale coupling coefficients from float to 24-bit fixed-point */
s
->
ac3dsp
.
float_to_fixed24
(
&
block
->
fixed_coef
[
CPL_CH
][
cpl_start
],
cpl_coef
,
num_cpl_coefs
);
}
/* calculate energy in each band in coupling channel and each fbw channel */
...
...
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