Jon Toohill
81f4f789de
lavc/libmp3lame: send encoder delay/padding in packet side data
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Anton Khirnov
955aec3c7c
mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_header
...
Almost all the places from which this function is called already check
the header manually and in the two that don't (the mp3 muxer) the check
should not cause any problems.
9 years ago
Paul B Mahol
33a68759c1
avcodec/libmp3lame: use AV_OPT_TYPE_BOOL for all options
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
e36db49b7b
avcodec: Add a min size parameter to ff_alloc_packet2()
...
This parameter can be used to inform the allocation code about how much
downsizing might occur, and can be used to optimize how to allocate the
packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
7532f0e14c
avcodec/libmp3lame: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1aca990bd9
avcodec/libmp3lame: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
2612214555
Do not set the lame quality if the user didn't request it.
...
This makes FFmpeg's mp3 output more similar to lame's output.
10 years ago
Anton Khirnov
2df0c32ea1
lavc: use a separate field for exporting audio encoder padding
...
Currently, the amount of padding inserted at the beginning by some audio
encoders, is exported through AVCodecContext.delay. However
- the term 'delay' is heavily overloaded and can have multiple different
meanings even in the case of audio encoding.
- this field has entirely different meanings, depending on whether the
codec context is used for encoding or decoding (and has yet another
different meaning for video), preventing generic handling of the codec
context.
Therefore, add a new field -- AVCodecContext.initial_padding. It could
conceivably be used for decoding as well at a later point.
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Justin Ruggles
f2f2e7627f
Check mp3 header before calling avpriv_mpegaudio_decode_header().
...
As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.
CC:libav-stable@libav.org
11 years ago
Michael Niedermayer
ebbc33a42d
avcodec/libmp3lame: do not attempt to flush lame if no data was input
...
this prevents the creation of a packet even though no single sample has ever
been input, which some confusion in the timestamp generation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Timothy Gu
09fda6bb50
libmp3lame: add ABR support
11 years ago
Timothy Gu
292dbe5e8a
libmp3lame: add comments about CBR/VBR modes
11 years ago
Paul B Mahol
729d821fd8
libmp3lame: allow joint stereo to be disabled
11 years ago
Alexandra Khirnova
9b8d11a76a
avcodec: Use av_reallocp where suitable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Timothy Gu
d3211cfaed
avcodec/libmp3lame: add ABR support
...
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Timothy Gu
07e7bc9cbd
lavc/libmp3lame: add comments about CBR/VBR modes
...
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Timothy Gu
683d9cb1f2
lavc/libmp3lame: fix alignment and capitalization in AVOptions
...
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Paul B Mahol
1de11a7cab
libmp3lame: allow joint stereo to be disabled
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
f073b1500e
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
12 years ago
Justin Ruggles
e984f47873
libmp3lame: use the correct remaining buffer size when flushing
...
CC:libav-stable@libav.org
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
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
871b6ec01d
libmp3lame: Fix assignments in if()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
284ea790d8
dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Justin Ruggles
abd8b9e7e0
libmp3lame: resize the output buffer if needed
...
The LAME API documentation for the required buffer size refers to the size for
a single encode call. However, we store multiple frames in the same output
buffer but only read 1 frame at a time out of it. As a result, the buffer size
given in lame_encode_buffer() is actually smaller than what it should be.
Since we do not know how many frames it will end up buffering, it is best to
just reallocate if needed.
12 years ago
Justin Ruggles
473b297f26
libmp3lame: use planar sample formats
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ö
1d9c2dc89a
Don't include common.h from avutil.h
...
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
Michael Niedermayer
bcbb30e2a0
libmp3lame: add missing layout terminator
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Michael Niedermayer
e47e23698b
libmp3lame: add missing layout terminator
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
e6694659fc
libmp3lame: set supported channel layouts.
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
c7ef5a4aa9
libmp3lame: switch to ff_alloc_packet2().
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
3d853d7ab3
libmp3lame: use AVCodec.encode2()
13 years ago
Justin Ruggles
e00959a9b1
libmp3lame: support float and s32 sample formats
13 years ago
Justin Ruggles
e232225276
libmp3lame: renaming, rearrangement, alignment, and comments
13 years ago
Justin Ruggles
232e16dd02
libmp3lame: use the LAME default bit rate
...
Also, only set bit rate for CBR.
13 years ago
Justin Ruggles
1f516c0451
libmp3lame: use avpriv_mpegaudio_decode_header() for output frame parsing
13 years ago
Justin Ruggles
e3d2c89e9d
libmp3lame: cosmetics: remove some pointless comments
13 years ago
Justin Ruggles
bf909fc456
libmp3lame: convert some debugging code to av_dlog()
...
also remove unneeded commented-out full frame data debugging
13 years ago
Justin Ruggles
469d2a8e8e
libmp3lame: remove outdated comment.
...
We now require at least libmp3lame 3.98.3.
lame_encode_buffer_interleaved() still doesn't work for mono, but it does not
"die"; it just expects a stereo interleaved buffer.
13 years ago
Justin Ruggles
35cfd7d09c
libmp3lame: do not set coded_frame->key_frame.
...
it is already set in avcodec_alloc_frame()
13 years ago
Justin Ruggles
8dad25ebf7
libmp3lame: improve error handling in MP3lame_encode_init()
13 years ago