Commit Graph

21274 Commits

Author SHA1 Message Date
Martin Storsjö
ab9545a290 cng: Reindent some incorrectly indented lines
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:29 +02:00
Martin Storsjö
6b68223d31 cngdec: Allow flushing the decoder
After a flush, don't average the output envelope and energy with
previous iterations.

Also start directly from the target values for the first iteration
at startup.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:25 +02:00
Martin Storsjö
036e6c37d3 cngdec: Make the dbov variable have the right unit
Previously the unit of the variable was Bov, not dBov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:21 +02:00
Martin Storsjö
cafefd889b cngdec: Fix the memset size to cover the full array
This was a leftover from previous iterations of the code, where the
refl coef arrays were statically allocated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:16 +02:00
Martin Storsjö
9b50d20cd2 cngdec: Update the LPC coefficients after averaging the reflection coefficients
I somehow messed up the placement of this one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-30 16:51:12 +02:00
Michael Niedermayer
6f5f7f705d Merge commit '08b028c18dc31b6de741861b9555669dcca4d12a'
* commit '08b028c18dc31b6de741861b9555669dcca4d12a':
  Remove INIT_AVX from x86inc.asm.
  Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
  dv: fix indentation

Conflicts:
	libavformat/dv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 15:28:24 +01:00
Michael Niedermayer
e79c3858b3 Merge commit '14f031d7ecfabba0ef02776d4516aa3dcb7c40d8'
* commit '14f031d7ecfabba0ef02776d4516aa3dcb7c40d8':
  dv: use AVStream.index instead of abusing AVStream.id
  lavfi: add ashowinfo filter
  avcodec: Add a RFC 3389 comfort noise codec
  lpc: Add a function for calculating reflection coefficients from samples
  lpc: Add a function for calculating reflection coefficients from autocorrelation coefficients
  lavr: document upper bound on number of output samples.
  lavr: add general API usage doxy
  indeo3: remove duplicate capabilities line.
  fate: ac3: Add dependencies

Conflicts:
	Changelog
	doc/filters.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/version.h
	libavfilter/Makefile
	libavfilter/af_ashowinfo.c
	libavfilter/allfilters.c
	libavfilter/version.h
	libavutil/avutil.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 14:40:22 +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
