1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

16104 Commits

Author SHA1 Message Date
Jordi Ortiz
4c150e3f4f Dirac: allcodecs in alphabetical order
(cherry picked from commit b44c20e9f04f29aff09f64659b3c2926e08b46f8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 21:50:16 +01:00
Jordi Ortiz
e3cfe54145 Dirac now returns AVFrames instead of DiracFrames
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 21:50:16 +01:00
multiple authors
5d50fcc549 DIRAC Decoder stable version, MMX support removed.
Look for MMX_DISABLED to find the disabled functions.

Authors of this code are Marco Gerards <marco@gnu.org> and David Conrad <lessen42@gmail.com>
With changes from Jordi Ortiz <nenjordi@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 21:50:08 +01: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
Stefano Sabatini
5b1a06b1c9 libmp3lame: log error message in case of invalid number of channels
Also return meaningful error number in place of -1.
Improve feedback.
2011-10-30 21:10:54 +01:00
Reimar Döffinger
b264e5ca13 Remove pointless per-frame malloc/free.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-10-30 19:12:26 +01:00
David Conrad
25a6c59487 MMX put_no_rnd_pixels_l2 2011-10-30 19:06:57 +01:00
Michael Niedermayer
3c32a941b7 propresenc: fix missed LE pixfmt occurance
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 04:17:01 +01:00
Michael Niedermayer
64a41dc21f proresenc: the encoder expects native endian input.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 02:55:01 +01:00
Michael Niedermayer
d17e7070a0 Merge remote-tracking branch 'qatar/master'
* qatar/master: (51 commits)
  cin audio: use sign_extend() instead of casting to int16_t
  cin audio: restructure decoding loop to avoid a separate counter variable
  cin audio: use local variable for delta value
  cin audio: remove unneeded cast from void*
  cin audio: validate the channel count
  cin audio: remove unneeded AVCodecContext pointer from CinAudioContext
  dsicin: fix several audio-related fields in the CIN demuxer
  flacdec: use av_get_bytes_per_sample() to get sample size
  dca: handle errors from dca_decode_block()
  dca: return error if the frame header is invalid
  dca: return proper error codes instead of -1
  utvideo: handle empty Huffman trees
  binkaudio: change short to int16_t
  binkaudio: only decode one block at a time.
  binkaudio: store interleaved overlap samples in BinkAudioContext.
  binkaudio: pre-calculate quantization factors
  binkaudio: add some buffer overread checks.
  atrac3: support float or int16 output using request_sample_fmt
  atrac3: add CODEC_CAP_SUBFRAMES capability
  atrac3: return appropriate error codes instead of -1
  ...

Conflicts:
	libavcodec/atrac1.c
	libavcodec/dca.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 01:33:41 +02:00
Michael Niedermayer
1af3571e05 mjpeg_parser: Rewrite to skip marker segments
Based on code by Aaron Miller <amiller@atlasdigital.tv>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 00:29:17 +02:00
Michael Niedermayer
429b3cd6f5 mjpeg_parser: add MJPEGParserContext
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-30 00:28:25 +02:00
Carl Eugen Hoyos
0387ad892c Be more verbose about unsupported H.264 bit-depths. 2011-10-29 23:41:05 +02: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
Michael Niedermayer
9b04f51d5f proresenc: add forgotten bytestream include
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-29 16:53:37 +02:00
Reimar Döffinger
c5865a8967 Use bytestream functions to write header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-10-29 15:48:43 +02:00
Reimar Döffinger
d9f4dc52a0 Only do 1 malloc instead of 3 and check for failure.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-10-29 15:48:43 +02:00
Reimar Döffinger
5c9b9165cd Remove unnecessary memset.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-10-29 15:48:43 +02:00
Reimar Döffinger
a2db46b883 Remove useless casts.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2011-10-29 15:48:43 +02:00
Carl Eugen Hoyos
4d2f991187 Bump libavcodec minor version for the ProRes encoder. 2011-10-29 13:17:08 +02:00
Carl Eugen Hoyos
7afa6b4458 Warn if YCgCo colourspace is detected in H.264. 2011-10-29 13:16:47 +02:00
Anatoliy Wasserman
70bab5847e Apple ProRes encoder
Signed-off-by: Anatoliy Wasserman <anatoliy.wasserman@yandex.ru>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-29 12:46:05 +02: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
Michael Niedermayer
6faf0a21e1 Merge remote-tracking branch 'qatar/master'
* qatar/master: (53 commits)
  probe: Restore identification of files with very large id3 tags and no extension.
  probe: Remove id3 tag presence as a criteria to do file extension checking.
  mpegts: MP4 SL support
  mpegts: MP4 OD support
  mpegts: Add support for Sections in PMT
  mpegts: Replace the MP4 descriptor parser with a recursive parser.
  mpegts: Add support for multiple mp4 descriptors
  mpegts: Parse mpeg2 SL descriptors.
  isom: Add MPEG4SYSTEMS dummy object type indication.
  aacdec: allow output reconfiguration on channel changes
  nellymoserenc: take float input samples instead of int16
  nellymoserdec: use dsp functions for overlap and windowing
  nellymoserdec: do not fail if there is extra data in the packet
  nellymoserdec: fail if output buffer is too small
  nellymoserdec: remove pointless buffer size check.
  lavf: add init_put_byte() to the list of visible symbols.
  seek-test: free options dictionary after use
  snow: do not draw_edge if emu_edge is set
  tools/pktdumper: update to recent avformat api
  seek-test: update to recent avformat api
  ...

Conflicts:
	doc/APIchanges
	libavcodec/mpegaudiodec.c
	libavcodec/nellymoserdec.c
	libavcodec/snow.c
	libavcodec/version.h
	libavcodec/wmadec.c
	libavformat/avformat.h
	libavformat/mpegts.c
	libavformat/mxfdec.c
	libavformat/utils.c
	libavformat/wtv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-29 02:08:54 +02: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
Carl Eugen Hoyos
246c8dac3e Fix dca decoding for many samples after last commit.
Still be less verbose about channel count change from 0 channels.
2011-10-28 19:13:59 +02:00
Carl Eugen Hoyos
ad2d597292 Be less verbose about dca channel number changes.
Only inform the user that the number of channels changed if it was set
before.
2011-10-28 18:21:40 +02:00
Carl Eugen Hoyos
81cd96caee Remove unused dca context variable. 2011-10-28 18:20:37 +02: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
Hendrik Leppkes
022d22e581 Fix a regression in the dca parser introduced by dts express support.
The dca parser needs to check that the framesize is actually of a complete
frame, and not of a partial DTS-HD frame, which is not constant size, and
thus the check would fail.
(cherry picked from commit ebc0ccb9af59b78732e82c09f8c90b1d46b478e0)

Review-by: Benjamin Larsson
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 15:26:31 +02:00
Hendrik Leppkes
14474fbbd0 dca_parser: Add support for parsing dts express
(cherry picked from commit ea36f60493f675db531dc2dbef04fb60fbc21a6a)

Review-by: Benjamin Larsson
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 15:25:40 +02:00
Hendrik Leppkes
7b6ae0e849 dca: allow the channel count to change.
(cherry picked from commit 42e78d2296752293cd08c5727f76c3b37c68fb24)

Review-by: Benjamin Larsson
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 15:24:35 +02: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
Michael Niedermayer
e7f008a534 lavc: Map deprecated codec ids to ours so as to maintain compatibility with the fork.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 01:37:50 +02:00
Michael Niedermayer
4f587d1637 avcodec: Change values of codec ids at the end of lists that dont exist outside ffmpeg yet so
they wont conflict when they get added to the fork with randomly changed order and values.
Also add duplicate codec_ids to allow maintaining compatibility.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 01:37:50 +02:00
Michael Niedermayer
2179fc48b2 avcodec: Resolve the codec_id compatibility issue.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 01:37:50 +02:00
Hendrik Leppkes
dc38625ebc Add SMPTE240M transfer characteristics flag.
(cherry picked from commit 4266191919c31a1921b497ec831d3b1c1fa28df8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-28 01:37:50 +02:00
Anton Khirnov
15946eb8a9 lavc: remove "legacy" mpegvideo decoder. 2011-10-27 23:06:26 +02:00
Michael Niedermayer
abe17c6963 j2kdec: debug markers support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 20:43:27 +02:00
Michael Niedermayer
4ffed61b49 h264_parser: fully parse first_mb_in_slice to more reliably detect AU boundaries.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 17:53:29 +02:00
Michael Niedermayer
23040e2e3d h264: use long reading for first_mb_in_slice
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 17:53:08 +02:00
Michael Niedermayer
3e7db0a9ee resample: Fix array size
Found-by: Jim Radford
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 15:27:32 +02:00
Michael Niedermayer
1b9ca38d9d resample2: fix potential overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 14:34:45 +02:00
Michael Niedermayer
a67cb012e6 resample: Fix overflow
Found-by: Jim Radford
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 14:31:53 +02:00
Michael Niedermayer
173715d291 Merge remote-tracking branch 'qatar/master'
* qatar/master: (35 commits)
  libopencore-amr: check output buffer size before decoding
  libopencore-amr: remove unneeded buf_size==0 check.
  libopencore-amr: remove unneeded frame_count field.
  aac_latm: remove unneeded check for zero-size packet.
  pcmdec: fix output buffer size check by calculating the actual output size prior to decoding.
  pcmdec: move codec-specific variable declarations to the corresponding codec blocks.
  pcmdec: return buf_size instead of src-buf.
  avcodec: remove the Zork PCM encoder.
  pcm_zork: use AV_SAMPLE_FMT_U8 instead of shifting all samples by 8.
  pcmenc: remove unneeded sample_fmt check.
  pcmdec: move number of channels check to pcm_decode_init()
  pcmdec: remove unnecessary check for sample_fmt change
  pcmdec: move DVD PCM bits_per_coded_sample check near to the code that sets the sample size.
  pcmdec: do not needlessly set *data_size to 0
  alacdec: remove unneeded NULL or zero-size packet checks.
  alacdec: simplify buffer allocation by using FF_ALLOC_OR_GOTO()
  alacdec: ask for a sample for unsupported sample depths.
  alacdec: cosmetics: use 'ch' instead of 'chan' to iterate channels
  alacdec: move some declarations to the top of the function
  alacdec: always use get_sbits_long() for uncompressed samples
  ...

Conflicts:
	libavcodec/pcm.c
	tests/ref/acodec/pcm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-27 01:39:04 +02:00
David Conrad
748f921ad1 VP8: Unroll decoding segment update 2011-10-27 00:00:29 +02:00
David Conrad
ba3830e8a3 VP8: Remove no longer used vp8_rac_get_tree_with_offset 2011-10-26 23:56:34 +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
Justin Ruggles
63cf54df7a alacdec: cosmetics: use 'ch' instead of 'chan' to iterate channels 2011-10-26 11:50:17 -04:00
Justin Ruggles
01200f1283 alacdec: move some declarations to the top of the function 2011-10-26 11:50:17 -04:00
Justin Ruggles
c3a92412c0 alacdec: always use get_sbits_long() for uncompressed samples 2011-10-26 11:50:17 -04:00
Justin Ruggles
b46e58f741 alacdec: remove unneeded local variable 2011-10-26 11:50:17 -04:00
Justin Ruggles
7080533cda alacdec: remove the numchannels parameter from several functions.
They only operate on stereo content, so the extra param is not necessary and
also allows for simplifying the code.
2011-10-26 11:50:17 -04:00
Justin Ruggles
cb50329fc5 alacdec: rename 2 functions.
Now they only do stereo interleaving.
2011-10-26 11:50:16 -04:00
Justin Ruggles
c39bddd392 alacdec: move appending of extra_bits to a separate function.
This should also fix decoding of mono 24-bit.
2011-10-26 11:50:16 -04:00
Justin Ruggles
e739d35156 alacdec: split stereo decorrelation into a separate function.
It is identical for 16-bit and 24-bit, so there is no need to have duplicate
code.
2011-10-26 11:50:16 -04:00
Justin Ruggles
d251c85dce alacdec: cosmetics: rename 'wasted_bits' to 'extra_bits'.
The bits are not wasted, they are additional low bits that are added to the
16-bit decompressed samples to increase the output sample depth.
2011-10-26 11:50:16 -04:00
Justin Ruggles
dbbb9262ca alacdec: remove unneeded numsamples checks 2011-10-26 11:50:16 -04:00
Justin Ruggles
53df079a73 alacdec: check for buffer allocation failure.
Also rearranges some functions for easier cleanup on failure.
2011-10-26 11:50:16 -04:00
Justin Ruggles
e5e4f92b5c alacdec: allocate per-channel buffers based on channel count.
reduces memory usage when the stream has fewer than MAX_CHANNELS
2011-10-26 11:50:16 -04:00
Justin Ruggles
dcaa83a0fc alacdec: read/validate number of channels from the extradata.
check frame header channel count against header/container channel count.
2011-10-26 11:50:16 -04:00
Justin Ruggles
47e9c75b36 alacdec: remove unneeded validation of setinfo_sample_size.
It is already done when using it to set sample_fmt.
2011-10-26 11:50:16 -04:00
Justin Ruggles
0f26f3d5c4 alacdec: set sample_fmt in alac_decode_init() 2011-10-26 11:50:16 -04:00
Justin Ruggles
aec8383348 alacdec: set bytespersample using av_get_bytes_per_sample() 2011-10-26 11:50:15 -04:00
Janne Grunau
d6174bfe5f threads: restore has_b_frames in frame_thread_free
Otherwise the delay expressed in has_b_frames increases with every
avcodec_close/avcodec_open.
Fixes fate-ea-dct with more than 1 thread.
2011-10-26 16:55:54 +02:00
Michael Niedermayer
4416931fc0 snow: emu edge support
Fixes Ticket592

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 15:47:14 +02:00
Daniel Kang
ded3e9f054 H.264: Cometics to dsputil_mmx.c
Add whitespace.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-26 06:41:32 -07:00
Michael Niedermayer
c881df330d h264: Guess receovery points.
Fixes Ticket561

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 14:32:01 +02:00
Michael Niedermayer
51bfaa21c8 Merge remote-tracking branch 'qatar/master'
* qatar/master: (22 commits)
  g722dec: check output buffer size before decoding
  g722dec: cosmetics: reindent/linewrap
  g722dec: remove the use of lowres for half-rate decoding.
  tta: check for extradata allocation failure in tta demuxer
  tta: check for allocation failure of decode_buffer
  tta: use correct frame_length calculation.
  tta: add support for decoding 24-bit sample format
  cosmetics: indentation
  tta: remove pointless braces
  tta: check output buffer size after adjusting frame length for last frame
  tta: fix reading of format in TTA header.
  tta: remove useless commented-out lines
  tta: check remaining bitstream size while reading unary value
  lavf: deprecate AVStream.stream_copy
  avconc: split choose_codec() to choose_decoder/choose_encoder.
  lavf: simplify by using FFMAX/FFMIN.
  mpegenc: add preload private option.
  cosmetics: simplify latm_decode_init
  latm: avoid unnecessary reinit of the aac decoder
  aacdec: initialize sbr context only in new channel elements
  ...

Conflicts:
	avconv.c
	libavcodec/resample.c
	libavcodec/tta.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-26 02:36:07 +02:00
Michael Niedermayer
e403a97aac h264: 10l fix, missing () after replacing % by &
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-25 20:34:51 +02:00
Justin Ruggles
a3a8572165 g722dec: check output buffer size before decoding 2011-10-25 11:30:50 -04:00
Justin Ruggles
4e41973794 g722dec: cosmetics: reindent/linewrap 2011-10-25 11:30:50 -04:00
Justin Ruggles
d0a196962a g722dec: remove the use of lowres for half-rate decoding.
It is broken because an AVCodecContext can be opened/closed multiple
times, and sample_rate is getting divided by 2 each time that happens.

This removes the only use of lowres for audio.
2011-10-25 11:30:50 -04:00
Justin Ruggles
2f1d212fd0 tta: check for allocation failure of decode_buffer 2011-10-25 11:22:02 -04:00
Justin Ruggles
b5050539c9 tta: use correct frame_length calculation.
using a floating-point calculation is not necessary.
2011-10-25 11:22:02 -04:00
Justin Ruggles
c6056d4004 tta: add support for decoding 24-bit sample format
Note that this will not work in most cases with avconv and avplay due to the
AVCODEC_MAX_AUDIO_FRAME_SIZE limit, but it will decode correctly if given a
large enough output buffer.
2011-10-25 11:22:02 -04:00
Justin Ruggles
8664682d0e cosmetics: indentation 2011-10-25 11:22:02 -04:00
Justin Ruggles
7b7a74a150 tta: remove pointless braces 2011-10-25 11:22:02 -04:00
Justin Ruggles
e6923f683c tta: check output buffer size after adjusting frame length for last frame 2011-10-25 11:22:01 -04:00
Justin Ruggles
b16960a8a5 tta: fix reading of format in TTA header.
TTA does not support float at all, and format 2 is encrypted TTA.
2011-10-25 11:22:01 -04:00
Justin Ruggles
4d3e7a7516 tta: remove useless commented-out lines 2011-10-25 11:22:01 -04:00
Justin Ruggles
35f9d8c20a tta: check remaining bitstream size while reading unary value 2011-10-25 11:22:01 -04:00
Nicolas George
cf88cf17d0 Remove CELT / Opus confusion in labels, doc and comments.
The situation was not clear when support was added but it is now:
CELT and Opus are really two different codecs.
The current code supports CELT via libcelt, not Opus.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-25 15:04:51 +02:00
Janne Grunau
28287045ca cosmetics: simplify latm_decode_init 2011-10-25 12:08:21 +02:00
Janne Grunau
785f876cee latm: avoid unnecessary reinit of the aac decoder 2011-10-25 12:08:21 +02:00
Janne Grunau
80e36425fb aacdec: initialize sbr context only in new channel elements 2011-10-25 12:07:58 +02:00
Janne Grunau
b2e56e08c9 resample: reject unhandled conversions
audio_resample can not reduce the number of channels
2011-10-25 12:06:48 +02:00
Janne Grunau
ec1ce86e7f resample: remove unused #define 2011-10-25 12:06:48 +02:00
Nicolas George
02ac6a6544 libcelt_dec: whitespace cosmetics. 2011-10-25 09:38:08 +02:00
Michael Niedermayer
f0a7b67a35 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  adpcm: use sign_extend()
  mpeg12: fix mpeg_decode_slice context parameter type
  Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"

Conflicts:
	libavcodec/mpeg12.c
	libavcodec/mpeg12.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 23:45:44 +02:00
Nicolas George
f44c816566 libcelt_dec: set sample_fmt.
This fixes a regression introduced by the merging of patch fc2dd2c.

Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 21:17:32 +02:00
Hendrik Leppkes
138d10969d avcodec: add YCgCo color space.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 18:43:46 +02:00
Hendrik Leppkes
84e0553c1c pcm_bluray: set bits_per_raw_sample for > 16-bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 18:41:03 +02:00
Mans Rullgard
c8477df019 adpcm: use sign_extend()
This avoids warnings from the overflow checker and simplifies the code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-24 15:26:24 +01:00
Andreas Öman
123b1fac5c wmall: Working bitstream parser
(cherry picked from commit 929822111bc10fdf19ca66b7ed09e0ebf802878b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 15:55:57 +02:00
Michael Niedermayer
35075dc650 h264: Calculate a tighter recovery_frame.
Reduces delay with mplayers TS demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 12:17:24 +02:00
Michael Niedermayer
63f0708478 h264: Support invalid output by mplayers TS demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 12:16:03 +02:00
Michael Niedermayer
9c020810c1 Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"
This reverts commit da22ba7df4.

Conflicts:

	libavcodec/mpeg12.c
	libavcodec/mpeg12.h
2011-10-24 01:48:51 +02:00
Janne Grunau
d99fe3a478 mpeg12: fix mpeg_decode_slice context parameter type
During slice threading only MpegEncContext is passed to
mpeg_decode_slice, remove a wrong cast and change the function
definition to take MpegEncContext pointer.
2011-10-24 01:05:00 +02:00
Michael Niedermayer
fe906830fd Revert "mpeg12: move closed_gop from MpegEncContext to Mpeg1Context"
This reverts commit 3fc0830432.
The revert is done because the reasoning behind the commit was
flawed, closed_gop is not mpeg1/2 specific.

Conflicts:

	libavcodec/mpeg12.c
	libavcodec/mpeg12.h
2011-10-24 01:04:14 +02:00
Michael Niedermayer
2b0cdb7364 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Move id3v2 tag writing to a separate file.
  swscale: add missing colons to x86 assembly yuv2planeX.
  g722: split decoder and encoder into separate files
  cosmetics: remove extra spaces before end-of-statement semi-colons
  vorbisdec: check output buffer size before writing output
  wavpack: calculate bpp using av_get_bytes_per_sample()
  ac3enc: Set max value for mode options correctly
  lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c
  mpeg12: move closed_gop from MpegEncContext to Mpeg1Context
  mpeg12: move full_pel from MpegEncContext to Mpeg1Context
  mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h
  mpegvideo: remove some unused variables from MpegEncContext.

Conflicts:
	libavcodec/mpeg12.c
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 01:01:21 +02:00
Janne Grunau
cd8c64e197 Revert "mpeg12: move full_pel from MpegEncContext to Mpeg1Context"
This reverts commit da22ba7df4 since it
broke slice threading. Slice threading just duplicates MpegEncContext
so every value used during mpeg_decode_slice has to be in it.
A second patch will fix the illusion that Mpeg1Context is available
in mpeg_decode_slice.
2011-10-24 00:59:41 +02:00
Justin Ruggles
704721bc9c g722: split decoder and encoder into separate files 2011-10-23 11:42:34 -04:00