Michael Niedermayer
33775c3507
search_for_quantizers_faac: fix curband
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
0f96f0d996
aacenc: Fix issues with huge values of bit_rate.
...
Do not pointlessly call ff_alloc_packet multiple times,
and fix an infinite loop by clamping the maximum
number of bits to target in the algorithm that does
not use lambda.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
13 years ago
Reimar Döffinger
ecd7455e96
aacenc: Fix issues with huge values of bit_rate.
...
Do not pointlessly call ff_alloc_packet2 multiple times,
and fix an infinite loop by clamping the maximum
number of bits to target in the algorithm that does
not use lambda.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Nathan Caldwell
80d44277e6
aacenc: Move Q^3/4 calculation to it's own table
...
This should be moved to tablegen at some point.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
207bf44d16
aacenc: cosmetics, replace 'rd' with 'bits' in codebook_trellis_rate to make it more clear what is being calculated.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Michael Niedermayer
1b1223872d
aacenc: add AAC_CODER_NB
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
85770d6e56
Add libavutil/mathematics.h #includes for INFINITY
...
This fixes build errors in some environments.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Nathan Caldwell
0bc01cc9fe
psymodel: Add channels and channel groups to the psymodel.
14 years ago
Alex Converse
8dbaa5bd69
aacenc: Fix codebook trellising for zeroed bands.
...
Choose band type (codebook) zero, count its bits, and mark the other
states as unnavigable.
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Reinhard Tartler
083e715f33
aac: workaround for compilation on cygwin
...
On cygwin, math.h needs to be included before float.h because of a bug
in the system headers. Including libavutil/libm.h first works around
this issue.
Longer discussion of the topic:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/128582
14 years ago
Alex Converse
d70fa4c423
Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
...
of hardcoding 200 everywhere.
14 years ago
Michael Niedermayer
30fe971934
aac: add headers needed for log2f()
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Michael Niedermayer
3d462373f8
aac: add math.h needed for log2f()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Young Han Lee
57cc1ad35f
aacenc: reduce the number of loop index variables
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
14 years ago
Young Han Lee
00f0b4b92e
aacenc: indentation
14 years ago
Young Han Lee
92efa2bdd9
aacenc: fix the side calculation in search_for_ms
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Nathan Caldwell
4afedfd8e5
aacenc: cosmetics, indentation, and comment clarification
...
Correct bad indentation in aaccoder
Clarify and correct comments in 3GPP psymodel, other cosmetics.
14 years ago
Young Han Lee
f578854efc
aaccoder: Change FFMAX for allzero flag to OR bit operation
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Alex Converse
63e1278d88
aacenc: TLS: Save maximum values for each swb in a table.
...
This gives an almost 20% speedup.
Originally committed as revision 24484 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
031d5cea04
10l: Remove some commented out code that slipped in.
...
Originally committed as revision 24483 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
fe461767e6
aacenc: TLS: Try to preserve some energy in each non-zero band.
...
Reduce scalefactors in non-zero bands that underflow by twice as much as those
in bands that just fail to hit psy targets.
Originally committed as revision 24482 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
c226fc5bfb
aacenc: Prevent premature termination of the two loop search.
...
Originally committed as revision 24476 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
51ffd3a62f
aacenc: Favor log2f() and sqrtf() over log2() and sqrt().
...
Originally committed as revision 24473 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
04d72abf17
aacenc: Factorize some scalefactor utilities.
...
Originally committed as revision 24472 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
581a96976b
aacenc: Convert if () abort() to assert().
...
Originally committed as revision 24336 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
6d9f1b67e8
Cosmetics: Whitespace
...
Originally committed as revision 24333 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
a2310d1e41
10l: Add a missing const.
...
Originally committed as revision 24274 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
1676b09994
aacenc: Template quantize_and_encode_band_cost().
...
Originally committed as revision 24273 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
804d489c4a
aacenc: Fill in the estimated codebook for the final computed scalefactor in the TLS.
...
Originally committed as revision 23869 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
c91dce994d
aacenc: Remove an unnecessary division from the TLS.
...
Originally committed as revision 23368 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
911fbc452b
Cosmetics: whitespace
...
Originally committed as revision 23367 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
04d6a54e13
aacenc: Remove unnecessary variables and scopes in the TLS.
...
Originally committed as revision 23366 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
9069b7d35f
Fix declaration after statement
...
Originally committed as revision 23331 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
0ecfa7b7c7
aacenc: Split find_max_val() from find_min_book() to eliminate duplicate searches.
...
Originally committed as revision 23322 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
af2ee6fc49
Remove useless costly inf checks from the trellis scalefactor search.
...
Originally committed as revision 23319 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
acc9f51fe1
aacenc: Trellis over scalefactors using an estimated codebook rather than every codebook.
...
The minimal codebook to encode the band without clipping is used (as is done in the TLS).
Originally committed as revision 23318 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
144c5e3dd2
aacenc: Only trellis over a column of 61 scalefactors (reduced from 256).
...
This still provides plenty of dynamic range, makes every move legal, and greatly reduces the search space.
Originally committed as revision 23317 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
05e659ef83
aacenc: Factor out find_min_book so it can be used by multiple coefficient coders.
...
Originally committed as revision 23316 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
0175d7886f
fmaxf -> FFMAX to fix pre-C99 systems
...
Originally committed as revision 23138 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
759510e6af
aacenc: Add a rate only trellis for codebook selection for the TLS.
...
Originally committed as revision 23136 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
4d986b7172
aacenc: Use exact values when quantizing, not fuzzy values.
...
This requires us to code small escapes; we can't avoid it.
Originally committed as revision 23135 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
51cbabc792
aacenc: Use an estimated codebook for the TLS (two loop search).
...
Originally committed as revision 23134 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
46174079c9
10l: store the result of clipping added in r23035
...
Originally committed as revision 23037 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
32fa7725d2
Make the faac inspired quantizer search make sense for a slightly narrower definition of "make sense."
...
Originally committed as revision 23035 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
508f092a78
aacenc: Merge quantize_band_cost() with quantize_and_encode_band().
...
If these two functions aren't matched results may be unexpected.
Originally committed as revision 22655 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Alex Converse
f5e82fec3d
aacenc: Use preprocessor constants for trellis states and stages.
...
Originally committed as revision 19948 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago