Commit Graph

21381 Commits

Author SHA1 Message Date
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
Luca Barbato
71f7b22dba ffv1: split decoder and encoder 2012-10-20 18:14:43 +02:00
Hendrik Leppkes
79393a8363 Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 18:00:13 +02:00
Michael Niedermayer
d7cabb3c7e bgmc: check the correct pointers
Fixes CID90539, CID90538
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 15:33:44 +02:00
Michael Niedermayer
bf52ad1e49 lavc: revert broken hunk from 1cd9c81ddb
This should fix fate failures

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 13:59:53 +02:00
Martin Storsjö
d15c21e5fa avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility
Earlier versions of for instance of libavcodec expect this symbol to be
present in libavutil. This commit can be reverted after the next major
bump.

New shared builds of avcodec will link to the internal copy of the
table within that library, so those builds won't rely on this table
being present in avutil any longer either.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-20 14:31:55 +03:00
Mans Rullgard
f0c07be649 celp_math: rename ff_log2 to ff_log2_q15
This name is more descriptive as the function returns a fixed-point
value with 15 fraction bits.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-20 12:28:45 +01:00
Michael Niedermayer
04c6ecb7da Merge commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed'
* commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed':
  fate-vc1: add dependencies
  ARM: fix overreads in neon h264 chroma mc
  rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
  gitignore: ignore files created by msvc
  fate: Add proper dependencies for the tests in video.mak
  configure: Disable Snow decoder and encoder by default
  lzo: Drop obsolete fast_memcpy reference
  build: Drop OBJS declaration for non-existing PCM_DVD encoder
  mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all

Conflicts:
	libavcodec/mpegvideo.c
	libavformat/rtsp.c
	tests/fate/microsoft.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 12:37:52 +02:00
Stefano Sabatini
7bc533c41b lavc/utils: fix a few case/punctuation inconsistencies in avcodec_open2() 2012-10-20 12:06:20 +02:00
Stefano Sabatini
1cd9c81ddb lavc/utils: extend feedback provided by avcodec_open2() 2012-10-20 12:06:14 +02:00
Mans Rullgard
1846ddf0a7 ARM: fix overreads in neon h264 chroma mc
The loops were reading ahead one line, which could end up outside the
buffer for reference blocks at the edge of the picture.  Removing
this readahead has no measurable performance impact.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-20 01:28:38 +01:00
Hendrik Leppkes
953a3dcc4e Mark data symbols shared between libraries with av_export
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 01:56:50 +02:00
Hendrik Leppkes
33f2a49423 vc1: only disable interlaced b-frames for software decoding
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 00:07:43 +02:00
Hendrik Leppkes
b87ff34496 vc1: implement vc1 field interlaced dxva2 decoding
Tested-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 00:07:14 +02:00
Michael Niedermayer
0fa26bd470 utvideoenc: fix theoretical integer overflow
The image sizes needed for this overflow to happen are currently not
supported in lavc, thus this should have no effect execpt making the
code more robust in light of future changes.

Fixes CID732245
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 18:57:57 +02:00
Michael Niedermayer
d86ef54476 avcodec_align_dimensions2: add missing breaks
This should have just cosmetic effects

Fixes CID603265
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 18:50:09 +02:00
Ash Hughes
2470851f12 lavc: enable recursively using avcodec_open2/close.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 18:05:12 +02:00
Diego Biurrun
c896aa984e build: Drop OBJS declaration for non-existing PCM_DVD encoder 2012-10-19 17:04:41 +02:00
Michael Niedermayer
6bcdfe48d0 mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-19 15:42:35 +03:00
Michael Niedermayer
c5fd9d3c35 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  fate: Add proper dependencies in qt.mak
  fate: Add proper dependencies in lossless-video.mak
  indeo3: do not try to output more lines than we can fit
  bmv: get a new frame on every decode_frame(), so we can use direct rendering

Conflicts:
	libavcodec/bmv.c
	tests/fate/lossless-video.mak
	tests/fate/qt.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 14:15:47 +02:00
Michael Niedermayer
81ff0c24ef Merge commit '1cd432e167b1a80853760c89a33606e2b5f229c2'
* commit '1cd432e167b1a80853760c89a33606e2b5f229c2':
  configure: fix libcdio check
  rtsp: Allow setting the reordering buffer size via an AVOption
  rtsp: Vertically align a constant definition
  rtp: Update the check for distinguishing between RTP and RTCP
  aac: fix build with hardcoded tables
  fate: dependencies for screen codec tests
  riff: Move functions around to be covered by appropriate #ifdefs

Conflicts:
	configure
	tests/fate/screen.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 13:58:14 +02:00
Michael Niedermayer
b0554fec04 Merge commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72'
* commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72':
  fate: add a dependency helper macro
  Add support for building shared libraries with MSVC
  avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
  gxf: Add a local copy of the relevant parts of the frame rate table
  configure: Split out msvc as a separate target OS
  aviobuf: Remove a senseless ifdef in avio_seek

Conflicts:
	configure
	libavcodec/dirac.c
	libavcodec/mpeg12data.h
	libavcodec/mpeg12enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 13:29:24 +02:00
Kostya Shishkov
169514c440 indeo3: do not try to output more lines than we can fit
Internally chroma planes have multiple of four height while allocated image
planes might be smaller if CODEC_FLAG_EMU_EDGE is set. Thus we should not
output more lines of chroma than frame can accept.

