Anton Khirnov
f073b1500e
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
12 years ago
James Zern
bcaf64b605
normalize calls to ff_alloc_packet2
...
- check ret < 0
- remove excessive error log
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Ronald S. Bultje
42d3246948
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
...
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
12 years ago
Michael Niedermayer
1d7ffd06e4
lavc: Fix assignments in if() when calling ff_af_queue_add
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
98fed59427
aacenc: Fix assignments in if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1e27655388
aacenc: use the correct output buffer
...
This fixes segfault caused by 3d3cf6745e
when SingleChannelElement.ret was renamed to SingleChannelElement.ret_buf.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Clément Bœsch
7581ad24a9
lavc/aac: fix shared build failures with MSVC.
...
This is a workaround until a better solution is found.
12 years ago
Diego Biurrun
72c758f1fd
aacenc: Drop some unused function arguments
12 years ago
Michael Niedermayer
f69f9b3876
aacenc: replace scale factor warning by assert
...
The code would crash after printing the warning
Fixes CID717903, CID717904
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
f3e2d68df6
aacenc: use planar sample format
12 years ago
Michael Niedermayer
d56834201b
aacenc: fix out of array writes
...
The value used in allocation is based on a estimate of the
maximum size of the spectral coefficients multiplied with 2
and rounded up. The exact or a tighter limit should be
found and used instead. But this issue shouldnt be left
open until someone works on that.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
124134e424
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Justin Ruggles
d5a7229ba4
Add a float DSP framework to libavutil
...
Move vector_fmul() from DSPContext to AVFloatDSPContext.
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
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
Clément Bœsch
29679f4a37
aac: reference supported sample rates in encoders.
13 years ago
Paul B Mahol
ae2c33b0c2
cosmetics: remove superfluous curly brackets
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7fe8250e9a
aacenc: switch to ff_alloc_packet2()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
4b4d3d7249
aacenc: fix library references
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
b955d4072e
Revert "Fix multi-channel AAC encoding."
...
This reverts commit b3452771c4
.
A better solution was implemented by Nathan Caldwell.
Conflicts:
libavcodec/aacenc.c
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
Michael Niedermayer
018a6645bc
aacenc: Fix bug in writing libavcodec_ident.
...
the written length was off by 2 causing aac decoders to fail with the data.
lucky the encoder was marked as experimental and not used much
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e64edeed3c
aacenc: make the aac coder user choosable.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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