Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fdk-aac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
fdk-aac
Commits
a00bd4cf
Commit
a00bd4cf
authored
Aug 13, 2012
by
Jean-Baptiste Queru
Committed by
android code review
Aug 13, 2012
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Don't try to shift more bits than the variable length"
parents
d2854e2a
65745694
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
libAACenc/src/quantize.cpp
libAACenc/src/quantize.cpp
+8
-2
No files found.
libAACenc/src/quantize.cpp
View file @
a00bd4cf
...
@@ -127,7 +127,10 @@ static void FDKaacEnc_quantizeLines(INT gain,
...
@@ -127,7 +127,10 @@ static void FDKaacEnc_quantizeLines(INT gain,
accu
=
fMultDiv2
(
FDKaacEnc_mTab_3_4
[
tabIndex
],
FDKaacEnc_quantTableE
[
totalShift
&
3
]);
accu
=
fMultDiv2
(
FDKaacEnc_mTab_3_4
[
tabIndex
],
FDKaacEnc_quantTableE
[
totalShift
&
3
]);
totalShift
=
(
16
-
4
)
-
(
3
*
(
totalShift
>>
2
));
totalShift
=
(
16
-
4
)
-
(
3
*
(
totalShift
>>
2
));
FDK_ASSERT
(
totalShift
>=
0
);
/* MAX_QUANT_VIOLATION */
FDK_ASSERT
(
totalShift
>=
0
);
/* MAX_QUANT_VIOLATION */
if
(
totalShift
<
32
)
accu
>>=
totalShift
;
accu
>>=
totalShift
;
else
accu
=
0
;
quaSpectrum
[
line
]
=
(
SHORT
)(
-
((
LONG
)(
k
+
accu
)
>>
(
DFRACT_BITS
-
1
-
16
)));
quaSpectrum
[
line
]
=
(
SHORT
)(
-
((
LONG
)(
k
+
accu
)
>>
(
DFRACT_BITS
-
1
-
16
)));
}
}
else
if
(
accu
>
FL2FXCONST_DBL
(
0.0
f
))
else
if
(
accu
>
FL2FXCONST_DBL
(
0.0
f
))
...
@@ -140,7 +143,10 @@ static void FDKaacEnc_quantizeLines(INT gain,
...
@@ -140,7 +143,10 @@ static void FDKaacEnc_quantizeLines(INT gain,
accu
=
fMultDiv2
(
FDKaacEnc_mTab_3_4
[
tabIndex
],
FDKaacEnc_quantTableE
[
totalShift
&
3
]);
accu
=
fMultDiv2
(
FDKaacEnc_mTab_3_4
[
tabIndex
],
FDKaacEnc_quantTableE
[
totalShift
&
3
]);
totalShift
=
(
16
-
4
)
-
(
3
*
(
totalShift
>>
2
));
totalShift
=
(
16
-
4
)
-
(
3
*
(
totalShift
>>
2
));
FDK_ASSERT
(
totalShift
>=
0
);
/* MAX_QUANT_VIOLATION */
FDK_ASSERT
(
totalShift
>=
0
);
/* MAX_QUANT_VIOLATION */
if
(
totalShift
<
32
)
accu
>>=
totalShift
;
accu
>>=
totalShift
;
else
accu
=
0
;
quaSpectrum
[
line
]
=
(
SHORT
)((
LONG
)(
k
+
accu
)
>>
(
DFRACT_BITS
-
1
-
16
));
quaSpectrum
[
line
]
=
(
SHORT
)((
LONG
)(
k
+
accu
)
>>
(
DFRACT_BITS
-
1
-
16
));
}
}
else
else
...
...
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