Also the decoder can be safely switched to direct rendering now.
2012-10-19 07:58:51 +02:00
Kostya Shishkov
8774d58358 bmv: get a new frame on every decode_frame(), so we can use direct rendering 2012-10-19 07:58:51 +02:00
Michael Niedermayer
d50aa006fb tiffenc: fix integer overflow
Fixes CID700699
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 03:36:42 +02:00
Michael Niedermayer
a06f943f9d roqvideodec: replace dead code by assert
Fixes CID732195
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 03:15:06 +02:00
Michael Niedermayer
c0b17ea106 roqaudioenc: Fix crash with very small roq files
Fixes CID703669
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 02:57:57 +02:00
Paul B Mahol
4ebf305951 lavc/tta: do not overwrite bits_per_coded_sample
It is supposed to be set in libavformat only.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:02 +00:00
Paul B Mahol
445f36d7c8 kmvc: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:02 +00:00
Paul B Mahol
be536f084a xxan: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
0bf40e0ef4 lavc/yop: remove redudant YOP in av_log() messages
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
4c6c6a266e jvdec: use more meaningful error code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
527224830a idcinvideo: if decoding fails return error
Previously if frame decoding failed it would be
silently reported as valid frame.

The fate ref is updated because sample have
truncated last video packet.

While here return meaningful error codes.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Paul B Mahol
aadb7b3ac4 lavc/c93: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-19 00:08:01 +00:00
Michael Niedermayer
05b0337025 motionpixels/mp_decode_frame_helper: assert that the first pixel doesnt reuse the last.
reusing the last would use uninitialized data, this should be
impossible currently, but better to check by assert.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 01:20:27 +02:00
Michael Niedermayer
df727d408c mlp_parser: print error when ff_combine_frame() fails to add the current buffer
Fixes part of CID602338
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-19 00:05:03 +02:00
Clément Bœsch
e807a2b648 lavc: add raw text subtitles decoder. 2012-10-18 22:51:44 +02:00
Michael Niedermayer
c753b56b4d ff_convert_matrix: fix integer overflow
Fixes CID608053
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:51:04 +02:00
Michael Niedermayer
5537c92f84 mpegvideoenc: check return value of ff_MPV_frame_start()
Fixes CID703622
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:42:31 +02:00
Michael Niedermayer
2472f3facb lzwenc: change assert to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:42:04 +02:00
Michael Niedermayer
97d1cb5cd4 bmv: remove unreachable default case
Fixes CID732191
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 21:13:28 +02:00
Mans Rullgard
7a12d97eb1 aac: fix build with hardcoded tables
aac_tablegen.h includes aac.h for the POW_SF2_ZERO definition, but
this also pulls in a raft of other headers, some of which are not
safe to use in code built with the host compiler.

Moving POW_SF2_ZERO to aac_tablegen_decl.h, where the declaration
of the array it relates to already resides, fixes the problems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-18 19:59:43 +01:00
Michael Niedermayer
23b203014f indeo4: prevent printing uninitialized variable
Fixes CID703822
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 20:41:51 +02:00
Michael Niedermayer
2b1a2466c7 dv: change assert(a2 < 4) to av_assert()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 20:29:03 +02:00
Martin Storsjö
d66c52c2b3 Add support for building shared libraries with MSVC
This requires the makedef perl script by Derek, from the
c89-to-c99 repo. That scripts produces a .def file, listing
the symbols to be exported, based on the gcc version scripts
and the built object files.

To properly load non-function symbols from DLL files, the
data symbol declarations need to have the attribute
__declspec(dllimport) when building the calling code. (On mingw,
the linker can fix this up automatically, which is why it has not
been an issue so far. If this attribute is omitted, linking
actually succeeds, but reads from the table will not produce the
desired results at runtime.)

MSVC seems to manage to link DLLs (and run properly) even if
this attribute is present while building the library itself
(which normally isn't recommended) - other object files in the
same library manage to link to the symbol (with a small warning
at link time, like "warning LNK4049: locally defined symbol
_avpriv_mpa_bitrate_tab imported" - it doesn't seem to be possible
to squelch this warning), and the definition of the tables
themselves produce a warning that can be squelched ("warning C4273:
'avpriv_mpa_bitrate_tab' : inconsistent dll linkage, see previous
definition of 'avpriv_mpa_bitrate_tab').

In this setup, mingw isn't able to link object files that refer to
data symbols with __declspec(dllimport) without those symbols
actually being linked via a DLL (linking avcodec.dll ends up with
errors like "undefined reference to `__imp__avpriv_mpa_freq_tab'").
The dllimport declspec isn't needed at all in mingw, so we simply
choose not to declare it for other compilers than MSVC that requires
it. (If ICL support later requires it, the condition can be extended
later to include both of them.)

This also implies that code that is built to link to a certain
library as a DLL can't link to the same library as a static library.
Therefore, we only allow building either static or shared but not
both at the same time. (That is, static libraries as such can be,
and actually are, built - this is used for linking the test tools to
internal symbols in the libraries - but e.g. libavformat built to
link to libavcodec as a DLL cannot link statically to libavcodec.)

Also, linking to DLLs is slightly different from linking to shared
libraries on other platforms. DLLs use a thing called import
libraries, which is basically a stub library allowing the linker
to know which symbols exist in the DLL and what name the DLL will
have at runtime.

In mingw/gcc, the import library is usually named libfoo.dll.a,
which goes next to a static library named libfoo.a. This allows
gcc to pick the dynamic one, if available, from the normal -lfoo
switches, just as it does for libfoo.a vs libfoo.so on Unix. On
MSVC however, you need to literally specify the name of the import
library instead of the static library.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:15 +03:00
Martin Storsjö
eaa9b2e66c avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
This table doesn't need to be shared with libavformat any longer.
Add mpeg12 to the name to make it less ambiguous, while renaming it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-18 14:26:14 +03:00
Michael Niedermayer
3777e6b3bf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mips64: mark hi/lo registers clobbered in MAC64/MLS64 macros
  fate: list lavfi tests in a makefile

Conflicts:
	configure
	tests/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 12:16:08 +02:00
Michael Niedermayer
17e4b0644b Merge commit '292d1e78743855404c7d07e3e7cb3f9c9ae6275b'
* commit '292d1e78743855404c7d07e3e7cb3f9c9ae6275b':
  fate: dependencies for acodec tests
  fate: dependencies for vsynth tests
  fate: add macros useful for conditionally enabling things
  libmp3lame: resize the output buffer if needed

Conflicts:
	tests/fate/acodec.mak
	tests/fate/vcodec.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-18 10:48:00 +02:00
Mans Rullgard
b93e934aee mips64: mark hi/lo registers clobbered in MAC64/MLS64 macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-17 22:37:12 +01:00
Michael Niedermayer
d185c8a79b tiff: run strlen() after setting the pointer
Fixes CID733803
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 20:58:08 +02:00
Paul B Mahol
9b762e2cba idcinvideo: remove redundant " id CIN Video: " from av_log()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-17 14:09:47 +00:00
Justin Ruggles
abd8b9e7e0 libmp3lame: resize the output buffer if needed
The LAME API documentation for the required buffer size refers to the size for
a single encode call. However, we store multiple frames in the same output
buffer but only read 1 frame at a time out of it. As a result, the buffer size
given in lame_encode_buffer() is actually smaller than what it should be.
Since we do not know how many frames it will end up buffering, it is best to
just reallocate if needed.
2012-10-17 09:59:13 -04:00
Michael Niedermayer
d6e87190fd Merge commit 'a25d912dca9cd553440167e0476c47581359c0fc'
* commit 'a25d912dca9cd553440167e0476c47581359c0fc':
  avcodec_encode_audio(): fix invalid free
  pcm-mpeg: correct bitrate calculation
  ffv1: K&R formatting cosmetics
  fate: Add rangecoder test
  network: #include stdint.h in network.h
  nut: export codec_tag provided by rawvideo
  avserver: move avserver-specific code from ffmdec.c to avserver.c

Conflicts:
	ffserver.c
	libavcodec/ffv1.c
	libavformat/ffmdec.c
	libavformat/nutenc.c
	tests/ref/lavfi/crop
	tests/ref/lavfi/crop_scale
	tests/ref/lavfi/crop_scale_vflip
	tests/ref/lavfi/crop_vflip
	tests/ref/lavfi/null
	tests/ref/lavfi/pixdesc
	tests/ref/lavfi/pixfmts_copy
	tests/ref/lavfi/pixfmts_crop
	tests/ref/lavfi/pixfmts_hflip
	tests/ref/lavfi/pixfmts_null
	tests/ref/lavfi/pixfmts_pad
	tests/ref/lavfi/pixfmts_scale
	tests/ref/lavfi/pixfmts_vflip
	tests/ref/lavfi/scale200
	tests/ref/lavfi/scale500
	tests/ref/lavfi/vflip
	tests/ref/lavfi/vflip_crop
	tests/ref/lavfi/vflip_vflip

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 14:17:55 +02:00
Paul B Mahol
1ade37ae9c lavc/tta: use meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-17 12:11:34 +00:00
Michael Niedermayer
4e2e3d943e ffv1: fix packed rgb with 1.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-17 03:19:11 +02:00
Rafaël Carré
a25d912dca avcodec_encode_audio(): fix invalid free
Since 2bc0de385, AVFrame needs to be initialized
before calling avcodec_get_frame_defaults().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-10-16 18:49:31 +02:00
Christian Schmidt
4a7429203a pcm-mpeg: correct bitrate calculation
Bitrate calculation is off since the bluray spec always specifies
an even number of coded channels. This was honored in the decoder,
but not for bitrate calculation.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-16 16:03:03 +02:00
Luca Barbato
9a978b334b ffv1: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-10-16 15:45:55 +02:00
Michael Niedermayer
83962004f7 Merge commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b'
* commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b':
  tiny_psnr: check for specified sample size less than 1
  fate: improve md5sum utility selection
  rangecoder-test: Drop timer output that clutters stderr

Conflicts:
	tests/tiny_psnr.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 14:04:14 +02:00
Michael Niedermayer
5717562c78 Merge commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d'
* commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d':
  rangecoder-test: Return in case of an error
  build: simplify enabling of compat objects

Conflicts:
	configure
	libavutil/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 13:57:10 +02:00
Michael Niedermayer
9c669672c7 x86/motion_est: widen before multiply.
This fixes CID700558, CID700557, CID700556
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 03:09:28 +02:00
Michael Niedermayer
1fe45903b8 msvideo1enc: fix interframe encoding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-16 02:22:27 +02:00
Michael Niedermayer
f5581266f7 ra288: assert order to be withinn supported range in do_hybrid_window()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 23:55:54 +02:00
Michael Niedermayer
db3a0aae9f msvideo1enc: fix initial keyframe value
keyframe was never set to anything but 1

Fixes CID733730
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 23:52:08 +02:00
Diego Biurrun
f1be514540 rangecoder-test: Drop timer output that clutters stderr 2012-10-15 21:16:36 +02:00
Diego Biurrun
c1fcfdec75 rangecoder-test: Return in case of an error 2012-10-15 21:15:17 +02:00
Tomas Härdin
8cbb8f5357 dv: Set FS flag from AVFrame.top_field_first
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 18:53:44 +02:00
Tomas Härdin
7b383bd9d7 dvdec: Set top_field_first from FS flag
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 18:53:44 +02:00
Tomas Härdin
2b4bbd12c2 dvdec: Move the VSC pack parsing to before avctx->execute()
This allows the next commit to parse the FS flag.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 18:53:44 +02:00
Tim Nicholson
0ee57f8b14 rawdec.c: Extract interlace information from quicktime flag if it exisits.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 18:53:44 +02:00
Paul B Mahol
011f3892ff h264: use designated initializers for AVClass
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-15 13:43:33 +00:00
Paul B Mahol
e75357ea7c xbmenc: cosmetics: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-15 13:28:23 +00:00
Paul B Mahol
5864fe62ef flacdec: replace -1 with AV_SAMPLE_FMT_NONE
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-15 13:26:47 +00:00
Michael Niedermayer
5bac83dae8 shorten: fix U8 to be planar too
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 15:09:46 +02:00
Paul B Mahol
916e40b5b4 smacker: return more meaningfull error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-15 12:48:38 +00:00
Michael Niedermayer
ae237a117a Merge remote-tracking branch 'qatar/master'
* qatar/master:
  swscale: try to use mmap only if available
  configure: check for mprotect
  wmapro: use planar sample format
  wmalossless: output in planar sample format
  wmadec: use float planar sample format output
  shorten: use planar sample format
  lavc: update documentation for AVFrame.extended_data

Conflicts:
	libavcodec/shorten.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 14:09:35 +02:00
Stefano Sabatini
cd559bb49a lavc: add xface image decoder and encoder
Based on libcompface code by James Ashton <James.Ashton@anu.edu.au>, and
relicensed to LGPL with the author's consent.
2012-10-15 08:32:18 +02:00
Michael Niedermayer
35782bfbca h264: Change asserts to av_asserts in ff_h264_fill_default_ref_list()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 03:22:00 +02:00
Michael Niedermayer
151469db33 j2kenc: remove unneeded dereference
Fixes CID703723
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-15 03:18:08 +02:00
Justin Ruggles
f9d732c264 wmapro: use planar sample format 2012-10-14 16:48:23 -04:00
Justin Ruggles
2725ce7c7c wmalossless: output in planar sample format 2012-10-14 16:48:23 -04:00
Justin Ruggles
7ebfe5b44a wmadec: use float planar sample format output 2012-10-14 16:48:23 -04:00
Justin Ruggles
977eb7d567 shorten: use planar sample format 2012-10-14 16:48:22 -04:00
Michael Niedermayer
bc077ca6b5 j2kdec: remove unneeded operation
Fixes CID717554
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 22:16:31 +02:00
Michael Niedermayer
1e6cbb01e9 j2kdec: make curtilenum integer.
This fixes a potential crash.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 22:16:31 +02:00
Michael Niedermayer
0de0ae5a20 tag_tree_decode: check node being non null
Fixes CID717843
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 22:16:31 +02:00
Michael Niedermayer
a6cac64f69 compute_lpc_coefs: assert that normalize and fail have a supported combination
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 22:16:31 +02:00
Michael Niedermayer
93ef29b6f4 noise_bsf: fix division by 0
Fixes CID733737
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 21:45:42 +02:00
Justin Ruggles
8441909f49 lavc: update documentation for AVFrame.extended_data 2012-10-14 15:00:45 -04:00
Michael Chinen
c73b1a1d80 flac_parser.c: fix issue with looping output for small files.
see trac 1345
https://ffmpeg.org/trac/ffmpeg/ticket/1345

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 20:39:10 +02:00
Thilo Borgmann
41bf943f70 bgmc: fix sizeof arguments (should fix CIDs: 700724 and 608084)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 20:37:43 +02:00
Hendrik Leppkes
572781b25f h264: fix parsing of old lossless profile (profile_idc == 144)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 16:04:10 +02:00
Peter Ross
6bf43441f0 eatgq: raise error on unsupported macroblock mode
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 16:01:22 +02:00
Peter Ross
0ea55365b9 ansi: by design nb_args may exceed the size of the args array, so guard accordingly
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 15:56:36 +02:00
Michael Niedermayer
d6f6a7557c Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avutil: Do not make ff_ symbols globally visible.
  avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
  build: tms470: work around glibc math.h problems
  configure: improve tms470 compiler usage with glibc

Conflicts:
	libavcodec/bmpenc.c
	libavcodec/rawdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 15:11:34 +02:00
Paul B Mahol
de3b1116da eatgq: fix small overread
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-14 12:54:10 +00:00
Paul B Mahol
dd5aff001e svq1dec: use log level that have more common sense
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-14 09:21:48 +00:00
Paul B Mahol
7b9fc769e4 svq1dec: use more common way to check if result is not zero
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-14 09:18:36 +00:00
Paul B Mahol
8f4020d8a4 svq1dec: check return value of get_bits1() in more common way
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-14 09:14:35 +00:00
Paul B Mahol
e2bf1082cc svq1dec: return more meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-14 09:12:19 +00:00
Michael Niedermayer
2217a2249d dpxenc: fix signed c99 overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 05:48:02 +02:00
Michael Niedermayer
014b178f84 g723_1: fix overflow in square_root()
the intermediate does not fit in a signed 32bit int

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:42:28 +02:00
Michael Niedermayer
2fed05f53a avoid more "0xFF << 24" as it is considered a integer overflow in C99
missed these in my previous search and replace

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:34:16 +02:00
Michael Niedermayer
b12d92efd6 avoid "0xFF << 24" as it is considered a integer overflow in C99
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:26:31 +02:00
Michael Niedermayer
d3d715ff13 mpeg4videodec: Recalculate timebase in case of guessing time increment bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 03:26:31 +02:00
Thilo Borgmann
feaff427c0 alsdec: fix clipping of weightings for MCC decoding
Fixes CID717905
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:18:46 +02:00
Michael Niedermayer
20ec0d2a75 mpegvideo: fix motion_val checks
Fixes CID604124
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:08:53 +02:00
Michael Niedermayer
f4d73f0fb5 mpegvideo: check return value of ff_MPV_common_init()
Fixes CID703621
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:08:44 +02:00
Michael Niedermayer
8cda27b753 avcodec_find_best_pix_fmt_of_2: fix handling or PIX_FMT_NONE
Fixes CID733775
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:08:44 +02:00
Michael Niedermayer
b3eb4f54c0 flashsv: check deflateInit() return value
Fixes CID703620
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 22:48:32 +02:00
Michael Niedermayer
6581b6cef4 dnxhdenc: assert ff_dnxhd_get_cid_table() return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 22:40:14 +02:00
Michael Niedermayer
1037e484f0 dnxhddata_ Fix mixup of sizeof() and array elements in ff_dnxhd_find_cid()
Fixes CID717910
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 22:36:15 +02:00
Michael Niedermayer
670b927aa2 ffv1: make sure gob_count is not 0
Fixes division by 0
Fixes CID733736

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 22:33:40 +02:00
Paul B Mahol
2c85727f6c lavc/codec_desc: add/update properties of some codecs
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 18:50:23 +00:00
Paul B Mahol
a5e0046a73 xbmdec: s/av_reverse/ff_reverse
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 18:00:48 +00:00
Diego Biurrun
52d113ee06 avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()
Functions used across libraries should have avpriv_ and not ff_ prefixes.
2012-10-13 19:59:20 +02:00
Paul B Mahol
93931143fe lavc: return s->get_buffer() error code if it errors out
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 16:03:03 +00:00
Paul B Mahol
f58f90238f pngenc: write sample aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 16:02:09 +00:00
Paul B Mahol
8288c2b6cb pngdec: read sample aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 16:02:09 +00:00
Michael Niedermayer
2a56e65c3b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vc1: Use codec ID from AVCodecContext while parsing frame header
  avplay: support mid-stream sample rate changes

Conflicts:
	ffplay.c
	libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 17:09:13 +02:00
Michael Niedermayer
15ef1cfe64 Merge commit 'f5962229bfcb14c2879e69ccdf7f1a4934168609'
* commit 'f5962229bfcb14c2879e69ccdf7f1a4934168609':
  avplay: use audio parameters from the decoded frame instead of AVCodecContext
  dca: allocate a secondary buffer for extra channels when downmixing
  configure: use utilities from /usr/xpg4/bin if it exists
  avstring-test: fix memory leaks

Conflicts:
	ffplay.c
	libavcodec/dcadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 16:39:42 +02:00
Michael Niedermayer
18884f159b Merge commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723'
* commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723':
  rtpdec_xiph: fix function return type
  smjpeg: fix type of 'ret' variable in smjpeg_read_packet()
  mpegvideo: remove write-only variable
  Use proper return values in case of missing features
  fate: add avstring test
  rangecoder-test: Set error message log level to error, instead of debug

Conflicts:
	libavcodec/aacdec.c
	libavcodec/amrnbdec.c
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 15:42:49 +02:00
Michael Niedermayer
c55bebe2cc Merge commit '90558e848a29ef1e85ecb1832ad9a26eebe958e0'
* commit '90558e848a29ef1e85ecb1832ad9a26eebe958e0':
  rangecoder: K&R formatting cosmetics

Conflicts:
	libavcodec/rangecoder.c
	libavcodec/rangecoder.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 15:35:05 +02:00
Michael Niedermayer
85fe70b64c Merge commit 'ca411fc1d34329cd17b28627f697e391ae52073f'
* commit 'ca411fc1d34329cd17b28627f697e391ae52073f':
  avcodec: Remove broken MMI optimizations

Conflicts:
	arch.mak
	configure
	libavcodec/avcodec.h
	libavcodec/mips/Makefile
	libavcodec/mips/dsputil_mmi.c
	libavcodec/mips/idct_mmi.c
	libavcodec/mips/mmi.h
	libavcodec/mips/mpegvideo_mmi.c
	libavcodec/options_table.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 15:25:11 +02:00
Michael Niedermayer
b4ca1b159f Merge commit 'bc4620e5d61a4dd9a1f654fadd281a172aab04be'
* commit 'bc4620e5d61a4dd9a1f654fadd281a172aab04be':
  Remove libmpeg2 #define remnants
  De-doxygenize some top-level files

Conflicts:
	ffmpeg.c
	ffmpeg.h
	ffmpeg_filter.c
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 15:01:39 +02:00
Michael Niedermayer
d6c342fdc0 Merge commit 'd5c62122a7b26704bf867a1262df358623bf5edf'
* commit 'd5c62122a7b26704bf867a1262df358623bf5edf':
  Move av_reverse table to libavcodec

Conflicts:
	libavcodec/asvenc.c
	libavcodec/vble.c
	libavutil/common.h
	libavutil/mathematics.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 14:35:42 +02:00
Michael Niedermayer
d197bd4f5e Merge commit '930c9d4373e0f3cb7c64fcfc129127a309f6d066'
* commit '930c9d4373e0f3cb7c64fcfc129127a309f6d066':
  avutil: Duplicate ff_log2_tab instead of sharing it across libs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 14:24:58 +02:00
Sami Pietilä
3cc0252732 vp8dec: reset loopfilter delta values at keyframes
while testing a VP8 encoder I found a mismatch between FFMPEG and libvpx
VP8 decoders. The reason for this mismatch is that FFMPEG doesn't reset
loopfilter delta values at keyframes. Patch that fixes the issue is below.
I've verified that the output of ffmpeg after this patch matches libvpx.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 12:43:24 +02:00
Paul B Mahol
79133fd0e5 pcxenc: store sample aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 08:22:27 +00:00
Paul B Mahol
f2f711cde2 pcx: read sample aspect ratio
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 08:22:26 +00:00
Paul B Mahol
92b3d8bc53 bethsoftvideo: return meaningfull error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 08:07:41 +00:00
Paul B Mahol
efb0e4e7af truemotion2: use more meaningful return codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-13 07:55:50 +00:00
Mashiat Sarker Shakkhar
5d2be71b9e vc1: Use codec ID from AVCodecContext while parsing frame header
This fixes a segfault with samples that I have (both of them MPEG-TS). Looks like
avctx->codec is not being set during parsing.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-10-13 08:33:07 +02:00
Justin Ruggles
61d5313d94 dca: allocate a secondary buffer for extra channels when downmixing
The output AVFrame buffer only has data for the downmix channels.
Fixes a segfault when decoding dca with request_channels == 2.
2012-10-13 00:07:10 -04:00
Michael Niedermayer
8dc8994427 jpegls: increase run_index to 4
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 03:54:04 +02:00
Michael Niedermayer
4acfe3d193 jpegls: fix off limit
Fixes part of CID717913
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 03:54:04 +02:00
Michael Niedermayer
9f9307ff2a rv30_decode_intra_types: make check tighter
This makes no differnce as the affected values cannot occur
But it will likely help static analyzers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 03:32:38 +02:00
Michael Niedermayer
3f01042142 ff_celp_lp_synthesis_filterf: change loop end check
This makes no difference for supported input but avoids a
out of array read with input that is never passed in currently

Fixes CID717919
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 03:32:38 +02:00
Michael Niedermayer
3f350a482f ff_celp_lp_synthesis_filterf: check that filter_length is within the supported range
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 03:32:38 +02:00
Michael Niedermayer
54b2d317ed ffv1: avoid checking a double for equality
if 0.0 != 0.0 a out of array read would occur, equal checks
with floating point may behave in such odd ways, though
this is very unlikely in a real implementation of a compiler

Fixes: CID718936
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 01:51:45 +02:00
Michael Niedermayer
c2340831b8 aacsbr: change order of operation to prevent out of array read
Fixes CID732250
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 00:31:21 +02:00
Georg Lippitsch
24778c32d8 Fix writing 12 bit DPX
The DPX encoder now writes 12 DPX that open correctly (tested with
ImageMagick), and also correspond to the 12 bit sample files at
http://samples.ffmpeg.org/image-samples/dpx_samples.zip

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 00:31:21 +02:00
Georg Lippitsch
05b7315412 Fix DPX decoder
Rewrite the DPX decoder to work with provided sample DPXs at
http://samples.ffmpeg.org/image-samples/dpx_samples.zip

The decoder could only decode 8 and 10 bit without alpha correctly,
failing or even crashing at other flavors. This patch aims to fix
these issues, properly decoding all variants of DPX provided in the
referenced DPX sample zip. For 10 and 12 bit, the alpha channel
is ignored, but decoding is still possible.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 00:31:21 +02:00
Mans Rullgard
7e76fc528d mpegvideo: remove write-only variable
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 22:21:10 +01:00
Michael Niedermayer
5e885275f1 mpeg4videodec: disable frame multithreading for GMC, its not implemented at all
This fixes race conditions in decoding MPEG-4 GMC files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 22:53:22 +02:00
Diego Biurrun
90558e848a rangecoder: K&R formatting cosmetics 2012-10-12 20:56:54 +02:00
Diego Biurrun
ca411fc1d3 avcodec: Remove broken MMI optimizations
The code fails to compile and is broken beyond repair.
2012-10-12 20:56:54 +02:00
Diego Biurrun
bc4620e5d6 Remove libmpeg2 #define remnants 2012-10-12 20:56:54 +02:00
Diego Biurrun
717addecad Use proper return values in case of missing features 2012-10-12 20:56:54 +02:00
Diego Biurrun
4c66af6141 rangecoder-test: Set error message log level to error, instead of debug 2012-10-12 20:56:54 +02:00
Diego Biurrun
d5c62122a7 Move av_reverse table to libavcodec
It is only used in that library.
2012-10-12 20:39:18 +02:00
Diego Biurrun
930c9d4373 avutil: Duplicate ff_log2_tab instead of sharing it across libs
The table is so small that the space gain is not worth the
performance overhead of cross-library access.
2012-10-12 20:39:17 +02:00
Michael Niedermayer
3a48e38ad0 motion_est: more complete SAB diamond size check
This makes no difference with the current #defines

Fixes CID732255
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 19:33:39 +02:00
Michael Niedermayer
0d002de4a4 exr: fix twin ;
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 17:58:15 +02:00
Paul B Mahol
a51540d811 lavc: do not use av_pix_fmt_descriptors directly
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 15:31:42 +00:00
Michael Niedermayer
c80b59f679 tscc2: Fix an out of array access
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-12 18:17:10 +03:00
Michael Niedermayer
af7dd79a32 Merge commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5'
* commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5':
  lavc: do not use av_pix_fmt_descriptors directly.

Conflicts:
	libavcodec/imgconvert.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/mpegvideo.c
	libavcodec/rawdec.c
	libavcodec/rawenc.c
	libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 16:48:26 +02:00
Sami Pietila
0bf511d579 vp8: reset loopfilter delta values at keyframes.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-10-12 07:17:38 -07:00
Luca Barbato
6d5600e855 avutil: add yuva422p and yuva444p formats 2012-10-12 15:09:51 +02:00
Michael Niedermayer
f391e405df Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* commit 'e002e3291e6dc7953f843abf56fc14f08f238b21':
  Use the new aes/md5/sha/tree allocation functions
  avutil: Add functions for allocating opaque contexts for algorithms
  svq3: fix pointer type warning
  svq3: replace unsafe pointer casting with intreadwrite macros
  parseutils-test: various cleanups

Conflicts:
	doc/APIchanges
	libavcodec/svq3.c
	libavutil/parseutils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:52:34 +02:00
Michael Niedermayer
e335658370 Merge commit '9734b8ba56d05e970c353dfd5baafa43fdb08024'
* commit '9734b8ba56d05e970c353dfd5baafa43fdb08024':
  Move avutil tables only used in libavcodec to libavcodec.

Conflicts:
	libavcodec/mathtables.c
	libavutil/intmath.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:26:46 +02:00
Paul B Mahol
caa7e24eb1 truemotion2: remove unreachable code
Fixes CID610345.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 11:54:38 +00:00
Anton Khirnov
50ba57e0ce lavc: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Anton Khirnov
9953ff3cd8 mpegvideo: fix indentation 2012-10-12 12:45:38 +02:00
Paul B Mahol
4dcf71aacc takdec: stop decoding in case of unknown bps
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 09:18:58 +00:00
Paul B Mahol
56519d7d14 takdec: s/bits_per_coded_sample/bits_per_raw_sample
bits_per_coded_sample should be set from demuxer and
not from decoder.

Prior to this change value set from demuxer would get
overwritten in decoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-12 09:07:31 +00:00
Michael Niedermayer
62722ae2d4 nellymoserenc: fix array element ordering
Fixes assertion failures in trellis encoder
Fixes valgrind warnings in trellis encoder
Fixes CID732257
Fixes CID732256
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 04:19:38 +02:00
Michael Niedermayer
927d866a99 tscc2: fix out of array access
Fixes CID732260
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 02:26:50 +02:00
Michael Niedermayer
e576105d84 motion-test: zero dsp context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 01:44:35 +02:00
Michael Niedermayer
5e689b65ce dv: zero dsp before init, this fixes use of uninitialized dct_bits
Fixes CID732292
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 01:43:11 +02:00
Michael Niedermayer
e0909ff158 lavc: Fix use of uninitialized field.
Fixes CID732297
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 00:22:15 +02:00
Michael Niedermayer
1b5069aa41 sanm: fix off by 1 error in draw_glyph()
This fix changes nothing as nothing passed a so large value

Fixes CID733785
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 00:08:28 +02:00
Martin Storsjö
e002e3291e Use the new aes/md5/sha/tree allocation functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-11 23:35:28 +03:00
Mans Rullgard
fb32f31af7 svq3: fix pointer type warning
Fixes:
libavcodec/svq3.c:661:9: warning: passing argument 2 of 'svq3_decode_block' from incompatible pointer type
libavcodec/svq3.c:208:19: note: expected 'DCTELEM *' but argument is of type 'DCTELEM (*)[32]'

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-11 20:40:23 +01:00
Mans Rullgard
366b72f149 svq3: replace unsafe pointer casting with intreadwrite macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-11 20:40:23 +01:00
Paul B Mahol
313b40efbd bmp: unbreak non BMP_RGB compression for v4 and v5
Fixes CID733728 & CID733729.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-11 18:05:06 +00:00
Diego Biurrun
9734b8ba56 Move avutil tables only used in libavcodec to libavcodec. 2012-10-11 18:29:36 +02:00
Diego Biurrun
0a75d1da23 options_table: refs option is not snow-only 2012-10-11 18:27:44 +02:00
Michael Niedermayer
b96d1859d5 jpeglsenc: favor av_freep() for saftey over av_free() when a variable is still accessible afterwards
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 17:45:36 +02:00
Michael Niedermayer
34bbab432c jpeglsnec: fix memleak of state in error case
Fixes CID733794
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 17:44:58 +02:00
Michael Niedermayer
104b1d9e10 libvpxenc: fix memleak on error path
Fixes CID733795
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 17:41:36 +02:00
Michael Niedermayer
229ccce6cc libxvid_rc: fix leaks in ff_xvid_rate_control_init()
Fixes CID733796 Part1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 17:08:33 +02:00
Michael Niedermayer
4b20b21b8d tiff: fix leak on error return in doubles2str()
Fixes CID733797
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 16:51:08 +02:00
Michael Niedermayer
bb35864759 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mlpdsp: adding missing file
  dsputil: split out mlp dsp function
  sh4: add required #include, fix build
  averror: make error values proper negative values
  build: do not use LIB as variable name
  build: whitespace cosmetics
  build: remove single-use variable THIS_LIB

Conflicts:
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 15:55:41 +02:00
Michael Niedermayer
526cb36e4b Merge commit '4436f25a1682ada3f7226cb6fadf429946933161'
* commit '4436f25a1682ada3f7226cb6fadf429946933161':
  build: remove references to unused EXTRAOBJS variable
  lavfi: convert input/ouput list compound literals to named objects
  fate: add h263 obmc vsynth tests
  avconv: remove bogus warning when using avconv -h without parameter
  averror: explicitly define AVERROR_* values
  flashsv: propagate inflateReset() errors
  indeo4/5: remove constant parameter num_bands from wavelet recomposition
  mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
  Double motion vector range for HPEL interlaced picture in proper place

Conflicts:
	libavcodec/v210dec.h
	libavfilter/af_aformat.c
	libavfilter/af_amix.c
	libavfilter/af_asyncts.c
	libavfilter/af_channelmap.c
	libavfilter/af_join.c
	libavfilter/asrc_anullsrc.c
	libavfilter/buffersrc.c
	libavfilter/f_setpts.c
	libavfilter/f_settb.c
	libavfilter/fifo.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fieldorder.c
	libavfilter/vf_fps.c
	libavfilter/vf_hflip.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_select.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_testsrc.c
	libavformat/mxfdec.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 15:46:48 +02:00
Michael Niedermayer
a75dd13b1b Merge commit 'eb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf'
* commit 'eb657ecefdeb8b2ed9bfb55d3c2c9e0f568486bf':
  vc1dec: Set opposite to the correct value for 1REF field pictures

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 14:36:36 +02:00
Michael Niedermayer
ce27c9eb25 Merge commit '7cc3c4e1d4179aeabcd891090e31ee5e5bfd9692'
* commit '7cc3c4e1d4179aeabcd891090e31ee5e5bfd9692':
  vc1dec: Invoke edge emulation regardless of MV precision for 1-MV chroma

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 14:32:41 +02:00
Michael Niedermayer
b6c3487e7f Merge commit '88058d9a994f42e4e9ed4e67baf696bbfe53128c'
* commit '88058d9a994f42e4e9ed4e67baf696bbfe53128c':
  vc1dec: Set chroma reference field from REFFIELD for 1REF field pictures
  segment: support applehttp style list

Conflicts:
	libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 14:28:18 +02:00
Michael Niedermayer
de31814ab0 Merge commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6'
* commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6':
  avio: introduce avio_closep
  mpegtsenc: set muxing type notification to verbose
  vc1dec: Use correct spelling of "opposite"
  a64multienc: change mc_frame_counter to unsigned
  arm: call arm-specific rv34dsp init functions under if (ARCH_ARM)
  svq1: Drop a bunch of useless parentheses
  parseutils-test: do not print numerical error codes
  svq1: K&R formatting cosmetics

Conflicts:
	doc/APIchanges
	libavcodec/svq1dec.c
	libavcodec/svq1enc.c
	libavformat/version.h
	libavutil/parseutils.c
	tests/ref/fate/parseutils

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-11 14:03:12 +02:00
Luca Barbato
1ec6293086 mlpdsp: adding missing file 2012-10-11 12:34:36 +02:00
Luca Barbato
2d6caade22 dsputil: split out mlp dsp function 2012-10-11 12:01:08 +02:00
Mans Rullgard
25dc79bc14 sh4: add required #include, fix build
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-11 10:55:26 +01:00
Paul B Mahol
8cd1c0febe pcx: convert to bytestream2 API
Protects against overreads in input buffer.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2012-10-11 08:06:45 +00:00
Janne Grunau
c466eb1746 flashsv: propagate inflateReset() errors
Fixes CID717493.
2012-10-10 21:24:32 +02:00