Commit Graph

189 Commits

Author SHA1 Message Date
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
  lavc: AV-prefix all codec flags

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/ac3enc_float.c
	libavcodec/atrac1.c
	libavcodec/atrac3.c
	libavcodec/atrac3plusdec.c
	libavcodec/dcadec.c
	libavcodec/ffv1enc.c
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb.c
	libavcodec/imc.c
	libavcodec/libmp3lame.c
	libavcodec/libtheoraenc.c
	libavcodec/libtwolame.c
	libavcodec/libvpxenc.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegaudiodec_template.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/nellymoserdec.c
	libavcodec/nellymoserenc.c
	libavcodec/nvenc.c
	libavcodec/on2avc.c
	libavcodec/options_table.h
	libavcodec/opus_celt.c
	libavcodec/pngenc.c
	libavcodec/ra288.c
	libavcodec/ratecontrol.c
	libavcodec/twinvq.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c
	libavcodec/vorbisdec.c
	libavcodec/vp3.c
	libavcodec/wma.c
	libavcodec/wmaprodec.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02: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
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>
2015-07-27 19:57:52 +02:00
Claudio Freire
59216e0525 AAC Encoder: clipping avoidance
Avoid clipping due to quantization noise to produce audible
artifacts, by detecting near-clipping signals and both attenuating
them a little and encoding escape-encoded bands (usually the
loudest) rounding towards zero instead of nearest, which tends to
decrease overall energy and thus clipping.

Currently fate tests measure numerical error so this change makes
tests using asynth (which are near clipping) report higher error
not less, because of window attenuation. Yet, they sound better,
not worse (albeit subtle, other samples aren't subtle at all).
Only measuring psychoacoustically weighted error would make for
a representative test, so that will be left for a future patch.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 19:13:48 +02:00
Rostislav Pehlivanov
331c1e7494 aacenc: move the generation of ff_aac_pow34sf_tab[]
This commit moves the generation of ff_aac_pow34sf_tab[] out of the
encoder and into the table generator. The original commit log for
this table in 2011 actually mentions that it should be moved outside
but this never happened.

This is the first commit which cleans up the encoder a little.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 13:53:04 +02:00
Rostislav Pehlivanov
80db686a69 aacenc: fix option descriptions
Since the new PNS implementation has been merged and is no longer considered
proof of concept (as it's much more complex and better than the previous), change
the comments to reflect that. We need people testing it (since all AAC profiles
require it to be on by default) and having it tagged as proof of concept might drive some away.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-07 22:56:30 +02:00
Rostislav Pehlivanov
e8576dc8df aacenc: implement Intensity Stereo encoding support
This commit implements intensity stereo coding support
to the native aac encoder. This is a way to increase the efficiency
of the encoder by zeroing the right channel's spectral coefficients
(in a channel pair) and rederiving them in the decoder using information
from the scalefactor indices of special band types. This commit
confomrs to the official ISO 13818-7 specifications, although due to
their ambiguity certain deviations have been taken to ensure maximum
sound quality. This commit has been extensively tested and has shown
to not result in audiable audio artifacts unless in extreme cases.
This commit also adds an option, aac_is, which has the value of
0 by default. Intensity Stereo is part of the scalable aac profile
and is thus non-default.

The way IS coding works is that it rederives the right channel's
spectral coefficients from the left channel via the scalefactor
index values left in the right channel. Since an entire band's
spectral coefficients do not need to be coded, the encoder's
efficiency jumps up and it unzeroes some high frequency values
which it previously did not have enough bits to encode. That way
less information is lost than the information lost by rederiving
the spectral coefficients with some error. This is why the
filesize of files encoded with IS do not decrease significantly.
Users wishing that IS coding should reduce filesize are expected
to reduce their encoding bitrates appropriately.

This is V2 of the commit. The old version did not mark ms_mask as
0 since M/S and IS coding are incompactible, which resulted in
distortions with M/S coding enabled. This version also improves
phase detection by measuring it for every spectral coefficient in
the band and using a simple majority rule to determine whether the
coefficients are in or out of phase. Also, the energy values per
spectral coefficient were changed as to reflect the
official specifications.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:59:26 +02:00
Rostislav Pehlivanov
0b233900fa aacenc: add support for coding of IS spectral coefficients
This commit adds support for the coding of intensity stereo spectral
coefficients. It also fixes the Mid/Side coding of band_types higher
than RESERVED_BT (M/S must not be applied to their spectral coefficients,
but marking M/S as present in encode_ms_info() is okay). Much
of the changes here were taken from the decoder and inverted.
This commit does not change the functionality of the decoder as the
previous patch in this series zeroes ms_mask and is_mask.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:58:37 +02:00
Rostislav Pehlivanov
38fd4c2e66 aaccoder: add a new perceptual noise substitution implementation
This commit finalizes the PNS implementation previously added to the encoder
by moving it to a seperate function search_for_pns() and thus making it
coder-generic. This new implementation makes use of the spread field of
the psy bands and the lambda quality feedback paremeter. The spread of the
spectrum in a band prevents PNS from being used excessively and thus preserve
more phase information in high frequencies.  The lambda parameter allows
the number of PNS-marked bands to vary based on the lambda parameter and the
amount of bits available, making better choices on which bands are to be marked
as noise. Comparisons with the previous PNS implementation can be found
here: https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/

This is V2 of the patch, the changes from the previous version being that this
version uses the new band->spread metric from aacpsy and normalizes the
energy using the group size. These changes were suggested by Claudio Freire
on the mailing list. Another change is the use of lambda to alter the
frequency threshold. This change makes the actual threshold frequencies
vary between +-2Khz of what's specified, depending on frame encoding performance.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:39:06 +02:00
Rostislav Pehlivanov
e06578e392 aacenc: use the new function for setting special band scalefactor indices
This commit enables the function added with commit 7c10b87 and uses that
new function for setting any special scalefactor indices. This commit does
not change the behaviour of the encoder since no bands are being marked as
either NOISE_BT(due to the previous PNS implementation removed in the
previous commit) or INTENSITY_BT2/INTENSITY_BT.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-05 16:36:38 +02:00
Rostislav Pehlivanov
9f4f578704 aacenc: reset marked IS and M/S bands upon frame encoding
This commit resets any bands marked as M/S or IS upon encoding a frame.
This is needed because the arrays may contain some residual information
upon allocation on startup and because there isn't any mechanism to
reset the arrays once the frame has been encoded.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-03 16:17:16 +02:00
Rostislav Pehlivanov
7c10b87b57 aacenc: add support for coding of intensity stereo scalefactor indices
This commit adds support for the coding of intensity stereo scalefactor indices.
It does not do any marking of such bands and as such does no functional changes
to the encoder. It removes any old twoloop specific code for PNS and moves it
into a seperate function which handles setting of scalefactor indices for
PNS and IS bands.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-29 16:44:40 +02:00
Michael Niedermayer
3fb726c6b4 avcodec/aacenc: use < 0 instead of != 0 for error checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-16 19:07:31 +02:00
Rostislav Pehlivanov
c5d4f87e81 aaccoder: Implement Perceptual Noise Substitution for AAC
This commit implements the perceptual noise substitution AAC extension. This is a proof of concept
implementation, and as such, is not enabled by default. This is the fourth revision of this patch,
made after some problems were noted out. Any changes made since the previous revisions have been indicated.

In order to extend the encoder to use an additional codebook, the array holding each codebook has been
modified with two additional entries - 13 for the NOISE_BT codebook and 12 which has a placeholder function.
The cost system was modified to skip the 12th entry using an array to map the input and outputs it has. It
also does not accept using the 13th codebook for any band which is not marked as containing noise, thereby
restricting its ability to arbitrarily choose it for bands. The use of arrays allows the system to be easily
extended to allow for intensity stereo encoding, which uses additional codebooks.

The 12th entry in the codebook function array points to a function which stops the execution of the program
by calling an assert with an always 'false' argument. It was pointed out in an email discussion with
Claudio Freire that having a 'NULL' entry can result in unexpected behaviour and could be used as
a security hole. There is no danger of this function being called during encoding due to the codebook maps introduced.

Another change from version 1 of the patch is the addition of an argument to the encoder, '-aac_pns' to
enable and disable the PNS. This currently defaults to disable the PNS, as it is experimental.
The switch will be removed in the future, when the algorithm to select noise bands has been improved.
The current algorithm simply compares the energy to the threshold (multiplied by a constant) to determine
noise, however the FFPsyBand structure contains other useful figures to determine which bands carry noise more accurately.

Some of the sample files provided triggered an assertion when the parameter to tune the threshold was set to
a value of '2.2'. Claudio Freire reported the problem's source could be in the range of the scalefactor
indices for noise and advised to measure the minimal index and clip anything above the maximum allowed
value. This has been implemented and all the files which used to trigger the asserion now encode without error.

The third revision of the problem also removes unneded variabes and comparisons. All of them were
redundant and were of little use for when the PNS implementation would be extended.

The fourth revision moved the clipping of the noise scalefactors outside the second loop of the two-loop
algorithm in order to prevent their redundant calculations. Also, freq_mult has been changed to a float
variable due to the fact that rounding errors can prove to be a problem at low frequencies.
Considerations were taken whether the entire expression could be evaluated inside the expression
, but in the end it was decided that it would be for the best if just the type of the variable were
to change. Claudio Freire reported the two problems. There is no change of functionality
(except for low sampling frequencies) so the spectral demonstrations at the end of this commit's message were not updated.

Finally, the way energy values are converted to scalefactor indices has changed since the first commit,
as per the suggestion of Claudio Freire. This may still have some drawbacks, but unlike the first commit
it works without having redundant offsets and outputs what the decoder expects to have, in terms of the
ranges of the scalefactor indices.

Some spectral comparisons: https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/Original.png (original),
https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS_NO.png (encoded without PNS),
https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS1.2.png (encoded with PNS, const = 1.2),
https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/Difference1.png (spectral difference).
The constant is the value which multiplies the threshold when it gets compared to the energy, larger
values means more noise will be substituded by PNS values. Example when const = 2.2:
https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS_2.2.png

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 19:59:44 +02:00
Rostislav Pehlivanov
013498ba15 aacenc: Adjust the initial offset for PNS values
This commit adjusts the intial offset for PNS values, introduced
with commit f7f71b5795 earlier. This
commit shifts the value in such a way that no further offsets are
required in the aaccoder.c file. Earlier version of the PNS patch had 2 offsets in both the aaccoder and aacenc.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 03:42:57 +02:00
Rostislav Pehlivanov
f7f71b5795 aacenc: Add support for Perceptual Noise Substitution energy values
This commit implements support for writing the noise energy values used in PNS.
The difference between regular scalefactors and noise energy values is that the latter
require a small preamble (NOISE_PRE + energy_value_diff) to be written as the first
noise-containing band. Any following noise energy values use the previous one to
base their "diff" on. Ordinary scalefactors remain unchanged other than that they ignore the noise values.

This commit should not change anything by itself, the following commits will bring it in use.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-13 04:14:27 +02:00
Claudio Freire
6dbbb981b5 AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate.
Instead, warn that bitrate will be clamped down to the maximum allowed.

Patch is mostly work of Kamendo2 in issue #2686, quite tested within that issue.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-06 13:36:25 +01:00
Claudio Freire
6394acaf36 AAC: Fix M/S stereo encoding
This patch fixes a pointer arithmetic bug in adjust_frame_information that resulted in heavily corrupted audio when using M/S encoding. Also, a backup copy of untransformed coefficients has to be kept around or attempts at re-processing the frame (which happens when hevavily overspending bits during transients) will result in re-encoding of the coefficients and subsequent corruption of the resulting stream.

A/B testing shows the bug as corrected, but still cannot prove that M/S coding is a win at least in numbers. Limited listening tests do show improvement on M/S encoded samples in lower bitrates, but they're hidden among the other artifacts that remain to be corrected in the encoder.

Some of the regressions flagged in the report do show poor stereo image (but not buggy), so M/S encoding is clearly not good enough yet to be defaulted to auto.

In numbers, Patched against Unpatched, stereo_mode auto:

  Files: 114
  Bitrates: 6
  Tests: 683

  Serious Regressions: 0 (0%)
  Regressions: 0 (0%)
  Improvements: 227 (33%)
  Big improvements: 92 (13%)
  Worst regression - mybloodrusts.wv - 256k
    - StdDev: 28.61       pSNR: -0.43     maxdiff: 1372.00
  Best improvement - 60.wv - 384k
    - StdDev: -369.57     pSNR: 45.02     maxdiff: -13322.00
  Average          - StdDev: -80.56       pSNR: 2.49      maxdiff: -8858.00

Patched against Unpatched stereo_mode ms_off shows no difference.

Patched stereo_mode auto vs Unpatched stereo_mode ms_off shows a small average improvement, just not too significant:

  Serious Regressions: 0 (0%)
  Regressions: 10 (1%)
  Improvements: 45 (6%)
  Big improvements: 2 (0%)
  Worst regression - Illinois.wv - 256k
    - StdDev: 33.20       pSNR: -2.03     maxdiff: 477.00
  Best improvement - song_of_circomstances.flac - 384k
    - StdDev: -3.97       pSNR: 7.61      maxdiff: -826.00
  Average          - StdDev: -10.25       pSNR: 0.20      maxdiff: -281.00

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-03 13:57:42 +01:00
Dyami Caliri
50833c9f7b Fix buffer_size argument to init_put_bits() in multiple encoders.
Several encoders were multiplying the buffer size by 8, in order to get
a bit size. However, the buffer_size argument is for the byte size of
the buffer. We had experienced crashes encoding prores (Anatoliy) at
size 4096x4096.
2015-02-26 20:14:00 +01:00
Michael Niedermayer
704c980294 avcodec/aacenc: Fix sample rate check
Fixes out of array read
Fixes CID1257803, CID1257797, CID1257789, CID1257786

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 22:29:09 +01:00
Michael Niedermayer
5387b0cbfb Merge commit '971099ff5a85377579eb5b8d3620e283957f097e'
* commit '971099ff5a85377579eb5b8d3620e283957f097e':
  aacenc: correctly check returned value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 04:45:32 +01:00
Vittorio Giovara
971099ff5a aacenc: correctly check returned value
CC: libav-stable@libav.org
2014-12-18 23:27:14 +01:00
Michael Niedermayer
14285c3331 avcodec/aacenc: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-29 18:58:13 +01:00
Michael Niedermayer
f9fa560597 avcodec/aacenc: check input for NaN
Fixes Ticket3762

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-08 23:32:39 +01:00
Michael Niedermayer
da2189596d Merge commit '2df0c32ea12ddfa72ba88309812bfb13b674130f'
* commit '2df0c32ea12ddfa72ba88309812bfb13b674130f':
  lavc: use a separate field for exporting audio encoder padding

Conflicts:
	libavcodec/audio_frame_queue.c
	libavcodec/avcodec.h
	libavcodec/libvorbisenc.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/wmaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-14 02:16:16 +02: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
Michael Niedermayer
c4a0c64f14 avcodec/aacenc: Use FF_ALLOCZ_ARRAY_OR_GOTO()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-10 15:18:29 +02:00
Michael Niedermayer
9a7d332b92 avcodec/aacenc: dont use global quality if its negative
Some applications used a negative value as default for "not set"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-24 20:32:37 +02:00
Michael Niedermayer
ee77140afa Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
  cosmetics: Group .name and .long_name together in codec/format declarations

Conflicts:
	libavcodec/8svx.c
	libavcodec/alac.c
	libavcodec/cljr.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/dpxenc.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/ffv1dec.c
	libavcodec/flacdec.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/g726.c
	libavcodec/gif.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopencore-amr.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libspeexenc.c
	libavcodec/libvo-amrwbenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/proresdec_lgpl.c
	libavcodec/proresenc_kostya.c
	libavcodec/ra144enc.c
	libavcodec/rawdec.c
	libavcodec/rv10.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tta.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/wavpack.c
	libavcodec/xbmenc.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 12:34:23 +02:00
Diego Biurrun
b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Timothy Gu
5748e24950 aacenc: use constants to set AAC coder
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 17:22:48 +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
Claudio Freire
e41cd3cdeb aacenc: Fix ticket #1784: 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.
Test sample attached on the bug tracker had the peculiar case of all
other channels being silent, so the error was far more noticeable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-12 19:14:17 +02:00
Bojan Zivkovic
26f3924d78 mips: Optimization of AAC coefficients encoder functions
Signed-off-by: Bojan Zivkovic <bojan@mips.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 12:34:37 +01:00
Michael Niedermayer
e052f06531 Merge commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5'
* commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5':
  lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft
  lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
  lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft

Conflicts:
	libavcodec/flacenc.c
	libavcodec/libgsm.c
	libavcodec/utils.c
	libavcodec/version.h

The compatibility wrapers are left as they likely sre still
in wide use. They will be removed when they break or otherwise
cause work without an volunteer being available.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 22:04:16 +01:00
Anton Khirnov
f073b1500e lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft 2013-03-09 08:36:40 +01:00
James Zern
bcaf64b605 normalize calls to ff_alloc_packet2
- check ret < 0
- remove excessive error log

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-06 22:11:46 +01:00
Michael Niedermayer
a984efd104 Merge commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f'
* commit 'c242bbd8b6939507a1a6fb64101b0553d92d303f':
  Remove unnecessary dsputil.h #includes

Conflicts:
	libavcodec/ffv1.c
	libavcodec/h261dec.c
	libavcodec/h261enc.c
	libavcodec/h264pred.c
	libavcodec/lpc.h
	libavcodec/mjpegdec.c
	libavcodec/rectangle.h
	libavcodec/x86/idct_sse2_xvid.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-26 13:05:10 +01:00
Diego Biurrun
c242bbd8b6 Remove unnecessary dsputil.h #includes 2013-02-26 00:51:34 +01:00
Michael Niedermayer
6e6e170898 Merge commit '42d324694883cdf1fff1612ac70fa403692a1ad4'
* commit '42d324694883cdf1fff1612ac70fa403692a1ad4':
  floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.

Conflicts:
	libavcodec/arm/dsputil_init_vfp.c
	libavcodec/arm/dsputil_vfp.S
	libavcodec/dsputil.c
	libavcodec/ppc/float_altivec.c
	libavcodec/x86/dsputil.asm
	libavutil/x86/float_dsp.asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 14:04:50 +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
98fed59427 aacenc: Fix assignments in if()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 05:05:26 +01: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
Michael Niedermayer
59b68ee887 Merge commit '3d3cf6745e2a5dc9c377244454c3186d75b177fa'
* commit '3d3cf6745e2a5dc9c377244454c3186d75b177fa':
  aacdec: use float planar sample format for output

Conflicts:
	libavcodec/aacdec.c
	libavcodec/aacsbr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-26 15:15:02 +01:00
Clément Bœsch
7581ad24a9 lavc/aac: fix shared build failures with MSVC.
This is a workaround until a better solution is found.
2012-11-12 22:28:57 +01:00
Michael Niedermayer
cd37963684 Merge commit '381dc1a5ec0925b281c573457c413ae643567086'
* commit '381dc1a5ec0925b281c573457c413ae643567086':
  fate: ac3: Place E-AC-3 tests and AC-3 tests in different groups
  fate: Add shorthands for acodec PCM and ADPCM tests
  avconv: Drop unused function argument from do_video_stats()
  cmdutils: Conditionally compile libswscale-related bits
  aacenc: Drop some unused function arguments
  rtsp: Avoid a cast when calling strtol
  nut: support textual data
  nutenc: verbosely report unsupported negative pts

Conflicts:
	cmdutils.c
	ffmpeg.c
	libavformat/nut.c
	libavformat/nutenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 13:52:03 +01:00
Diego Biurrun
72c758f1fd aacenc: Drop some unused function arguments 2012-10-29 18:27:54 +01:00
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>
2012-10-26 03:24:13 +02:00
Michael Niedermayer
79d30321a2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wmaenc: use float planar sample format
  (e)ac3enc: use planar sample format
  aacenc: use planar sample format
  adpcmenc: use planar sample format for adpcm_ima_wav and adpcm_ima_qt
  adpcmenc: move 'ch' variable to higher scope
  adpcmenc: fix 3 instances of variable shadowing
  adpcm_ima_wav: simplify encoding
  libvorbis: use planar sample format
  libmp3lame: use planar sample formats
  vorbisenc: use float planar sample format
  ffm: do not write or read the audio sample format
  parseutils: fix parsing of invalid alpha values
  doc/RELEASE_NOTES: update for the 9 release.
  smoothstreamingenc: Add a more verbose error message
  smoothstreamingenc: Ignore the return value from mkdir
  smoothstreamingenc: Try writing a manifest when opening the muxer
  smoothstreamingenc: Move the output_chunk_list and write_manifest functions up
  smoothstreamingenc: Properly return errors from ism_flush to the caller
  smoothstreamingenc: Check the output UrlContext before accessing it

Conflicts:
	doc/RELEASE_NOTES
	libavcodec/aacenc.c
	libavcodec/ac3enc_template.c
	libavcodec/wmaenc.c
	tests/ref/lavf/ffm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-07 11:28:38 +02:00