Michael Niedermayer
60e957476e rawdec: check avpicture_get_size() return value
Fixes CID205019
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 13:18:57 +01:00
Carl Eugen Hoyos
d3de3a16d1 Partly revert f174fba: yop decoder does not support direct rendering. 2012-10-30 12:09:25 +01:00
Luca Barbato
7658295ba3 pixfmt: support more yuva formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-30 12:02:42 +01:00
Carl Eugen Hoyos
8bf44d5c96 Partly revert f174fba: indeo3 decoder does not support direct rendering. 2012-10-30 11:51:58 +01:00
Paul B Mahol
5f614bcf2c vqavideo: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-30 03:29:08 +00:00
Michael Niedermayer
4b7f34a34e mpeg12videodec: dont pass mpeg1 VBR special case value on as bitrate.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 02:27:50 +01:00
Heesuk Jung
c349177b8c mpeg12video_parser: Wrong bit rate in MPEG2 video file (Ticket #1862)
mpegvideo parser sometime get wrong stream bit rate which is 0x3FFFF*400.
But maximum bit rate of MPEG2 video is up to 80 Mbps in case 1920x1080 resolution.
When bit rate is 0x3FFFF*400, set bit rate zero.

* Problematic link
https://docs.google.com/open?id=0B6r7ZfWFIypCUkhPa0dyTGdFSE0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 02:19:52 +01:00
Michael Niedermayer
740959fdbf mpeg12parser: cleanup bitrate parsing.
This fixes several bugs in the code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-30 02:19:21 +01:00
Ronald S. Bultje
95c89da36e Use ptrdiff_t instead of int for intra pred "stride" function parameter.
This way, SIMD-optimized functions don't have to sign-extend their
stride argument manually to be able to do pointer arithmetic.
2012-10-29 17:49:13 -07:00
Ronald S. Bultje
bad8e33dc9 x86: use PRED4x4/8x8/8x8L/16x16 macros to declare intrapred prototypes. 2012-10-29 17:48:23 -07:00
Michael Niedermayer
ba8adf9be5 truemotion2: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 22:11:19 +01:00
Ronald S. Bultje
c285edd06e Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
Replace INIT_AVX by INIT_XMM avx. Port the whole file to use cpuflag
based function declarations. Remove (now unused) cputype argument in
function declaration macros. Change function prototypes to have mmx2
instead of mmxext as suffix, since that's required by cpuflags.
2012-10-29 14:10:51 -07:00
Piotr Bandurski
bf0d098a98 pictordec: decode 1bpp / 4bpp images when extra header marker is missing
based on 56f6628bca

samples:

http://www.datafilehost.com/download-94b5bc1b.html

Reviewed-and-Tested-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 21:32:03 +01:00
Piotr Bandurski
a29ed50ed7 avuidec: correct long_name
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 21:13:50 +01:00
Paul B Mahol
9051025102 lavc: remove duplicated .capabilities
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-29 20:06:52 +00:00
Martin Storsjö
9b500b8f6c avcodec: Add a RFC 3389 comfort noise codec
This isn't too useful as a normal codec, but can be used in
voip style applications. The decoder updates the noise
generator parameters when a packet is given to it for decoding,
but if called with an empty packet, it generates more noise
according to the last parameters.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 22:00:43 +02:00
Martin Storsjö
8b25a20efb lpc: Add a function for calculating reflection coefficients from samples
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 21:53:16 +02:00
Justin Ruggles
39ef66f530 lpc: Add a function for calculating reflection coefficients from autocorrelation coefficients
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-29 21:53:13 +02:00
Anton Khirnov
bff5e5f8b3 indeo3: remove duplicate capabilities line. 2012-10-29 20:04:56 +01:00
Diego Biurrun
72c758f1fd aacenc: Drop some unused function arguments 2012-10-29 18:27:54 +01:00
Michael Niedermayer
67420b3de5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavc: add CODEC_CAP_DR1 to all video decoders missing them
  rtpdec: Cosmetic cleanup

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 13:15:27 +01:00
Anton Khirnov
f174fbac3c lavc: add CODEC_CAP_DR1 to all video decoders missing them 2012-10-29 09:51:23 +01:00
Michael Niedermayer
b4e6265136 dcadec: skip QMF on unused channels
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-29 05:21:47 +01:00
Michael Niedermayer
f472d01c25 frame_thread_encode: fix context memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 17:04:11 +01:00
Michael Niedermayer
991db63951 frame_thread_encoder: fix packet memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 16:47:23 +01:00
Michael Niedermayer
d8246d475c vc1dec: mark by assert that the default path cannot occur
Fixes CID703827, CID703828
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 16:11:14 +01:00
Michael Niedermayer
c73fcc8de3 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  yuv4mpeg: reject unsupported codecs
  nutenc: K&R formatting cosmetics
  assdec: fix qsort() callback signature
  configure: detect sparc64 automatically
  vp8: fix memset() crossing array boundary
  h264: fix invalid pointer arithmetic
  amrwbdec: fix invalid pointer arithmetic

Conflicts:
	libavformat/nutenc.c
	libavformat/yuv4mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 14:24:27 +01:00
Michael Niedermayer
c4a36b6f70 lpc: check that lpc_type is valid in ff_lpc_calc_coefs
Fixes CID700759
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-28 03:27:16 +01:00
Michael Niedermayer
189fbcede8 tak_parser: check ff_combine_frame() return code
Fixes CID733706
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 23:03:07 +02:00
Michael Niedermayer
6c8d259ab1 msmpeg4dec: fix init code to not fail when called from 2 threads at the same time.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 21:39:06 +02:00
Michael Niedermayer
f44be0da94 ff_h263_decode_init_vlc: fix order of operations to avoid failure with 2 threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 21:31:49 +02:00
Mans Rullgard
4471a24207 vp8: fix memset() crossing array boundary
Indexing across array boundaries is not allowed by C99.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 17:02:46 +01:00
Mans Rullgard
c4cccc8d3f h264: fix invalid pointer arithmetic
Subtracting a (positive) value from the address of an array violates
C99 section 6.5.6:

  If both the pointer operand and the result point to elements of the
  same array object, or one past the last element of the array object,
  the evaluation shall not produce an overflow; otherwise, the
  behavior is undefined.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 17:02:46 +01:00
Mans Rullgard
50be207759 amrwbdec: fix invalid pointer arithmetic
Subtracting a (positive) value from the address of an array violates
C99 section 6.5.6:

  If both the pointer operand and the result point to elements of the
  same array object, or one past the last element of the array object,
  the evaluation shall not produce an overflow; otherwise, the
  behavior is undefined.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-27 17:02:45 +01:00
Michael Niedermayer
95760b33e7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: fix tests for 2-arg math functions
  doc: git-howto: Clarify comment about pushing series of commits
  ivi_common: Drop unused function parameter from decode_band()
  cook: Remove some silly Doxygen comments
  cook: Remove senseless maybe_reformat_buffer32() function
  cook: cosmetics: Better names for joint_decode() function parameters
  cook: cosmetics: Better name for ccpl COOKSubpacket member
  doxygen: Add av_alloc_size to list of predefined macros
  doxygen: Drop some pointless entries from PREDEFINED macros list
  h263: avoid memcpys over array bound in motion vector caching for obmc

Conflicts:
	configure
	doc/git-howto.texi
	libavcodec/cook.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 15:02:35 +02:00
Xidorn Quan
c25e9292ba fix a compiling error with llvm-gcc
Move some #include in vda.h down to prevent libavutil headers
from interfering with system headers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 04:32:40 +02:00
Michael Bradshaw
c430cb49fd Update my email address
Signed-off-by: Michael Bradshaw <mjbshaw@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-27 02:06:21 +02:00
Clément Bœsch
eb36ee1ee1 lavc/srtenc: fix invalid read in case of SubRip.
Regression since 6057de19b. The ptr-2 is used to eat the \r\n and add
the position information on the timing line. This can't be done in case
of SubRip where the timing isn't present in the payload.

Note that we can't use yet the side data to transmit the position
information since the encode subtitles API is still using buffer+size
instead AVPacket as input.
2012-10-26 21:48:27 +02:00
Diego Biurrun
87cdd7c694 ivi_common: Drop unused function parameter from decode_band() 2012-10-26 18:28:38 +02:00
Diego Biurrun
707f58f515 cook: Remove some silly Doxygen comments 2012-10-26 18:28:38 +02:00
Diego Biurrun
8a61ba0e81 cook: Remove senseless maybe_reformat_buffer32() function 2012-10-26 18:28:38 +02:00
Diego Biurrun
f23b4a0682 cook: cosmetics: Better names for joint_decode() function parameters 2012-10-26 18:28:38 +02:00
Diego Biurrun
20015379a4 cook: cosmetics: Better name for ccpl COOKSubpacket member 2012-10-26 18:28:38 +02:00
Janne Grunau
154ff81870 h263: avoid memcpys over array bound in motion vector caching for obmc
Fixes CID602232.
2012-10-26 17:38:07 +02:00
Michael Niedermayer
9f36ec6aa9 aacps: fix order of operands of ipdopd_reset().
With the current implementation this is purely cosmetic

Fixes CID732285
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-26 03:24:13 +02:00
Michael Niedermayer
0018aa9013 aacps: loose self assignment
Fixes CID604123
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-26 03:24:13 +02: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
Paul B Mahol
04a585f054 fraps: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-25 21:51:45 +00:00
Paul B Mahol
d8245c3bcd dsicinav: return proper error code in case of malloc failure
Fixes null pointer dereference.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-25 13:46:19 +00:00
Paul B Mahol
296f9c2b3b dsicinav: return meaningful error code
While here remove redundant references in error message.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-25 13:10:23 +00:00
Michael Niedermayer
da4e4d65f4 aacdec: reorder multiuplications to make code safer against too large input values.
Fixes CID700697
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 13:45:26 +02:00
Michael Niedermayer
aa604e8e33 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avutil: Make LZO decoder code configure-time selectable
  avutil: Move memcpy_backptr() to mem.c
  configure: detect parisc64 automatically
  configure: detect ppc64 automatically
  configure: detect mips64 automatically
  configure: generalise 64-bit test
  smoothstreamingenc: Don't assume streams start from timestamp 0

Conflicts:
	configure
	libavutil/Makefile
	libavutil/lzo.c
	libavutil/lzo.h
	libavutil/mem.c
	libavutil/mem.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 13:15:58 +02:00
Diego Biurrun
5bac2d0c30 avutil: Move memcpy_backptr() to mem.c
The function is used elsewhere and does not belong with the LZO code.
2012-10-25 11:36:57 +02:00
Michael Niedermayer
d312ffdd79 mpegvideo: fix lowres on field pictures
Fixes Ticket1846

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 04:03:58 +02:00
Michael Niedermayer
a1af505d66 roqaudioenc: remove dead code
Fixes CID703669
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 01:38:15 +02:00
Clément Bœsch
c27b3816e4 srt: make the demuxer output SubRip packets.
The SRT format should never have outputted CODEC_ID_SRT packets in the
first place: SRT is a subtitle format containing SubRip text markup
events. The timing information is part of the format, not the codec, and
thus CODEC_ID_SRT should not exist.

Creating packets with the timing information within the payload only
leads to problem (such as remuxing with timing alteration not working),
especially when the SubRip markup is being used in container like
Matroska in addition to this standalone SRT format.

The main reason the timing line was included in those CODEC_ID_SRT
packets is likely because it contained extra information (the event
position) the codec actually needs. This issue is solved by using the
AV_PKT_DATA_SUBTITLE_POSITION side data type.
2012-10-25 00:09:36 +02:00
Clément Bœsch
4d46fd0b3e lavc: add AV_PKT_DATA_SUBTITLE_POSITION side data type.
This commit introduces a new packet side data type for the subtitle
position information. This is meant to be used by the SRT format where
that information is stored along with the timing, which is not part of
the subrip packets.
2012-10-24 23:58:18 +02:00
Clément Bœsch
60d9ee1b75 lavc/utils: make sub decode consistent with A/V.
This allows side data to be transmitted properly with subtitles.
2012-10-24 23:56:43 +02:00
Paul B Mahol
6ddb03caf0 pgmyuvenc: do not create files which are not supported
It is possible to support files with odd width and/or height
if real width and height are stored in header.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-24 18:38:31 +00:00
Michael Niedermayer
d0ab71ed11 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  asfdec: cosmetics, reformat ff_asf_parse_packet()
  g.723.1: add missing CODEC_CAP_DR1
  avconv: remove now unneeded calls to avcodec_get_frame_defaults().
  lavc: initialize output AVFrame before decoding.

Conflicts:
	libavformat/asfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 14:26:13 +02:00
Michael Niedermayer
719fde47ca Merge commit 'c68317ebbe4915035df0b08c23eea7a0b80ab881'
* commit 'c68317ebbe4915035df0b08c23eea7a0b80ab881':
  lavc: fix documentation for AVCodecContext.delay
  atrac3: return an error if extradata_size is not a specific known size
  lavc: use the correct API version guard macro for avcodec_encode_audio()
  Move Doxyfile into the doc/ subdirectory
  doxygen: Build Doxygen documentation in the doc/ subdirectory
  dfa: use av_memcpy_backptr() where previously impossible
  av_memcpy_backptr: Drop no longer necessary malloc padding

Conflicts:
	.gitignore
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 14:18:17 +02:00
Michael Niedermayer
5555d2075a Merge commit 'ceb754d041f5f6327fd9195a5f43575af9516daa'
* commit 'ceb754d041f5f6327fd9195a5f43575af9516daa':
  lzo: Use AV_COPY*U macros where appropriate
  prepare 9_beta2 release
  dsputil: Replace AV_WNxx(AV_RNxx()) combinations by AV_COPYxxU
  intreadwrite: Add AV_COPYxxU macros for copying to/from unaligned addresses
  dxtory: Replace AV_WN16A(AV_RN16A()) combination by AV_COPY16
  mp3: properly forward mp_decode_frame errors

Conflicts:
	RELEASE
	libavcodec/mpegaudiodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 14:01:36 +02:00
Michael Niedermayer
2dbc93455c Merge commit '80521c1997a23e148edf89e11b939ab8646297ca'
* commit '80521c1997a23e148edf89e11b939ab8646297ca':
  build: allow targets to specify extra objects to link with executables
  swscale: avoid pointless use of compound literals
  libm: add fallbacks for various single-precision functions
  network: use getservbyport() only if available
  network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLEN
  Include sys/time.h before sys/resource.h

Conflicts:
	Makefile
	configure
	libavutil/libm.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 12:53:26 +02:00
Anton Khirnov
5a9567631a g.723.1: add missing CODEC_CAP_DR1 2012-10-24 08:46:45 +02:00
Anton Khirnov
1bc64c2814 lavc: initialize output AVFrame before decoding.
Avoids memleaks with audio when extended_data is nontrivial and the user
doesn't reset the frame.
Shouldn't have any effect for video for now, but might be useful in the
future.
2012-10-24 08:46:45 +02:00
Michael Niedermayer
3556e7ce73 mpegvideo enc: choose VBV buffer size for mpeg4 when none is specified instead of failing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 00:40:18 +02:00
Michael Niedermayer
1856162caa mpegvideo enc: choose VBV buffer size for mpeg1/2 when none is specified instead of failing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 00:40:18 +02:00
Stefano Sabatini
4a227a706d lavc/utils: fix a few grammar/style nits in log messages
In avcodec_open2(), apply consistent casing and avoid "or" conjunction at
the beginning of a sentence, in the messages issued in case of
experimental codec usage.
2012-10-24 00:29:37 +02:00
Stefano Sabatini
5ffadec30a lavc/utils: propagate or return meaningful error codes in avcodec_open2() 2012-10-24 00:29:37 +02:00
Justin Ruggles
c68317ebbe lavc: fix documentation for AVCodecContext.delay 2012-10-23 14:35:27 -04:00
Justin Ruggles
44d854a518 atrac3: return an error if extradata_size is not a specific known size
Also fixes 3 compiler warnings about using uninitialized variables.
2012-10-23 14:35:27 -04:00
Justin Ruggles
a5ef830b12 lavc: use the correct API version guard macro for avcodec_encode_audio() 2012-10-23 14:35:27 -04:00
Mans Rullgard
a153e45b95 dfa: use av_memcpy_backptr() where previously impossible
Since the requirement for output padding has been lifted, we can
use av_memcpy_backptr() here as well.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 18:57:24 +01:00
Diego Biurrun
e831b3b852 av_memcpy_backptr: Drop no longer necessary malloc padding
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 18:57:24 +01:00
Paul B Mahol
e2820d99f2 pnmdec: use more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-23 17:25:38 +00:00
Diego Biurrun
330b864cda dsputil: Replace AV_WNxx(AV_RNxx()) combinations by AV_COPYxxU 2012-10-23 16:54:17 +02:00
Diego Biurrun
aa91fe8091 dxtory: Replace AV_WN16A(AV_RN16A()) combination by AV_COPY16 2012-10-23 16:53:42 +02:00
Michael Niedermayer
79ec524ff5 Merge commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25'
* commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25':
  mpegaudiodec: Fix buffer handling on random access
  mpegaudio: Refactor mp3on4 flush function
  fate: Add dependencies for audio tests
  fate: cosmetics: Group idct8x8 test together with all other libavcodec tests
  fate: More fine-grained dependencies for libavcodec test programs

Conflicts:
	tests/fate/audio.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 15:08:55 +02:00
Michael Niedermayer
35ce42e070 Merge commit '8b8899ac3233b4f7af83ded0dc032fad8902d714'
* commit '8b8899ac3233b4f7af83ded0dc032fad8902d714':
  fate: Declare avcodec/avformat deps in the respective Makefile snippets
  fate: Add dependencies for WMA and WavPack tests
  Improve wording and spelling of av_log_missing_feature messages.
  lavu: remove disabled FF_API_AV_FIFO_PEEK cruft

Conflicts:
	libavcodec/aacsbr.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 15:00:27 +02:00
Luca Barbato
9ab0874ea8 mp3: properly forward mp_decode_frame errors
The function can return either a parsing error or a memory management
error.
2012-10-23 14:22:16 +02:00
Luca Barbato
0c03cc6838 mp3: exit on parsing error in mp_decode_frame
Properly forward mp_decode_layer3 errors, mp_decode_layer1 and
mp_decode_layer2 do not return errors.

Based on a patch by Michael Niedermayer.
2012-10-23 14:22:16 +02:00
Michael Niedermayer
a65bc2712d Merge commit '468ea9d5b14f92fe61f47f034e67066f65163f5f'
* commit '468ea9d5b14f92fe61f47f034e67066f65163f5f':
  Revert "avutil: make some tables visible again"
  Revert "avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility"

Conflicts:
	libavcodec/sqrt_tab.c
	libavutil/libavutil.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 13:34:42 +02:00
Michael Niedermayer
af3fe43d84 Merge commit '2b8dd371e4d276ca0d342e82b8b4cc281be0630a'
* commit '2b8dd371e4d276ca0d342e82b8b4cc281be0630a':
  lavu: postpone recent deprecations until the next major bump
  APIchanges: update lavr bump date
  avconv: only apply presets when we have an encoder.
  atrac3: replace a calculation with FFALIGN()
  atrac3: remove unused ATRAC3Context field, sample_rate
  atrac3: use sizeof(variable) instead of sizeof(type)
  atrac3: simplify MDCT window calculation

Conflicts:
	doc/APIchanges

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 13:05:52 +02:00
Mans Rullgard
fab0a8b2c6 libm: add fallbacks for various single-precision functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-23 12:00:21 +01:00
Michael Niedermayer
7bc6631dd0 Merge commit '5d1007f74dd496d54b932242004382f44e3b22b4'
* commit '5d1007f74dd496d54b932242004382f44e3b22b4':
  atrac3: initialize static tables in AVCodec.init_static_data()
  atrac3: separate window initialization from IMDCT initialization
  atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used
  atrac3: remove unused ATRAC3Context field, bit_rate

Conflicts:
	libavcodec/atrac3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 12:51:13 +02:00
Michael Niedermayer
8748472f39 Merge commit 'a2664c91fba15a1307f676ffad511f8f86fb3a27'
* commit 'a2664c91fba15a1307f676ffad511f8f86fb3a27':
  atrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used
  atrac3: remove unused ATRAC3Context field, samples_per_channel
  atrac3: use AVCodecContext.block_align instead of keeping a private copy
  atrac3: move the 'delay' field from ATRAC3Context to where it is used
  atrac3: move the 'version' field from ATRAC3Context to where it is used

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 12:41:08 +02:00
Michael Niedermayer
dcb0d1193a Merge commit '5ac673b5531d846b79a3d77e3e932e0cb1234c45'
* commit '5ac673b5531d846b79a3d77e3e932e0cb1234c45':
  atrac3: use AVCodecContext.channels instead of keeping a private copy
  atrac3: simplify some loop indexing
  atrac3: cosmetics: pretty-printing and renaming
  pcm: define AVCodec instances only for enabled codecs
  libxvid: remove useless doxy comments.
  lavc: remove stats_out from the options table.

Conflicts:
	libavcodec/atrac3.c
	libavcodec/pcm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 12:36:16 +02:00
Michael Niedermayer
ec444c84cf mpegaudiodec: Fix buffer handling on random access 2012-10-23 10:52:25 +02:00
Diego Biurrun
2f17f265ed mpegaudio: Refactor mp3on4 flush function 2012-10-23 10:52:25 +02:00
Diego Biurrun
8f4c414df6 Improve wording and spelling of av_log_missing_feature messages. 2012-10-23 10:28:40 +02:00
Anton Khirnov
c6b25d1d5e Revert "avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility"
This reverts commit d15c21e5fa.

After the major bump this is no longer necessary.
2012-10-23 07:33:05 +02:00
Michael Niedermayer
34ccb94796 g723_1: remove unneeded cliping
Fixes CID703731
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 03:03:59 +02:00
Michael Niedermayer
e9b61fffbe g722dec: s/Libav/FFmpeg/ The copyright years predate the existence of Libav
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 03:03:53 +02:00
Michael Niedermayer
da317efd92 j2k: reorder multiplications to avoid interger overflows related to precincts
Fixes CID703778, CID703777
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 00:03:49 +02:00
Michael Niedermayer
45ae9a8fc9 j2k: reorder multiplications to avoid interger overflows related to code blocks
Fixes CID703776, CID703775
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 00:03:49 +02:00
Michael Niedermayer
22793d7bb3 ffmpeg/lavc: move experimental warnings to libavcodec.
This way they are available to all applications and not just ffmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 17:58:33 +02:00
Justin Ruggles
5d1007f74d atrac3: initialize static tables in AVCodec.init_static_data() 2012-10-22 10:10:08 -04:00
Justin Ruggles
a1f4cd371a atrac3: replace a calculation with FFALIGN()
This allocates 4 bytes less than the previous code if avctx->block_align is
a multiple of 4, but the extra 4 bytes is not really needed.
2012-10-22 10:10:08 -04:00
Justin Ruggles
78edce3f19 atrac3: separate window initialization from IMDCT initialization 2012-10-22 10:10:08 -04:00
Justin Ruggles
808686fc1e atrac3: remove unused ATRAC3Context field, sample_rate 2012-10-22 10:10:08 -04:00
Justin Ruggles
c51311b907 atrac3: move the 'frame_factor' field from ATRAC3Context to where it is used 2012-10-22 10:10:08 -04:00
Justin Ruggles
89a6c32bc1 atrac3: use sizeof(variable) instead of sizeof(type) 2012-10-22 10:10:08 -04:00
Justin Ruggles
327747de15 atrac3: simplify MDCT window calculation 2012-10-22 10:10:08 -04:00
Justin Ruggles
a2664c91fb atrac3: move the 'samples_per_frame' field from ATRAC3Context to where it is used 2012-10-22 10:10:07 -04:00
Justin Ruggles
7e76f27081 atrac3: remove unused ATRAC3Context field, bit_rate 2012-10-22 10:10:07 -04:00
Justin Ruggles
7c1f93afe6 atrac3: remove unused ATRAC3Context field, samples_per_channel 2012-10-22 10:10:07 -04:00
Justin Ruggles
cdd0e0de81 atrac3: use AVCodecContext.block_align instead of keeping a private copy 2012-10-22 10:10:07 -04:00
Justin Ruggles
64ebbb8f89 atrac3: move the 'delay' field from ATRAC3Context to where it is used 2012-10-22 10:10:07 -04:00
Justin Ruggles
5ac673b553 atrac3: use AVCodecContext.channels instead of keeping a private copy 2012-10-22 10:10:06 -04:00
Justin Ruggles
56a9d2b44e atrac3: move the 'version' field from ATRAC3Context to where it is used 2012-10-22 10:10:06 -04:00
Justin Ruggles
aefdb735c3 atrac3: simplify some loop indexing 2012-10-22 10:10:06 -04:00
Justin Ruggles
e55d53905f atrac3: cosmetics: pretty-printing and renaming
also does some minor refactoring.
2012-10-22 10:10:06 -04:00
Mans Rullgard
abdee95224 pcm: define AVCodec instances only for enabled codecs
This defines an AVCodec only if the corresponding CONFIG option is
enabled instead of using the broad CONFIG_ENCODERS/DECODERS.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-22 14:40:57 +01:00
Anton Khirnov
5957aefc7c libxvid: remove useless doxy comments. 2012-10-22 15:20:23 +02:00
Michael Niedermayer
f9cf14c8da Merge remote-tracking branch 'qatar/master'
* qatar/master:
  riff: remove a write-only variable
  lavc: extend frame_size doxy.
  alacdec: set bits_per_raw_sample

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 14:50:06 +02:00
Anton Khirnov
b691135d0c lavc: remove stats_out from the options table.
Since it is declared as a string AVOption, the generic freeing code
attempts to free it on codec close. Some codecs might have already freed
it elsewhere (or didn't even allocate it with av_malloc() in the first
place), so this might lead to an invalid free.

There is no point in having this field accessible as an AVOption, so
remove it from the options table.

Fixes Bug 380.

CC: libav-stable@libav.org
2012-10-22 14:44:07 +02:00
Michael Niedermayer
e3a91c51f7 Merge commit 'c3e15f7b39aac2012f09ee4ca86d2bc674ffdbd4'
* commit 'c3e15f7b39aac2012f09ee4ca86d2bc674ffdbd4':
  rtpdec: Don't pass a non-AVClass pointer as log context
  rtsp: Update a comment to the current filename scheme
  avcodec: handle AVERROR_EXPERIMENTAL
  avutil: Add AVERROR_EXPERIMENTAL
  avcodec: prefer decoders without CODEC_CAP_EXPERIMENTAL

Conflicts:
	doc/APIchanges
	ffmpeg.c
	libavcodec/utils.c
	libavformat/rtpdec.c
	libavutil/error.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-22 14:39:12 +02:00
Anton Khirnov
d6f4fe68c8 lavc: extend frame_size doxy. 2012-10-22 08:49:58 +02:00
Justin Ruggles
46a86c6194 alacdec: set bits_per_raw_sample 2012-10-21 23:54:51 -04:00
Michael Niedermayer
248b1ff26b Fix various uses of av_log_missing_feature()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 23:13:53 +02:00
Nathan Caldwell
c854102da7 avcodec: handle AVERROR_EXPERIMENTAL
Error out on init if a codec with CODEC_CAP_EXPERIMENTAL is requested
and strict_std_compliance is not FF_COMPLIANCE_EXPERIMENTAL.

Move the check from avconv to avcodec_open2() and return
AVERROR_EXPERIMENTAL accordingly.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-21 23:03:26 +02:00
Nathan Caldwell
a4aa20fbdb avcodec: prefer decoders without CODEC_CAP_EXPERIMENTAL
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-21 22:27:58 +02:00
Stefano Sabatini
8c2dbc3805 lavc/utils: provide more feedback in case of experimental codec 2012-10-21 21:11:02 +02:00
Michael Niedermayer
5713091818 mpegaudiodec: Fix buffer handling on random access
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 20:59:08 +02:00
Marton Balint
d6e9566949 h264: add support for AFD detection
Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Kieran Kunhya <kierank@ob-encoder.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 18:22:50 +02:00
Michael Niedermayer
f72b735d41 libavcodec/vorbisenc: add {} to complex ifs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 18:05:22 +02:00
Michael Niedermayer
4ce9312d76 libavcodec/cook: add {} to complex ifs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 18:05:22 +02:00
Clément Bœsch
6fb2fd895e lavc: add lavfi metadata support.
This commit introduces a new AVPacket side data type:
AV_PKT_DATA_STRINGS_METADATA. Its main goal is to provide a way to
transmit the metadata from the AVFilterBufferRef up to the AVFrame. This
is at the moment "only" useful for lavfi input from libavdevice:
lavd/lavfi only outputs packets, and the metadata from the buffer ref
kept in its context needs to be transmitted from the packet to the frame
by the decoders. The buffer ref can be destroyed at any time (along with
the metadata), and a duplication of the AVPacket needs to duplicate the
metadata as well, so the choice of using the side data to store them was
selected.

Making sure lavd/lavfi raises the metadata is useful to allow tools like
ffprobe to access the filters metadata (it is at the moment the only
way); ffprobe will now automatically show the AVFrame metadata in any
customizable output format for users. API users will also be able to
access the AVFrame->metadata pointer the same way ffprobe does
(av_frame_get_metadata).

All the changes are done in this single commit to avoid some memory
leaks: for instances, the changes in lavfi/avcodec.c are meant to
duplicate the metadata from the buffer ref into the AVFrame. Unless we
have an internal way of freeing the AVFrame->metadata automatically, it
will leak in most of the user apps. To fix this problem, we introduce
AVCodecContext->metadata and link avctx->metadata to the current
frame->metadata and free it at each decode frame call (and in the codec
closing callback for the last one). But doing this also means to update
the way the tiff decoder already handles the AVFrame->metadata (it's the
only one decoder with frame metadata at the moment), by making sure it
is not trying to free a pointer already freed by the lavc internals.

The lavfi/avcodec.c buffer ref code is based on an old Thomas Kühnel
work, the rest of the code belongs to the commit author.

Signed-off-by: Thomas Kühnel <kuehnelth@googlemail.com>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
2012-10-21 17:29:10 +02:00
Michael Niedermayer
d7b8a9a589 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: adpcm: cosmetics: Sort test entries
  fate: adpcm: Add dependencies
  svq3: cosmetics: Drop useless parentheses

Conflicts:
	libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 17:09:36 +02:00
Michael Niedermayer
0e09761686 Merge commit 'a7d2861d36756b913e85681b86ed3385274e8ced'
* commit 'a7d2861d36756b913e85681b86ed3385274e8ced':
  svq3: K&R formatting cosmetics
  fate: Introduce ENCMUX macro for tests that require encoders and a muxer
  ffv1: Add missing #includes to header file

Conflicts:
	libavcodec/ffv1.h
	libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 17:01:01 +02:00
Michael Niedermayer
aa760b1735 Merge commit '2d09b36c0379fcda8f984bc8ad8816c8326fd7bd'
* commit '2d09b36c0379fcda8f984bc8ad8816c8326fd7bd':
  doc/platform: Add info on shared builds with MSVC
  doc/platform: Move a caveat down to the notes section
  ARM: reinstate optimised intmath.h
  ffv1: update to ffv1 version 3

Conflicts:
	doc/platform.texi
	libavcodec/ffv1.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 16:13:55 +02:00
Michael Niedermayer
99ea47fe5a Merge commit '4a2a4524a3f50ed302820ba971ddd48e78c7436f'
* commit '4a2a4524a3f50ed302820ba971ddd48e78c7436f':
  ffv1: propagate errors

Conflicts:
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 14:55:21 +02:00
Michael Niedermayer
69fd0b7adb Merge commit '71f7b22dba60524b2285643ae0b49d8f64977129'
* commit '71f7b22dba60524b2285643ae0b49d8f64977129':
  ffv1: split decoder and encoder

Conflicts:
	libavcodec/Makefile
	libavcodec/ffv1.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 14:37:15 +02:00
Michael Niedermayer
e4255eaf47 ffv1: split decoder and encoder
This is not based on lucas work due to code divergence (its less work this way
than trying to merge from a split based on 2 years outdated code)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 14:26:23 +02:00
Michael Niedermayer
dcbff35199 Merge commit 'd15c21e5fa3961f10026da1a3080a3aa3cf4cec9'
* commit 'd15c21e5fa3961f10026da1a3080a3aa3cf4cec9':
  avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility
  avutil: make some tables visible again
  avutil: remove inline av_log2 from public API
  celp_math: rename ff_log2 to ff_log2_q15

Conflicts:
	libavutil/libavutil.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 13:35:42 +02:00
Michael Niedermayer
05f228b0a0 ffv1: fix gray
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 04:25:30 +02:00
Michael Niedermayer
7696a392e2 mp3dec: propagate error code correctly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 02:52:10 +02:00
Diego Biurrun
a7d2861d36 svq3: K&R formatting cosmetics 2012-10-20 21:10:21 +02:00
Diego Biurrun
af1ede069c svq3: cosmetics: Drop useless parentheses 2012-10-20 21:10:21 +02:00
Diego Biurrun
6cfca5b6ae ffv1: Add missing #includes to header file 2012-10-20 21:10:21 +02:00
Luca Barbato
0f13cd3187 ffv1: update to ffv1 version 3
Based on code from Carl Eugen Hoyos, Michael Niedermayer and Paul B Mahol.
2012-10-20 18:14:52 +02:00
Luca Barbato
4a2a4524a3 ffv1: propagate errors 2012-10-20 18:14:51 +02:00