Commit Graph

14805 Commits

Author SHA1 Message Date
Justin Ruggles
8db67610c0 adx: cosmetics: general pretty-printing and comment clean-up 2011-11-26 16:25:06 -05:00
Justin Ruggles
fbc79a9101 adx: remove useless comments 2011-11-26 16:25:06 -05:00
Justin Ruggles
e0722d7fb7 adx: change short to int16_t 2011-11-26 16:25:06 -05:00
Justin Ruggles
dd1b9f7cd9 adx: rename struct PREV to ADXChannelState 2011-11-26 16:25:06 -05:00
Mans Rullgard
3a83b2461e dnxhdenc: fix signed overflows
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 20:52:10 +00:00
Mans Rullgard
b6ae086682 dv: simplify bitstream splicing in dv_decode_ac()
This is simpler and fixes some overflow checker warnings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 20:52:09 +00:00
Mans Rullgard
b02aa3a8ea s3tc: fix shift overflow by using unsigned constant
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:42 +00:00
Mans Rullgard
f7f892e4d5 svq1enc: fix signed multiplication overflow
This multiplication can overflow the signed range but not the
unsigned.  After right-shifting it will thus fit in the signed
range again.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:27 +00:00
Mans Rullgard
e4faa31a0a svq1dec: use sign_extend()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:02 +00:00
Mans Rullgard
171ec81223 rv34: fix signed multiplication overflow
Multiply by unsigned 0x01010101 to replicate bytes into 32-bit
word.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:49:51 +00:00
Cheng Sun
e524eadbf8 [PATCH] Fix crash when initializing multi-threaded decoding for corrupted file.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 10:46:08 -08:00
Mans Rullgard
b7581b5c83 cook: use a table for xor key rotation
This is simpler and avoids an invalid shift by 32 in the
aligned case.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
Mans Rullgard
644bff6c9b apedec: fix signed integer overflows
This bit manipulation is equivalent but avoids undefined
shifts and overflows.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
Mans Rullgard
93c286e54f qtrle: simplify 32-bit decode using intreadwrite macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
Mans Rullgard
3bd1162a52 gif: fix invalid signed shifts
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:40 +00:00
Reimar Döffinger
7fb55e0b02 rtjpeg: simplify get_block() by using get_bits_left.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:40:51 +01:00
Reimar Döffinger
7a62ddb689 rtjpeg: check get_block return value for error.
This avoids crashes due to reading out-of-bounds.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:39:58 +01:00
Reimar Döffinger
f6afacdb3b nuv: check per-frame header for validity.
Since it contains dimensions parsing an invalid one has rather
annoying effects.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:38:59 +01:00
Reimar Döffinger
785baa738a nuv: use FFALIGN.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:38:14 +01:00
Carl Eugen Hoyos
1484b5dec5 flicvideo: check extradata_size before accessing extradata.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:36:16 +01:00
Michael Niedermayer
5ace144fe0 fraps: check for overread.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:35:57 +01:00
K.Y.H
51f316a997 cook: fix apparent typo in extradata parsing
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:33:31 +01:00
Anton Khirnov
488eec1044 lavc: update doxy to use nondeprecated API. 2011-11-26 08:26:24 +01:00
Mans Rullgard
cc276c85d1 Make channel layout masks unsigned
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.

Fixes a few invalid shifts.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 13:19:54 +00:00
Mans Rullgard
00a856e3f9 dca: ARMv6 optimised decode_blockcode()
This is a hand-tuned version of the code with impossible parts of
the FASTDIV function ommitted.

2-5% faster overall on Cortex-A8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-25 13:19:53 +00:00
Janne Grunau
117e2a30f2 frame-mt: return consumed packet size in ff_thread_decode_frame
This is required to fulfill avcodec_decode_video2() promise to return
the number of consumed bytes on success.
2011-11-25 08:25:12 +01:00
Luca Barbato
7f1b427018 snow: split snow in snowdec and snowenc
The common non inlined code goes in snow.c, the common inlined code in
snow.h, tables move in snowdata.h (included only by snow.c)
2011-11-24 21:35:47 +01:00
Anton Khirnov
8b7412fe4e tiffenc: deprecate using compression_level 2011-11-24 21:31:36 +01:00
Ronald S. Bultje
db431f7efe h264: add support for decoding planar RGB images. 2011-11-24 08:25:36 -08:00
Justin Ruggles
c1848c4b26 pcmdec: remove unneeded resetting of samples pointer 2011-11-23 16:26:15 -05:00
Anton Khirnov
3eedd29bd7 bethsoftvideo: return proper consumed size for palette packets.
Also check for sufficient packet size.
2011-11-23 21:58:30 +01:00
Anton Khirnov
a94c769dad tiffenc: add a private option for selecting compression algorithm 2011-11-23 20:29:25 +01:00
Mans Rullgard
3a0b72dee0 ARM: remove needless .text/.align directives
The 'function' macro already includes the appropriate
directives.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-23 15:06:50 +00:00
Alex Converse
963f685535 aacdec: Fix PS in ADTS.
Fixes File1.aac and Bug 80.
2011-11-22 14:33:11 -08:00
Justin Ruggles
0e8fdd41c2 dsputil: use cpuflags in x86 emu_edge_core
avoids passing around the extra argument among all the macros it uses
2011-11-22 15:40:51 -05:00
Justin Ruggles
395f2e70dd dsputil: use movups instead of movdqu in ff_emu_edge_core_sse()
This allows emulated_edge_mc_sse() and gmc_sse() to be used under
AV_CPU_FLAG_SSE.
2011-11-22 15:40:51 -05:00
Justin Ruggles
05d1e45d1f wma: initialize prev_block_len_bits, next_block_len_bits, and block_len_bits.
The initial values are not checked against the number of block sizes.
Initializing them to frame_len_bits will result in a block size index of 0
in these cases instead of something that might be out-of-range.

Fixes Bug 81.
2011-11-22 13:50:18 -05:00
Mans Rullgard
85770d6e56 Add libavutil/mathematics.h #includes for INFINITY
This fixes build errors in some environments.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-22 16:36:44 +00:00
Luca Barbato
e97e5a2e02 doxy: introduce an empty structure in libavcodec 2011-11-22 17:16:02 +01:00
Mans Rullgard
8ee2b4672f ARM: add explicit .arch and .fpu directives to asm.S
This prevents build errors when compiler and assembler default
targets differ.  Ideally each file would declare the highest
level it requires.  This is however not easily possible as it
complicates assembling pre-armv6t2 code in Thumb-2 mode.

HAVE_NEON is used as indicator for ARMv7-A since no other
symbol exists for this and NEON is only available in this
variant.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-22 12:13:02 +00:00
Janne Grunau
0945eddec0 pthread: do not touch has_b_frames
Adding the thread count in frame level multithreading to has_b_frames
as an additional delay causes more problems than it solves.
For example inconsistent behaviour during timestamp calculation in
libavformat.
Thread count and frame level multithreading are both set by the user.
If the additional delay caused by frame level multithreading needs
to be considered in the calling code it has all information to take
it into account.
Should it become necessary to calculate a maximum delay inside
libavcodec it should be exported as its own field and not reusing
an existing field.

Based on a patch by Michael Niedermayer.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-11-22 09:50:33 +01:00
Justin Ruggles
a8fe9a7242 pthread: add some malloc failure checks 2011-11-21 10:18:25 -05:00
Justin Ruggles
f3a29b750a avcodec: move some AVCodecContext fields to an internal struct.
A new field, AVCodecContext.internal is used to hold a new struct
AVCodecInternal, which has private fields that are not codec-specific and are
used by general libavcodec functions.

Moved internal_buffer, internal_buffer_count, and is_copy.
2011-11-19 10:01:05 -05:00
Justin Ruggles
513b691955 avcodec: use av_opt_set() instead of deprecated av_set_string3() 2011-11-19 01:14:27 -05:00
Justin Ruggles
fa9aeb82e2 avcodec: fix some const warnings
libavcodec/options.c:583: warning: assignment discards qualifiers from pointer
target type
libavcodec/options.c:589: warning: initialization discards qualifiers from
pointer target type
2011-11-19 01:10:58 -05:00
Justin Ruggles
86d3730360 avcodec: remove pointless AVOption, internal_buffer_count 2011-11-19 00:36:49 -05:00
Luca Barbato
b7d939d998 cinepack: return non-generic errors 2011-11-18 12:10:41 +01:00
Michael Niedermayer
a4009c6a9a cinepak: remove redundant coordinate checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 11:58:45 +02:00
Michael Niedermayer
867b496681 cinepak: check strip_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 11:58:43 +02:00
Michael Niedermayer
d92fea2b14 cinepak, simplify, use AV_RB24()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 11:58:42 +02:00
Michael Niedermayer
a2b51fe87c cinepak: simplify, use FFMIN()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 11:36:05 +02:00
Michael Niedermayer
b55aa7df6b cinepak: Fix division by zero, ask for sample if encoded_buf_size is 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-18 11:35:56 +02:00
Alex Converse
bb4b0ad83b vp5: Fix illegal read.
Found with Address Sanitizer
2011-11-17 11:58:49 -08:00
Thierry Foucu
e0966eb140 vp6: Fix illegal read.
Found with Address Sanitizer

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2011-11-17 11:58:40 -08:00
Martin Storsjö
268fb3f985 mpegaudiodec: Don't use a nonexistent log context for av_dlog
This fixes builds with DEBUG defined, broken since
1158745a2d.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 12:01:32 +02:00
Mike Melanson
747283a078 cinepak: Add another special case so that it can handle the following file:
http://samples.mplayerhq.hu/V-codecs/CVID/bad_cinepak_frame_size.mov

This fix works around another work around which handles a different type
of odd Cinepak data.

Thanks to Matthew Hoops (clone2727 - gmail.com) for the sample and fix.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 10:50:52 +02:00
Kostya Shishkov
ffc638c283 lagarith: add some RGBA decoding support
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 10:49:51 +02:00
Nathan Caldwell
39616fc307 lagarith: Add correct line prediction for RGB
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-16 10:46:30 +02:00
Justin Ruggles
f1d1516e55 cosmetics: indentation 2011-11-15 12:17:20 -05:00
Justin Ruggles
1158745a2d mpegaudiodec: init static tables in AVCodec.init_static_data() 2011-11-15 12:17:20 -05:00
Mans Rullgard
3f5d6a665a binkvideo: simplify and remove invalid shifts
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-14 15:35:29 +00:00
Sebastien Zwickert
ac3dbb4d58 hwaccel: OS X Video Decoder Acceleration (VDA) support.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-11-14 16:07:32 +01:00
Janne Grunau
29ae0565d9 vble: remove vble_error_close
It does not make much sense to factor the error handling to its own
av_always_inline function. Fixes "format not a string literal and no
format arguments" warning in the av_log.
2011-11-11 22:05:51 +01:00
Derek Buitenhuis
c433a3f9a5 VBLE Decoder
Add a decoder for the VBLE Lossless Codec, which
still has a cult following. Used to be popular
several years ago on doom9.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-11 22:46:47 +02:00
Justin Ruggles
b656c4d08e tta: use an integer instead of a pointer to iterate output samples 2011-11-11 14:18:22 -05:00
Justin Ruggles
5c210e2cb9 shorten: do not modify samples pointer when interleaving 2011-11-11 14:18:22 -05:00
Justin Ruggles
befc473c00 mpc7: only support stereo input.
The Musepack SV7 reference encoder converts mono to stereo when encoding.
2011-11-11 14:17:40 -05:00
Justin Ruggles
8dbc6d03c0 dpcm: do not try to decode empty packets 2011-11-11 14:17:39 -05:00
Justin Ruggles
e79da63282 dpcm: remove unneeded buf_size==0 check.
It is already checked in avcodec_decode_audio3()
2011-11-11 14:17:39 -05:00
Justin Ruggles
9d06037d48 twinvq: add SSE/AVX optimized sum/difference stereo interleaving 2011-11-11 14:13:58 -05:00
Justin Ruggles
7b966566da vqf/twinvq: pass vqf COMM chunk info in extradata
This is needed because the twinvq decoder cannot rely on bit_rate to be set.
The API documentation says that bit_rate is set by libavcodec, not by the
user.
2011-11-11 14:06:14 -05:00
Justin Ruggles
a8a6da4a0e twinvq: check for allocation failure in init_mdct_win() 2011-11-11 14:06:14 -05:00
Alex Converse
88b2436911 mpc7: Fix memset call in mpc7_decode_frame function 2011-11-10 09:30:49 -08:00
Justin Ruggles
164fca39bd atrac1: use correct context for av_log() 2011-11-10 10:25:47 -05:00
Justin Ruggles
c298b2b8db apedec: consume the whole packet when copying to the decoder buffer.
This avoids artifically consuming a partial packet but ignoring remaining data
in subsequent calls.
2011-11-10 10:25:47 -05:00
Justin Ruggles
de157f2118 apedec: do not needlessly copy s->samples to nblocks.
also move nblocks to the local scope where it is used.
2011-11-10 10:25:47 -05:00
Justin Ruggles
4315c7d35a apedec: check output buffer size after calculating actual output size 2011-11-10 10:25:47 -05:00
Justin Ruggles
ad17207b51 apedec: remove unneeded entropy decoder normalization.
The decoder already skips data at the end of the packet without this.
Also remove 2 APEContext fields that were only used for the end-of-frame
normalization.
2011-11-10 10:25:47 -05:00
Justin Ruggles
59f4d1b8bb truespeech: use memmove() in truespeech_update_filters() 2011-11-10 10:25:46 -05:00
Justin Ruggles
41899b9acb vorbisdec: remove AVCODEC_MAX_AUDIO_FRAME_SIZE check
The user could provide a larger buffer, which is already checked separately
before writing output.
2011-11-10 10:25:46 -05:00
Justin Ruggles
e551a6f49a vorbisdec: remove unneeded buf_size==0 check 2011-11-10 10:25:46 -05:00
Justin Ruggles
f666276fa6 vorbisdec: return proper error codes instead of made-up ones 2011-11-10 10:25:46 -05:00
Laurent Aimar
2305742b2a sunrast: Check for invalid/corrupted bitstream
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-11-10 12:32:26 +01:00
Justin Ruggles
f1f6d3615f avcodec: add support for planar signed 8-bit PCM.
It is found in some 8svx files (e.g. ones created by SoX).
Currently the decoder reuses the 8svx functions because we already have
handling of a single large planar packet for the compressed 8svx codecs.
2011-11-09 17:48:54 -05:00
Justin Ruggles
fed5ca255f ra144enc: add sample_fmts list to ff_ra_144_encoder
This enables the user (i.e. avconv) to automatically convert to the supported
sample format if needed.
2011-11-09 16:53:23 -05:00
Justin Ruggles
818a3bdedf smackaud: use uint8_t* for 8-bit output buffer type
This matches the output sample format and the range of the output values.
2011-11-09 16:21:08 -05:00
Justin Ruggles
375ca0aca8 smackaud: clip output samples 2011-11-09 16:20:45 -05:00
Justin Ruggles
c86c3c8017 smackaud: use sign_extend() for difference value instead of casting 2011-11-09 16:19:52 -05:00
Justin Ruggles
979c8de549 sipr: use a function pointer to select the decode_frame function 2011-11-09 14:59:52 -05:00
Justin Ruggles
3468ff1060 sipr: set mode based on block_align instead of bit_rate
the user is not required to set bit_rate
2011-11-09 14:59:51 -05:00
Justin Ruggles
0005f9a35b sipr: do not needlessly set *data_size to 0 when returning an error 2011-11-09 14:59:51 -05:00
Justin Ruggles
9cb70ce34b ra288: fix formatting of LOCAL_ALIGNED_16 2011-11-09 13:45:50 -05:00
shahriman AMS
c33d4916fb VC1: Add bottom field offset to block_index[] to avoid rewriting (+10L)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-09 11:00:49 +01:00
shahriman AMS
62622d04eb vc1dec: move an if() block.
There are no reason for "if (c_valid) { ... }" to appear before
"if (b_valid) { ... }".

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-09 11:00:20 +01:00
shahriman AMS
4bceeaf0c1 vc1dec: use correct hybrid prediction threshold.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-09 10:53:24 +01:00
shahriman AMS
4344ce08f1 vc1dec: Partial rewrite of vc1_pred_mv()
The current code is a generalization of the earlier progressive MV
prediction code. This was supposed to predict MVs for both interlaced
and progressive pictures. But the interlaced MV prediction is buggy
and works mostly by luck.

This partially fixes interlaced MV prediction.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-09 10:51:58 +01:00
shahriman AMS
6475a6e1ca vc1dec: take ME precision into account while scaling MV predictors.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-09 10:51:22 +01:00
Alex Converse
1149fbc763 indeo3: Fix a fencepost error.
Found with asan and the venerable 1-dog.avi sample.
2011-11-08 10:59:52 -08:00
Justin Ruggles
2467d8d9ea ra288: return error if input buffer is too small 2011-11-08 12:36:56 -05:00
Justin Ruggles
0131e70af5 ra288: utilize DSPContext.vector_fmul() 2011-11-08 12:36:48 -05:00
Justin Ruggles
03e5d6118c ra288: use memcpy() to copy decoded samples to output 2011-11-08 12:36:41 -05:00
Justin Ruggles
f50b6be57d mace: only calculate output buffer size once 2011-11-08 12:36:14 -05:00
Diego Biurrun
ce33320b30 Remove redundant filename self-references inside files.
Filenames are brittle across renames and add no useful information.
2011-11-08 17:52:56 +01:00
Diego Biurrun
9412f81138 indeo3data: add missing config.h #include for HAVE_BIGENDIAN 2011-11-08 17:52:56 +01:00
Diego Biurrun
276b995d85 x86: drop pointless ARCH_X86 #ifdef from files in x86 subdirectory 2011-11-08 17:52:55 +01:00
Kostya Shishkov
f545e00677 BMV demuxer and decoder
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-08 00:36:45 +02:00
Alex Converse
090aaaf752 mpeg12enc: Remove write-only variables. 2011-11-07 10:53:55 -08:00
Alex Converse
7c5dfc174b mpeg12enc: Don't set up run-level info for level 0.
run: The number of zero coefficients preceding a non-zero coefficient,
in the scan order. The absolute value of the non-zero coefficient is
called "level".

The run-level code makes illegal reads when trying to set up tables for
nonsense level 0.
2011-11-07 10:50:48 -08:00
Alex Converse
a1684cf82d msmpeg4: Don't set up run-level info for level 0.
run: The number of zero coefficients preceding a non-zero coefficient,
in the scan order. The absolute value of the non-zero coefficient is
called "level".

The run-level code makes illegal reads when trying to set up tables for
nonsense level 0.
2011-11-07 10:48:53 -08:00
Justin Ruggles
b8f02f5b4e dsputil: use cpuflags in x86 versions of vector_clip_int32() 2011-11-06 20:50:06 -05:00
Kostya Shishkov
66760b30a3 cosmetics: insert some spaces in explicit enum value assignments
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-06 08:13:11 +01:00
Kostya Shishkov
19900d60fd move 8SVX audio codecs to the audio codec list part on the next bump
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-06 08:12:42 +01:00
Kostya Shishkov
0e288b8c52 deprecate codec IDs that won't ever be used
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-06 07:41:58 +01:00
Ronald S. Bultje
717401aff2 h264_weight: remove duplication functions. 2011-11-05 07:16:30 -07:00
Ronald S. Bultje
ea2bb12e3e h264: improve calculation of codec delay.
Fixes the following conformance suite samples:
HCBP1_HHI_A.264, HCBP2_HHI_A.264, HCMP1_HHI_A.264 (main)
HCHP1_HHI_B.264, HCHP2_HHI_A.264, HCHP3_HHI_A.264 (frext)
2011-11-05 06:58:52 -07:00
Martin Storsjö
8148631269 w32threads: Wrap the mutex functions in inline functions returning int
This allows using these wrappers in the gcrypt mutex callbacks.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:09:24 +02:00
Martin Storsjö
2d1b6fb72b avcodec: Allow locking and unlocking an avformat specific mutex
This extends the lock manager in avcodec to manage two separate
mutexes via the user-specified lock functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-05 12:08:53 +02:00
Justin Ruggles
add7b1140f binkaudio: expand quant_table to accommodate all possible values 2011-11-04 10:23:53 -04:00
Martin Storsjö
c38404ee1a libx264: Set the default of the rc_lookahead option to -1
This allows it to use the defaults specified by preset/tune,
without overwriting it with the default value from the
AVCodecContext field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-04 12:46:35 +02:00
Martin Storsjö
adc85ce20b avcodec: Set flags2 default value depending on availability
This makes the code compile when FF_API_X264_GLOBAL_OPTS or
FF_API_LAME_GLOBAL_OPTS is 0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-04 12:46:33 +02:00
Alex Converse
2a6eb06254 vp6: Fix illegal read. 2011-11-03 16:40:34 -07:00
Martin Storsjö
cae4f4b77e avcodec: Make sure codec_type is set by avcodec_get_context_defaults2
This function used to set codec_type. With the current fallback
implementation based on avcodec_get_context_defaults3, codec_type
won't be set to the value passed in, but will be set to
AVMEDIA_TYPE_UNKNOWN. Legacy callers of this function might expect
this field to be set to the value passed in.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-03 13:29:48 +02:00
Martin Storsjö
1b6da627d4 avcodec: Remove a misplaced and useless attribute_deprecated
If attribute_deprecated is used in an enum declaration, it
should follow the 'enum' keyword, otherwise it's ignored
silently. This is the only case of attribute_deprecated for
enum declarations currently.

Currently, this attribute_deprecated doesn't have any effect.
If moved to the right place, it emits a warning every single
time avcodec.h is included, like this:

avcodec.h:2827: warning: ‘AVLPCType’ is deprecated (declared at avcodec.h:543)

There is already a working attribute_deprecated for the
corresponding field in AVCodecContext, so therefore this
one shouldn't be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-03 09:47:57 +02:00
Justin Ruggles
5463e83dbc fmtconvert: fix int32_to_float_fmul_scalar() for windows x86_64
The calling convention only allows 4 non-stack parameter, with each
float or int register being skipped if not used.

fixes Bug 64
2011-11-02 21:44:58 -04:00
Maxim Poliakovski
594b54b51e replacement Indeo 3 decoder
The new decoder is much smaller and has better code quality.
Cleanup and fixes courtesy of Kostya Shishkov.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-11-03 00:59:12 +01:00
Justin Ruggles
c2d9a65bc0 ac3enc: doxygen update.
Add some parameters to existing function documentation.
Remove some unneeded documentation.
Convert some static function documentation to non-doxygen style.
2011-11-02 17:21:45 -04:00
Justin Ruggles
a4998e448f imc: return error codes instead of 0 for error conditions.
This fixes a bug where the whole buffer was returned as decoded audio due to
*data_size not being set to zero and the return value being >= 0.
2011-11-02 17:02:22 -04:00
Justin Ruggles
08e5cd3810 imc: return meaningful error codes instead of -1 2011-11-02 17:02:22 -04:00
Justin Ruggles
0473f29b60 imc: do not set channel layout for stereo
we only support decoding of mono imc
2011-11-02 17:02:22 -04:00
Justin Ruggles
7b7f47e733 imc: validate channel count
ask for a sample if not mono
2011-11-02 17:02:22 -04:00
Justin Ruggles
95fee70d67 imc: check for ff_fft_init() failure 2011-11-02 17:02:22 -04:00
Justin Ruggles
86962b13f6 imc: check output buffer size before decoding 2011-11-02 17:02:22 -04:00
Justin Ruggles
e9362aaedf imc: use DSPContext.bswap16_buf() to byte-swap packet data 2011-11-02 17:02:22 -04:00
Justin Ruggles
20e081dddc libgsm: add flush function to reset the decoder state when seeking 2011-11-02 14:41:17 -04:00
Justin Ruggles
480324e7ca libgsm: simplify decoding by using a loop 2011-11-02 14:41:17 -04:00
Justin Ruggles
9d52f0a711 gsm: log error message when packet is too small 2011-11-02 14:41:17 -04:00
Justin Ruggles
9671db8245 libgsmdec: do not needlessly set *data_size to 0 2011-11-02 14:41:16 -04:00
Justin Ruggles
a2e255783e gsmdec: do not needlessly set *data_size to 0 2011-11-02 14:41:16 -04:00
Justin Ruggles
fc43fc9faa gsmdec: add flush function to reset the decoder state when seeking 2011-11-02 14:41:16 -04:00
Justin Ruggles
b03761b130 libgsmdec: check output buffer size before decoding 2011-11-02 14:41:16 -04:00
Justin Ruggles
bac2597a32 gsmdec: log error message when output buffer is too small.
also return AVERROR(EINVAL) instead of -1
2011-11-02 14:41:16 -04:00
Justin Ruggles
d9c6eece21 gsm: use av_get_bytes_per_sample() in frame_bytes calculation 2011-11-02 14:41:16 -04:00
Diego Biurrun
f36b390275 Replace some forgotten FFmpeg references by Libav. 2011-11-02 10:42:55 +01:00
Diego Biurrun
2f5df0b12c Replace ffmpeg references with more accurate libav* references. 2011-11-02 10:42:55 +01:00
Diego Biurrun
20566eb0f0 Replace outdated references to ffmpeg tool with avconv. 2011-11-02 10:42:54 +01:00
Diego Biurrun
124e28847b Remove some stray unnecessary ffmpeg references. 2011-11-02 10:42:54 +01:00
Diego Biurrun
d1dfcb0829 vp3: remove some pointless comments 2011-11-02 10:42:54 +01:00
Anton Khirnov
5511ad14fe lavc: use designated initialisers for parsers. 2011-11-02 10:03:43 +01:00
Justin Ruggles
da24963725 g726dec: add flush() function to reset state when seeking 2011-11-01 21:23:04 -04:00
Justin Ruggles
97f5dd1d84 g726: don't pass index to g726_reset()
calculate it from c->code_size instead.
2011-11-01 21:23:04 -04:00