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
67fc32ac
Commit
67fc32ac
authored
Mar 08, 2011
by
Justin Ruggles
Committed by
Michael Niedermayer
Mar 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ac3enc: use MUL64() to multiply fixed-point coefficients
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
76d4c167
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
ac3enc.c
libavcodec/ac3enc.c
+4
-4
ac3enc_fixed.h
libavcodec/ac3enc_fixed.h
+2
-0
ac3enc_float.h
libavcodec/ac3enc_float.h
+2
-0
No files found.
libavcodec/ac3enc.c
View file @
67fc32ac
...
...
@@ -328,10 +328,10 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
CoefType
rt
=
block
->
mdct_coef
[
1
][
i
];
CoefType
md
=
lt
+
rt
;
CoefType
sd
=
lt
-
rt
;
sum
[
0
]
+=
lt
*
lt
;
sum
[
1
]
+=
rt
*
rt
;
sum
[
2
]
+=
md
*
md
;
sum
[
3
]
+=
sd
*
sd
;
sum
[
0
]
+=
MUL_COEF
(
lt
,
lt
)
;
sum
[
1
]
+=
MUL_COEF
(
rt
,
rt
)
;
sum
[
2
]
+=
MUL_COEF
(
md
,
md
)
;
sum
[
3
]
+=
MUL_COEF
(
sd
,
sd
)
;
}
/* compare sums to determine if rematrixing will be used for this band */
...
...
libavcodec/ac3enc_fixed.h
View file @
67fc32ac
...
...
@@ -36,6 +36,8 @@ typedef int16_t SampleType;
typedef
int32_t
CoefType
;
typedef
int64_t
CoefSumType
;
#define MUL_COEF(a,b) MUL64(a,b)
/**
* Compex number.
...
...
libavcodec/ac3enc_float.h
View file @
67fc32ac
...
...
@@ -36,6 +36,8 @@ typedef float SampleType;
typedef
float
CoefType
;
typedef
float
CoefSumType
;
#define MUL_COEF(a,b) ((a)*(b))
typedef
struct
AC3MDCTContext
{
const
float
*
window
;
///< MDCT window function
...
...
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