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
Justin Ruggles
615b2a2cf5
g726enc: add private option for setting code size directly.
...
This is an easy alternative to setting bit_rate. This patch also selects the
closest bit_rate to the requested one rather than requiring an exact value.
2011-11-01 21:23:04 -04:00
Justin Ruggles
7abb73d4ba
g726: wrap the decoder functions with a CONFIG_ADPCM_G726_DECODER check
2011-11-01 21:23:04 -04:00
Justin Ruggles
437c11ca16
g726: group the g726_encoder AVCodec with the other encoding functions
2011-11-01 21:23:04 -04:00
Justin Ruggles
50969c0f46
g726: return AVERROR(EINVAL) instead of -1 for invalid channel count
2011-11-01 21:23:03 -04:00
Justin Ruggles
50c466d609
g726enc: use av_assert0() for sample_rate validation
...
This should never happen, but the check avoids a divide-by-zero.
2011-11-01 21:23:03 -04:00
Justin Ruggles
9e78d8cfdf
g726: treat sample rates other than 8kHz as unofficial.
2011-11-01 21:23:03 -04:00
Justin Ruggles
6e8d4a7afb
g726dec: remove the sample_rate validation
2011-11-01 21:23:03 -04:00
Justin Ruggles
6ac34eed54
g726: use bits_per_coded_sample instead of bitrate to determine mode
...
This requires some workarounds in the WAV muxer and demuxer. We need to write
the correct bits_per_coded_sample and block_align in the muxer. In the
demuxer, we cannot rely on the bits_per_coded_sample value, so we use the bit
rate and sample rate to determine the value.
This avoids having the decoder rely on AVCodecContext.bit_rate, which is not
required to be set by the user for decoding according to our API.
2011-11-01 21:23:03 -04:00
Justin Ruggles
d405237bae
g726: split the init function for the encoder and decoder
...
This also allows for not having a decoder close function.
2011-11-01 21:23:03 -04:00
Justin Ruggles
c8d36d254e
g726: pre-calculate the number of output samples.
...
Allows for checking output buffer size and simplification of decoding loop.
2011-11-01 21:23:03 -04:00
Justin Ruggles
e61a670b53
g726: use int16_t instead of short
2011-11-01 21:23:02 -04:00
Diego Biurrun
45235d69c2
libdirac/libschroedinger: Drop unnecessary symbol prefixes.
...
The names used in the libdirac/libschroedinger wrappers are long enough as-is.
Bloating them with unnecessary prefixes makes them even more unwieldy.
2011-10-30 21:40:52 +01:00
Justin Ruggles
7d1b17b833
cin audio: use sign_extend() instead of casting to int16_t
2011-10-29 16:43:40 -04:00
Justin Ruggles
405af43104
cin audio: restructure decoding loop to avoid a separate counter variable
...
Also check output buffer size instead of truncating output.
2011-10-29 16:43:40 -04:00
Justin Ruggles
859bdc33e4
cin audio: use local variable for delta value
2011-10-29 16:43:40 -04:00
Justin Ruggles
64e19ba48b
cin audio: remove unneeded cast from void*
2011-10-29 16:43:40 -04:00
Justin Ruggles
03381c12b3
cin audio: validate the channel count
2011-10-29 16:43:40 -04:00
Justin Ruggles
664eb77dc3
cin audio: remove unneeded AVCodecContext pointer from CinAudioContext
2011-10-29 16:43:40 -04:00
Justin Ruggles
5bd0343bee
flacdec: use av_get_bytes_per_sample() to get sample size
2011-10-29 16:05:25 -04:00
Justin Ruggles
272fcc32bb
dca: handle errors from dca_decode_block()
...
Return error if core block decoding fails.
Do not enable XCh if XCh extension block decoding fails.
2011-10-29 16:04:07 -04:00
Justin Ruggles
aae6eead6a
dca: return error if the frame header is invalid
2011-10-29 16:04:07 -04:00
Justin Ruggles
f44059d260
dca: return proper error codes instead of -1
2011-10-29 16:04:06 -04:00
Kostya Shishkov
46e1af3b0f
utvideo: handle empty Huffman trees
...
If the frame is filled with the same colour, encoder may produce no data
and the fill value is indicated by zero code length (the rest of symbols
will have 0xFF for code length, meaning invalid). So such Huffman trees
should be treated specially.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-10-29 12:54:08 -07:00
Justin Ruggles
425a843505
binkaudio: change short to int16_t
2011-10-29 15:16:54 -04:00
Justin Ruggles
4f4e19480a
binkaudio: only decode one block at a time.
...
This prevents truncating output due to an output buffer that is too small for
all blocks. There is no limit on the number of blocks in a packet.
2011-10-29 15:16:54 -04:00
Justin Ruggles
eaddd29e00
binkaudio: store interleaved overlap samples in BinkAudioContext.
...
This fixes the requirement for the buffer size to be larger than the number of
samples actually decoded.
2011-10-29 15:16:54 -04:00
Justin Ruggles
9f48039a37
binkaudio: pre-calculate quantization factors
2011-10-29 15:16:53 -04:00
Justin Ruggles
101ef19ef4
binkaudio: add some buffer overread checks.
...
This stops decoding before overreads instead of after.
2011-10-29 15:16:53 -04:00
Justin Ruggles
2073224697
atrac3: support float or int16 output using request_sample_fmt
2011-10-29 15:06:32 -04:00
Justin Ruggles
a047851329
atrac3: add CODEC_CAP_SUBFRAMES capability
...
the decoder can handle multiple frames in a packet
2011-10-29 15:06:32 -04:00
Justin Ruggles
8f98577d4d
atrac3: return appropriate error codes instead of -1
2011-10-29 15:06:32 -04:00
Justin Ruggles
47b617021d
atrac3: make sure all memory is freed on init failure
2011-10-29 15:06:32 -04:00
Justin Ruggles
c91613857d
atrac3: add a couple macro constants
2011-10-29 15:06:31 -04:00
Justin Ruggles
1fead73d7b
atrac3: return error if packet is too small
2011-10-29 15:06:31 -04:00
Justin Ruggles
7e4881a2d0
atrac3: check output buffer size before decoding
2011-10-29 15:06:31 -04:00
Justin Ruggles
6ba7f78bbb
atrac3: use separate pointers for each channel in decodeFrame()
2011-10-29 15:06:31 -04:00
Justin Ruggles
5e76b8bb76
atrac3: use optimized float_interleave() function for stereo interleaving
2011-10-29 15:06:31 -04:00
Justin Ruggles
8af33cb38a
atrac3: decode mono directly to the output buffer
2011-10-29 15:06:31 -04:00
Justin Ruggles
c4a6fde33f
atrac3: decode output to float samples instead of converting to s16
2011-10-29 15:06:31 -04:00
Justin Ruggles
f20dd574f1
atrac1: return appropriate error codes instead of -1
2011-10-29 15:06:31 -04:00
Justin Ruggles
6dc7dd7af4
atrac1: check for ff_mdct_init() failure
2011-10-29 15:06:31 -04:00
Justin Ruggles
21dcecc310
atrac1: use optimized float_interleave() function for stereo interleaving
2011-10-29 15:06:31 -04:00
Justin Ruggles
96b5702efe
atrac1: fix a typo
2011-10-29 15:06:31 -04:00
Justin Ruggles
bff5b2c1ca
atrac1: validate number of channels
2011-10-29 15:06:31 -04:00
Justin Ruggles
9a35ff3841
atrac1: decode mono audio directly to output buffer
...
For stereo we need to use intermediate planar buffers, but mono does not need
to be deinterleaved so the output buffer can be used directly.
2011-10-29 15:06:31 -04:00
Justin Ruggles
33684b9c12
atrac1: check output buffer size before decoding
2011-10-29 15:06:30 -04:00
Justin Ruggles
5c353eb8e3
cook: return AVERROR_PATCHWELCOME instead of ENOTSUP
...
ENOTSUP is not defined on some systems
2011-10-29 14:32:55 -04:00
Justin Ruggles
e34c6c9708
cook: check output buffer size before decoding
2011-10-29 13:43:28 -04:00
Justin Ruggles
6631294c26
cook: do not needlessly set *data_size to 0
2011-10-29 13:43:28 -04:00
Justin Ruggles
b277ebd508
cook: remove pointless return statements
2011-10-29 13:43:28 -04:00
Justin Ruggles
c9c841e231
cook: simplify decouple_info()
2011-10-29 13:43:28 -04:00
Justin Ruggles
f193c96f49
cook: return appropriate error codes instead of -1
2011-10-29 13:43:28 -04:00
Justin Ruggles
e694831f9d
cook: avoid hardcoded sizes in sizeof()
2011-10-29 13:43:28 -04:00
Justin Ruggles
776e9815a5
cook: remove unneeded #includes
2011-10-29 13:43:28 -04:00
Justin Ruggles
c25df22365
cook: output float samples instead of converting to int16
2011-10-29 13:43:28 -04:00
Kostya Shishkov
9a173575fd
utvideo: account for coupled lines in YUV420 format
...
Luma slices in YUV420 colourspace should have height in multiple of two since
they have the same line of chrominance data corresponding to pair of them.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-28 23:51:58 -07:00
Ronald S. Bultje
8370e426e4
vp3: fix oob read for negative tokens and memleaks on error.
2011-10-28 23:50:04 -07:00
Ronald S. Bultje
bfa0f96586
vp8: fix overflow in segmentation map caching.
2011-10-28 23:48:43 -07:00
Anton Mitrofanov
640d5f1c80
Fix decoding of lossless 4:2:2 H.264
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-28 23:37:30 -07:00
Anton Mitrofanov
fdb5314ea7
Fix decoding of lossless 10-bit 4:4:4 H.264
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-28 23:37:30 -07:00
Alex Converse
77b5c82b49
isom: Add MPEG4SYSTEMS dummy object type indication.
2011-10-28 14:54:13 -07:00
Michael Niedermayer
bc2dd36740
aacdec: allow output reconfiguration on channel changes
...
Locking the decoder against channel config changes in
parse_adts_frame_header() seems to be unnecessary and
streams with channel config changes are reported.
The sample in http://roundup.libav.org/issue999 still works.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-28 22:44:59 +02:00
Justin Ruggles
f3db0f7403
nellymoserenc: take float input samples instead of int16
...
This avoids having to convert all input data from int16 to float, which is used
internally for encoding.
2011-10-28 14:40:52 -04:00
Justin Ruggles
77c8ef9a36
nellymoserdec: use dsp functions for overlap and windowing
2011-10-28 14:40:52 -04:00
Justin Ruggles
8c9581f052
nellymoserdec: do not fail if there is extra data in the packet
...
instead just print a warning
2011-10-28 14:40:52 -04:00
Justin Ruggles
0aaa85dbed
nellymoserdec: fail if output buffer is too small
...
avoids silently truncating the output
2011-10-28 14:40:52 -04:00
Justin Ruggles
f19305fe93
nellymoserdec: remove pointless buffer size check.
2011-10-28 14:40:51 -04:00
Michael Niedermayer
8fa97302e0
snow: do not draw_edge if emu_edge is set
...
Fix segfault on emu edge, to reproduce
make fate-vsynth1-snow
avplay -flags emu_edge tests/data/vsynth1/snow.avi
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-10-28 10:14:11 -07:00
Justin Ruggles
813907d424
wmavoice: move output buffer size check to synth_superframe().
...
this allows for checking against the actual output size instead of max size.
2011-10-28 12:02:24 -04:00
Justin Ruggles
d064076570
wmavoice: only set data_size to 0 when necessary
2011-10-28 12:02:24 -04:00
Justin Ruggles
1db6437f6c
wmapro: fix strict-aliasing violations by using av_alias32
...
Also fix some undefined unsigned/signed conversions.
2011-10-28 12:02:24 -04:00
Justin Ruggles
b8b4c9c328
wmapro: use FmtConvertContext.float_interleave() to interleave output samples
2011-10-28 12:02:24 -04:00
Justin Ruggles
d0b1b1c5c7
wmadec: consolidate 2 output buffer size checks into 1 check
2011-10-28 12:02:23 -04:00
Justin Ruggles
9a33264478
apedec: assert that s->samples is not negative before trying to decode
2011-10-28 11:47:29 -04:00
Justin Ruggles
0927154d37
apedec: use FFALIGN macro for internal data buffer size
2011-10-28 11:47:28 -04:00
Justin Ruggles
5b8009f4c8
apedec: do not keep incrementing the input data pointer past the end of the
...
buffer during entropy decoding.
The pointer address could overflow, which would likely segfault. Instead set
the context error flag to indicate that the decoder tried to read past the
end of the packet data.
2011-10-28 11:47:28 -04:00
Justin Ruggles
a4c32c9a63
apedec: check for input buffer overflow while reading frame header
2011-10-28 11:47:28 -04:00
Justin Ruggles
fd244ae3a0
apedec: use unsigned int for offset
...
avoids implementation-defined unsigned-to-signed conversion and simplifies
the bounds checking.
2011-10-28 11:47:28 -04:00
Justin Ruggles
89ec474a43
apedec: remove pointless increment of 'buf'
...
The variable is not used anymore at that point.
2011-10-28 11:47:28 -04:00
Justin Ruggles
52d4fb2a3d
apedec: set s->currentframeblocks after validating nblocks
2011-10-28 11:47:28 -04:00
Justin Ruggles
2cab578489
apedec: use unsigned int for 'nblocks' and make sure that it's within int range
2011-10-28 11:47:27 -04:00
Justin Ruggles
b7e5145759
apedec: do not set s->samples until after validation.
...
This prevents errors and/or invalid writes in the next decode call due to
s->samples still being negative.
2011-10-28 11:47:27 -04:00
Justin Ruggles
11ca8b2d74
apedec: check for data buffer realloc failure
2011-10-28 11:47:27 -04:00
Justin Ruggles
91b71460b5
apedec: return meaningful error values in ape_decode_frame()
2011-10-28 11:47:27 -04:00
Justin Ruggles
c6defb41ef
apedec: correct an error message
2011-10-28 11:47:27 -04:00
Justin Ruggles
da55e0980e
apedec: cosmetics
...
break some excessively long lines and remove space after '*'
2011-10-28 11:46:41 -04:00
Justin Ruggles
f64e0a2f37
apedec: return meaningful error codes from ape_decode_init()
2011-10-28 11:41:39 -04:00
Justin Ruggles
7500781313
apedec: check for filter buffer allocation failure
2011-10-28 11:41:39 -04:00
Justin Ruggles
b9d6b02713
apedec: use memcpy for pseudo-stereo mode
2011-10-28 11:41:39 -04:00
Justin Ruggles
3c25209bd9
apedec: remove unneeded check for zero-size packet.
...
This is already checked by avcodec_decode_audio3().
2011-10-28 11:41:39 -04:00
Justin Ruggles
ec6d743118
mp3on4: do not needlessly set data_size to 0
2011-10-27 22:06:32 -04:00
Justin Ruggles
99975966c3
mp3adu: return error instead of just consuming bad packets
2011-10-27 22:06:32 -04:00
Justin Ruggles
e2e6c8799b
mpegaudiodec: check output data size based on avctx->frame_size
2011-10-27 22:06:32 -04:00
Justin Ruggles
512557b291
avcodec: remove avcodec_parse_frame and deprecate associated elements.
...
The documentation for CODEC_CAP_PARSE_ONLY and AVCodecContext.parse_only
indicates that they are utilized through avcodec_parse_frame(), which was
never actually implemented.
2011-10-27 22:06:32 -04:00
Justin Ruggles
cd816d9bbb
mpegaudiodec: cosmetics: basic pretty-printing
2011-10-27 22:06:32 -04:00
Justin Ruggles
c17e534f2e
mpegaudiodec: remove frame_count field from MPADecodeContext.
...
Its functionality was removed several years ago, so it doesn't do anything.
AVCodecContext.frame_number could serve the same purpose if someone
wants to debug the frame count.
2011-10-27 22:06:32 -04:00
Justin Ruggles
dac15a03af
mpegaudiodec: return AVERROR return codes instead of -1
2011-10-27 22:06:32 -04:00
Justin Ruggles
4be1e1dfa7
mpegaudiodec: Skip only bad frames instead of the whole packet.
...
On frame decoding failure, return an error if the frame is the same size as
the whole packet, otherwise just log an error message and return the number
of bytes consumed.
2011-10-27 22:06:31 -04:00
Anton Khirnov
15946eb8a9
lavc: remove "legacy" mpegvideo decoder.
2011-10-27 23:06:26 +02:00
Justin Ruggles
4a6a29a7fb
libopencore-amr: check output buffer size before decoding
2011-10-26 16:00:37 -04:00
Justin Ruggles
345d15d2f9
libopencore-amr: remove unneeded buf_size==0 check.
...
avcodec_decode_audio3() already checks it before sending the packet to the
decoder.
2011-10-26 16:00:37 -04:00
Justin Ruggles
402c98783d
libopencore-amr: remove unneeded frame_count field.
...
Use AVCodecContext.frame_number instead.
2011-10-26 16:00:36 -04:00
Justin Ruggles
71ccfb3f14
aac_latm: remove unneeded check for zero-size packet.
...
This is already checked by avcodec_decode_audio3()
2011-10-26 12:21:18 -04:00
Justin Ruggles
f1901180e0
pcmdec: fix output buffer size check by calculating the actual output size
...
prior to decoding.
2011-10-26 12:01:07 -04:00
Justin Ruggles
154cd253e5
pcmdec: move codec-specific variable declarations to the corresponding codec
...
blocks.
2011-10-26 12:01:07 -04:00
Justin Ruggles
0093f96d34
pcmdec: return buf_size instead of src-buf.
...
The values will always be the same, so this change eliminates an unneeded
variable. It also gets rid of the need to reset src when memcpy() is used.
2011-10-26 12:01:07 -04:00
Justin Ruggles
85579b6381
avcodec: remove the Zork PCM encoder.
...
The Zork PCM decoder does not decode the 1 sample we have correctly, therefore
the encoder based on the decoder is also incorrect. There is no good reason to
keep the encoder.
2011-10-26 12:01:07 -04:00
Justin Ruggles
67a3b67c71
pcm_zork: use AV_SAMPLE_FMT_U8 instead of shifting all samples by 8.
2011-10-26 12:01:07 -04:00
Justin Ruggles
06af335a33
pcmenc: remove unneeded sample_fmt check.
...
It is already checked by avcodec_open2().
2011-10-26 12:01:07 -04:00
Justin Ruggles
d94e29cac9
pcmdec: move number of channels check to pcm_decode_init()
2011-10-26 12:01:06 -04:00
Justin Ruggles
83efd7652e
pcmdec: remove unnecessary check for sample_fmt change
2011-10-26 12:01:06 -04:00
Justin Ruggles
381e195b46
pcmdec: move DVD PCM bits_per_coded_sample check near to the code that sets
...
the sample size.
2011-10-26 12:01:06 -04:00
Justin Ruggles
6b94711f15
pcmdec: do not needlessly set *data_size to 0
2011-10-26 12:01:06 -04:00
Justin Ruggles
30f3e7b524
alacdec: remove unneeded NULL or zero-size packet checks.
...
This is already done in avcodec_decode_audio3()
2011-10-26 11:50:17 -04:00
Justin Ruggles
68f7e9cd8e
alacdec: simplify buffer allocation by using FF_ALLOC_OR_GOTO()
2011-10-26 11:50:17 -04:00
Justin Ruggles
b316af7a7c
alacdec: ask for a sample for unsupported sample depths.
...
Also return AVERROR_PATCHWELCOME.
2011-10-26 11:50:17 -04:00