Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
e484265c97
aacenc: Mark deinterleave_input_samples argument as const.
...
This fixes the warning:
libavcodec/aacenc.c:524: warning: passing argument 2 of ‘deinterleave_input_samples’ discards qualifiers from pointer target type
13 years ago
Justin Ruggles
ad95307f92
aacenc: use AVCodec.encode2()
13 years ago
Martin Storsjö
9cf0841ef3
dsputil: Add ff_ prefix to the dsputil*_init* functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Justin Ruggles
89eea6df28
aacenc: make sure to encode enough frames to cover all input samples.
...
Currently, any samples in the final frame are not decoded because they are
only represented by one frame instead of two. So we encode two final frames to
cover both the analysis delay and the MDCT delay.
13 years ago
Justin Ruggles
f44005b610
aacenc: only use the number of input samples provided by the user.
...
Fixes handling of CODEC_CAP_SMALL_LAST_FRAME.
13 years ago
Mans Rullgard
3715d841a6
Fix non-C89 declarations in for loops
...
Some compilers still do not support this syntax.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Nathan Caldwell
2e626dd513
aacenc: Fix LONG_START windowing.
...
Forgot to add the equivalent amount to the incoming sample pointer as the output pointer.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Nathan Caldwell
dc7e7d4dd9
aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
...
10l: Forgot to adjust deinterleave for new location of incoming samples in 7946a5a
.
This produced incorrect, but surprisingly listenable results.
Thanks to Justin Ruggles for the report.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Alex Converse
efe68076da
aacenc: Fix identification padding when the bitstream is already aligned.
13 years ago
Michael Niedermayer
cdfe94c5ab
aacenc: Write correct length for long identification strings.
...
When the length is the escape value (15), the new length is calculated by
15 + get_bits(8) - 1.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
9292fe4a1d
aacenc: Simplify windowing
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
7946a5acfb
aacenc: Move saved overlap samples to the beginning of the same buffer as incoming samples.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
9b8e2a8709
aacenc: Deinterleave input samples before processing.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
04af2efaae
aacenc: Store channel count in AACEncContext.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
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
025ccf1f8b
aacenc: Request normalized float samples instead of converting s16 samples to float.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
5310704190
aacenc: cosmetics: move init() and end() to the bottom of the file.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Nathan Caldwell
17ae608127
aacenc: aac_encode_init() cleanup
...
Macroify sanity checks and check return values of allocs and other functions.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Anton Khirnov
9f51c682ee
lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
...
They are used in lavf.
13 years ago
Anton Khirnov
59a9a23581
lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
...
Specifically, ff_mpeg4audio_sample_rates, ff_mpeg4audio_get_config and
ff_copy_pce_data
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Nathan Caldwell
24efdea7fd
aacenc: Fix number of coefficients used in a LFE channel.
...
The spec states:
* Only the lowest 12 spectral coefficients of any LFE may be non-zero
We were using the 12 lowest *bands*.
13 years ago
Nathan Caldwell
51a1d4d94a
aacenc: Fix a segfault with grouped psymodel.
...
10l: Forgot about TYPE_LFE being after TYPE_CPE. Which causes a
segfault when encoding 5.1
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
13 years ago
Nathan Caldwell
98add74e85
aacenc: Fix determination of Mid/Side Mode.
...
In adjust_frame_information(), msc is incremented for each sfb in each
sub-window then compared against max_sfb which is for a single sub-window.
This resulted in frames using EIGHT_SHORT_SEQUENCE where the first few
sub-windows increment msc to a value that results in ms_mode == 2. Even
though only some of the bands are actually using Mid/Side.
14 years ago
Nathan Caldwell
d3a6c2ab7e
psymodel: Remove the single channel analysis function
14 years ago
Nathan Caldwell
01344fe409
aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel.
14 years ago
Nathan Caldwell
0bc01cc9fe
psymodel: Add channels and channel groups to the psymodel.
14 years ago
Nathan Caldwell
1bb52045d3
aacenc: Save channel configuration for later use.
14 years ago
Nathan Caldwell
cc9947ffbe
aacenc: Add stereo_mode option.
...
ms_off is the default, until Mid/Side is no longer buggy.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Nathan Caldwell
b58e298572
psymodel: Remove wrapper functions.
...
Instead use the function pointers directly.
14 years ago
Nathan Caldwell
5b29af624f
aacenc: Replace loop counters in aac_encode_frame() with more descriptive 'ch' and 'w'.
14 years ago
Nathan Caldwell
230c1a9075
aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
...
There is still are still a few sections missing relating to TNS (not present)
and mid/side (contains other bugs).
Overall this improves quality, and vastly improves rate-control.
Signed-off-by: Martin Storsjö <martin@martin.st>
14 years ago
Mans Rullgard
4538729afe
Move sine windows to a separate file
...
These windows do not really belong in fft/mdct files and were
easily confused with the similarly named tables used by rdft.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
a45fbda994
Move ff_kbd_window_init() to a separate file
...
This function is not tightly coupled to mdct, and it's in the way
of making a fixed-point mdct implementation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
26f548bb59
fft: remove inline wrappers for function pointers
...
This removes the rather pointless wrappers (one not even inline)
for calling the fft_calc and related function pointers.
Signed-off-by: Mans Rullgard <mans@mansr.com>
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
31ff9bd7b8
aacenc: Fix a segfault in search_for_quantizers
...
This reverts the removal of scoefs from AACEncContext.
It resulted in scoefs being a NULL pointer when
search_for_quantizers() is called.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Young Han Lee
2790d7a9ff
aacenc: remove the data arrays
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Diego Elio Pettenò
d36beb3f69
Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
...
None of these symbols should be accessed directly, so declare them as
hidden.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Janne Grunau
2fd9035ddc
aacenc: fix typo in sync extension constant in 8ae0fa2
14 years ago
Justin Ruggles
6eabb0d3ad
Change DSPContext.vector_fmul() from dst=dst*src to dest=src0*src1.
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Alex Converse
8ae0fa243e
aacenc: mark SBR absent
...
Use backwards compatible explicit signalling to denote the absence of
SBR.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
14 years ago
Stefano Sabatini
5d6e4c160a
Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
...
SampleFormat with AVSampleFormat.
Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Alex Converse
99d7a3e862
aacenc: Remove an unused variable from adjust_frame_information().
...
Originally committed as revision 25002 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Alex Converse
1297f58132
aacenc: Don't set s->cur_channel before apply_window_and_mdct().
...
In general s->cur_channel should be phased out.
Originally committed as revision 25001 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Alex Converse
8e4c11e90a
aacenc: Write tag.elem_id early.
...
Originally committed as revision 25000 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Alex Converse
76dfe4ebc5
aacenc: Only apply M/S if common_window is set.
...
Originally committed as revision 24998 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Nathan Caldwell
2bb1d0e77a
aacenc: Adjust array offsets for the current channel before calling ff_psy_suggest_window().
...
Patch by Nathan Caldwell <saintdev@gmail.com>
Originally committed as revision 24332 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago