mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-06-05 22:39:13 +02:00
Do schur_div with a direct 64 bit division instead of a loop on x86
This speeds up HE-AACv2 encoding from 3.85 s to 3.42 s on a Core i7.
This commit is contained in:
committed by
Martin Storsjo
parent
50b1de17ac
commit
923f3e95f3
@@ -443,6 +443,15 @@ FIXP_DBL sqrtFixp(FIXP_DBL op)
|
|||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#if defined(__x86__)
|
||||||
|
FIXP_DBL schur_div(FIXP_DBL num, FIXP_DBL denum, INT count)
|
||||||
|
{
|
||||||
|
INT64 tmp=(INT64)num<<31;
|
||||||
|
LONG div=(tmp/denum)>>(DFRACT_BITS-count);
|
||||||
|
return (FIXP_DBL)(div) << (DFRACT_BITS-count);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
FIXP_DBL schur_div(FIXP_DBL num, FIXP_DBL denum, INT count)
|
FIXP_DBL schur_div(FIXP_DBL num, FIXP_DBL denum, INT count)
|
||||||
{
|
{
|
||||||
@@ -469,6 +478,7 @@ FIXP_DBL schur_div(FIXP_DBL num, FIXP_DBL denum, INT count)
|
|||||||
return (FIXP_DBL)(div << (DFRACT_BITS - count));
|
return (FIXP_DBL)(div << (DFRACT_BITS - count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* !defined(FUNCTION_schur_div) */
|
#endif /* !defined(FUNCTION_schur_div) */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user