1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00
Commit Graph

71637 Commits

Author SHA1 Message Date
Shivraj Patil
35a7170e69 Makefile: Add support for MSA (MIPS-SIMD-Arch)
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-17 17:38:41 +02:00
Michael Niedermayer
8768f8f4b9 avcodec/mpegaudiodec_template: use double to build csa tables
Fixes rounding difference between 32bit x86 and 64bit
Fixes fate failure with gapless mp3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-17 13:50:37 +02:00
Michael Niedermayer
38f6726068 avcodec/atrac3plusdsp: fix on stack alignment
Fixes fate failure on ARM
2015-04-17 12:22:04 +02:00
Vignesh Venkatasubramanian
1c37848f90 webmdashenc: Add better error handling
Return appropriate error codes and propagate the error codes from
helper functions to the outer calls. Also fix a potential leak in
call to av_realloc.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-17 04:48:29 +02:00
James Almer
8254011b21 configure: remove old libdcadec check
It's obsolete after the addition of the pkg-config check.
See http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/191983 for the
relevant discussion

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-16 20:10:19 -03:00
wm4
8297d87eec fate: add mp3 gapless test
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 23:05:47 +02:00
Andreas Cadhalpun
bc4fee7f2a ac3: validate end in ff_ac3_bit_alloc_calc_mask
This fixes an invalid read if end is 0:
     band_end   = ff_ac3_bin_to_band_tab[end-1] + 1;

Depending on what is before the array, this can cause stack smashing,
when band_end becomes too large.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 21:37:16 +02:00
Rodger Combs
55a1d75bf7 lavf/assenc: handle extra sections after Events
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 21:09:32 +02:00
Andreas Cadhalpun
e224aa4191 aacpsy: avoid psy_band->threshold becoming NaN
If band->thr is 0.0f, the division is undefined, making norm_fac not a
number or infinity, which causes psy_band->threshold to become NaN.

This is passed on to other variables until it finally reaches
sce->sf_idx and is converted to an integer (-2147483648).

This causes a segmentation fault when it is used as array index.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 20:28:55 +02:00
Andreas Cadhalpun
0be54ad280 aasc: return correct buffer size from aasc_decode_frame
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 19:19:09 +02:00
Andreas Cadhalpun
5b75689b98 aacdec: consistently use avctx for logging in decode_eld_specific_config
ac may be NULL and then accessing ac->avctx results in a segmentation fault.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 18:44:18 +02:00
James Almer
1577b29c82 configure: add missing dependencies for MIPS and PPC features
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-16 13:17:12 -03:00
Andreas Cadhalpun
ae6fd7300b msrledec: use signed pixel_ptr in msrle_decode_pal4
This fixes segmentation faults, when pic->linesize[0] is negative.
In that case 'line * pic->linesize[0] + pixel_ptr' is treated as
unsigned and wraps around.

This reverts commit 7d78a964.
The problem was introduced in commit f7e1367f, which should obsolete
that commit.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 15:52:22 +02:00
Simon Thelen
ed2a712750 configure: add pkg-config support for libdcadec
Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 14:52:38 +02:00
Victor Anjin
2db24cf746 ivfenc: incorrect fourcc for VP9 video
VP80 fourcc are writed for all contexts (without ctx->codec_tag)
how to reproduce the issue:
1) Get any vp9 video (for example  http://base-n.de/webm/out9.webm)
2) ffmpeg  -i out9.webm -vcodec copy out9.ivf
3) out9.ivf have VP80 fourcc at ivf header
The proposed fix solves this issue

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 13:06:35 +02:00
Nicolas George
38155865df lavfi/avf_showcqt: fix error code.
Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 12:38:28 +02:00
Michael Niedermayer
b50a4ca179 avformat/utils: Preserve packet duration when parsing is done only for headers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 04:31:30 +02:00
Michael Niedermayer
c658269cd1 avcodec/h264_ps: Validate num_units_in_tick/time_scale before setting them in the context
This probably makes no big difference but it is more correct

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-16 03:41:41 +02:00
Vittorio Giovara
7498f2221e h264: Do not fail on unsupported timing info
The spec madandate both time_scale and num_units_in_tick greater than 0,
however since they are not essential for decoding, just ignore the whole
block and try to finish parsing the VUI.

Related to Ticket4445.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-16 03:41:41 +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
Nedeljko Babic
f4ccf38902 libavutil/softfloat: Change order of fields in SoftFloat structure.
Softfloat will be used in implementation of AAC fixed point decoder.
This change is needed in order to more easily integrate ffmpegs softfloat in
already developed algorithm for AAC.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 18:53:55 +02:00
Michael Niedermayer
574978d2bd avcodec/intelh263dec: Use check_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 18:53:55 +02:00
Diego Biurrun
1336bb06c9 configure: Simplify avisynth check 2015-04-15 14:52:58 +02:00
Diego Biurrun
247aa7af7d avisynth: Simplify shared library name construction 2015-04-15 14:52:57 +02:00
wm4
3163083f7b avformat/mp3dec: offset seek index to end of vbr headers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 13:25:08 +02:00
wm4
ddd429fab6 Revert "avformat/mp3dec: offset seek index to end of id3v2 tag"
This reverts commit 8b76c0eb56.

It was slightly incorrect; the next commit fixes it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 13:25:07 +02:00
Michael Niedermayer
a742a0536d avformat/mp3dec: Allow forcing the use of the xing TOC for CBR files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 13:25:07 +02:00
Michael Niedermayer
0842df2619 Merge commit 'ec89f35e3e5eb9ec5221266e801efeee7ecab4df'
* commit 'ec89f35e3e5eb9ec5221266e801efeee7ecab4df':
  x265: Map color parameters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 11:57:38 +02:00
Michael Niedermayer
0fbe18b63e Merge commit '0cbb1473179d35d4eb9c9446c8ed84e197e5389b'
* commit '0cbb1473179d35d4eb9c9446c8ed84e197e5389b':
  x264: Map color parameters

Conflicts:
	libavcodec/libx264.c

See: 48d39c8786
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 11:49:26 +02:00
Luca Barbato
ec89f35e3e x265: Map color parameters 2015-04-15 09:48:48 +02:00
Luca Barbato
0cbb147317 x264: Map color parameters 2015-04-15 09:48:47 +02:00
Michael Niedermayer
fbdaebb298 avcodec/ituh263dec: Use check_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 03:22:27 +02:00
wm4
95f524aff5 lavc: use correct type for printf() argument
This was passing uint32_t for %d.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 21:45:07 +02:00
wm4
2b5f34f788 avformat, avcodec: log discard padding
Useful for debugging.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 21:37:46 +02:00
Vignesh Venkatasubramanian
30e2f87d2e webdashenc: replace unchecked av_malloc with stack allocation
Replace an unchecked av_malloc call with stack allocation as the size
is always a constant.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 20:48:30 +02:00
Michael Niedermayer
ee69229dd8 Merge commit '7a5f44476696b495e0de658ed859bcb8520b93d4'
* commit '7a5f44476696b495e0de658ed859bcb8520b93d4':
  avisynth: Bump minimum required version to interface version 6

Conflicts:
	doc/general.texi
	libavformat/avisynth.c

See: 3723a18310
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 20:10:08 +02:00
Michael Niedermayer
64b37d3e08 Merge commit 'a6a45e5a9a9dfb725456f62e053532e505aadcfc'
* commit 'a6a45e5a9a9dfb725456f62e053532e505aadcfc':
  avisynth: Fix detection of AviSynth 2.5

See: d858c3a18f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 20:07:13 +02:00
Rostislav Pehlivanov
a61c75e9f7 aacdec: Use macros for constants
This commit replaces the previous hardcoded constants with both new and previously
defined macros from aac.h. This change makes it easy for anyone reading the code
to know how encoding and decoding scalefactors works. It's also possibly
a step in unifying some of the code across both the encoder and decoder.

Reviewed-by: Claudio Freire <klaussfreire@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 18:04:02 +02:00
Michael Niedermayer
37d93fdbf0 avcodec/mpeg12dec: Use check_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 15:30:39 +02:00
Michael Niedermayer
343f34c0b8 avcodec/get_bits: print details of the location of the missing bit in check_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 15:30:39 +02:00
Paul B Mahol
c2fc466351 avcodec/alsdec: use av_malloc(z)_array()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-04-14 13:06:15 +00:00
Michael Niedermayer
4ba662b032 avcodec/mpeg4videodec: Improve wording of the missing header warning messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 14:41:11 +02:00
Michael Niedermayer
bca1577ed3 avcodec/mpeg4videodec: change log level to waning for incomplete header messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 14:12:38 +02:00
Michael Niedermayer
4103172376 Merge commit '13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea'
* commit '13e4f2c7f7857feb6885f0c2ea8c9ddf438f46ea':
  mpeg4videodec: Remove useless messages

Conflicts:
	libavcodec/mpeg4videodec.c

not merged, the messages have been an important aid for debugging in old mpeg4
and help understanding bug reports

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 13:58:04 +02:00
Stephen Hutchinson
7a5f444766 avisynth: Bump minimum required version to interface version 6
The AVSC_API changes in the new headers mean that the 2.6 alphas
are just as incompatible as 2.5 is.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-04-14 13:53:04 +02:00
Stephen Hutchinson
a6a45e5a9a avisynth: Fix detection of AviSynth 2.5
In order to safely exit when the user tries to use AviSynth 2.5, the
continue_on_fail value for 2.6's functions need to be set to 1.
Otherwise, the library loader fails before the 'upgrade to 2.6'
log message appears.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-04-14 13:52:41 +02:00
Michael Niedermayer
6e86ee97c8 Merge commit '49e531ff4706279c7eed774f2c8b896942924ce2'
* commit '49e531ff4706279c7eed774f2c8b896942924ce2':
  mmal: Reference MMAL VC lib explicitly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 13:40:58 +02:00
Michael Niedermayer
7c521d4528 Merge commit '2de7650451d90520135d8cf6f96caa0658824208'
* commit '2de7650451d90520135d8cf6f96caa0658824208':
  mmal: Move system headers before local headers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-14 13:28:29 +02:00
wm4
13e4f2c7f7 mpeg4videodec: Remove useless messages
They seem to sometimes trigger with old AVI files. They are just
confusing, do not help anyone, and use sloppy language.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-04-14 12:32:43 +02:00
wm4
49e531ff47 mmal: Reference MMAL VC lib explicitly
This is optional, but ensures that linking with -Wl,--as-needed does not
drop the library containing the MMAL VC driver. The driver normally
"registers" itself in the library constructor, but since no symbols are
explicitly referenced, the linker could remove it with --as-needed
enabled.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-04-14 12:32:13 +02:00