1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-22 20:21:30 +02:00
Commit Graph

113 Commits

Author SHA1 Message Date
Vittorio Giovara
16216b713f lavc: Drop exporting 2-pass encoding stats
These variables are coming from mpegvideoenc where are supposedly used
as bit counters on various frame properties. However their use is
unclear as they lack documentation, are available only from a very small
subset of encoders, and they are hardly used in the wild. Also frame_bits
in aacenc is employed in a similar way.

Remove this functionality from AVCodecContex, these variable are mostly
frame properties, and too few encoders support setting them with anything
useful.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-12-07 11:27:42 -05:00
Luca Barbato
b805482b1f aac: Provide more information on the failure message
Bug-Id: 761
2015-12-05 13:11:36 +01:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
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>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
971099ff5a aacenc: correctly check returned value
CC: libav-stable@libav.org
2014-12-18 23:27:14 +01:00
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.
2014-10-13 19:09:01 +00:00
Diego Biurrun
b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Claudio Freire
8bbdd20a29 aacenc: Fix erasure of surround channels
This was due to a miscomputation of s->cur_channel, which led to
psy-based encoders using the psy coefficients for the wrong channel.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-14 12:42:05 +03:00
Anton Khirnov
f073b1500e lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft 2013-03-09 08:36:40 +01:00
Diego Biurrun
c242bbd8b6 Remove unnecessary dsputil.h #includes 2013-02-26 00:51:34 +01:00
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.
2013-01-22 11:55:42 -08:00
Michael Niedermayer
1d7ffd06e4 lavc: Fix assignments in if() when calling ff_af_queue_add
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-14 13:12:44 +02:00
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>
2012-11-26 11:17:17 -05:00
Diego Biurrun
72c758f1fd aacenc: Drop some unused function arguments 2012-10-29 18:27:54 +01:00
Justin Ruggles
f3e2d68df6 aacenc: use planar sample format 2012-10-06 13:23:13 -04:00
Martin Storsjö
e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Diego Biurrun
0177b7d23a Improve descriptiveness of a number of codec and container long names 2012-07-30 20:46:55 +02:00
Justin Ruggles
d5a7229ba4 Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
2012-06-08 13:14:38 -04:00
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>
2012-04-17 10:25:28 -04:00
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>
2012-04-06 22:37:38 +03:00
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
2012-04-04 19:34:40 +02:00
Justin Ruggles
ad95307f92 aacenc: use AVCodec.encode2() 2012-03-20 18:46:49 -04:00
Martin Storsjö
9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
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.
2012-01-30 14:20:24 -05:00
Justin Ruggles
f44005b610 aacenc: only use the number of input samples provided by the user.
Fixes handling of CODEC_CAP_SMALL_LAST_FRAME.
2012-01-30 14:20:24 -05:00
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>
2012-01-29 23:26:04 +00:00
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>
2012-01-28 22:07:30 +01:00
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>
2012-01-28 22:07:21 +01:00
Alex Converse
efe68076da aacenc: Fix identification padding when the bitstream is already aligned. 2012-01-24 12:55:21 -08:00
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>
2012-01-24 12:54:59 -08:00
Nathan Caldwell
9292fe4a1d aacenc: Simplify windowing
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
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>
2012-01-23 11:40:46 -08:00
Nathan Caldwell
9b8e2a8709 aacenc: Deinterleave input samples before processing.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell
04af2efaae aacenc: Store channel count in AACEncContext.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
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>
2012-01-23 11:40:46 -08:00
Nathan Caldwell
025ccf1f8b aacenc: Request normalized float samples instead of converting s16 samples to float.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell
5310704190 aacenc: cosmetics: move init() and end() to the bottom of the file.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:45 -08:00
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>
2012-01-23 11:40:45 -08:00
Anton Khirnov
9f51c682ee lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
They are used in lavf.
2011-10-20 21:06:58 +02:00
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
2011-10-20 21:06:57 +02:00
Anton Khirnov
145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
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*.
2011-08-13 19:40:33 -07:00
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
2011-08-13 19:37:38 -07:00
Anton Khirnov
ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
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.
2011-06-29 14:28:53 -07:00
Nathan Caldwell
d3a6c2ab7e psymodel: Remove the single channel analysis function 2011-06-29 14:28:53 -07:00
Nathan Caldwell
01344fe409 aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel. 2011-06-29 14:28:53 -07:00