Commit Graph

15911 Commits

Author SHA1 Message Date
Franz Brauße 12cbbbb4ab smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 14:44:11 -04:00
Diego Biurrun b691fd7a4d h264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing() 2012-03-30 17:47:12 +02:00
Diego Biurrun 9ad80ef3db h264: Make ff_h264_decode_end() static, it is not used externally.
Also drop the now unnecessary ff_ prefix from its name.
2012-03-30 17:46:52 +02:00
Ronald S. Bultje 0399fe0fd2 lzw: fix potential integer overflow. 2012-03-29 11:36:14 -07:00
Ronald S. Bultje b7b1509d06 truemotion: forbid invalid VLC bitsizes and token values.
SHOW_UBITS() is only defined up to n_bits is 25, therefore forbid
values larger than this in get_vlc2() (max_bits). tokens[][] can be
used as an index in deltas[], which has a size of 64, so ensure the
values are smaller than that.

This prevents crashes on corrupt bitstreams.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:14 -07:00
Ronald S. Bultje bf39d3b59d truemotion2: handle out-of-frame motion vectors through edge extension.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:11 -07:00
Kostya Shishkov a05c41acd1 mp3dec: perform I/S and M/S only when frame mode is joint stereo.
Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.
2012-03-29 19:08:05 +02:00
Ronald S. Bultje ddcf67c8a5 lzw: prevent buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 17:38:51 -07:00
Mashiat Sarker Shakkhar 28e8c4d59a WMAL: Remove inaccurate and unnecessary doxy
A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-29 01:47:03 +02:00
Ronald S. Bultje 63a1b481f6 h264: fix cabac-on-stack after safe cabac reader. 2012-03-28 16:35:42 -07:00
Ronald S. Bultje bd508d435b truemotion2: convert packet header reading to bytestream2.
Also use correct buffer sizes in calls to tm2_read_stream(). Together,
this prevents overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 12:29:26 -07:00
Ronald S. Bultje a940198130 cabac: add overread protection to BRANCHLESS_GET_CABAC().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-03-28 08:01:29 -07:00
Ronald S. Bultje 448dc42571 cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 16f6e83f74 cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 951014e5bb cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje a0bdcb019e h264: add overread protection to get_cabac_bypass_sign_x86(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 95bfa4ead7 h264: reindent get_cabac_bypass_sign_x86(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje db025929f2 h264: use struct offsets in get_cabac_bypass_sign_x86(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 7374fac804 h264: fix overreads in cabac reader.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 08:01:28 -07:00
Ronald S. Bultje d360dd902c wmall: fix seeking. 2012-03-28 07:14:21 -07:00
Ronald S. Bultje 0a82f5275f lagarith: fix buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 07:06:47 -07:00
Diego Biurrun c0b34e6148 dvdec: drop unnecessary dv_tablegen.h #include
dvdec.c uses nothing from dv_tablegen.h.  As a welcome side-effect, this
fixes compilation of that file with hardcoded tables enabled.
2012-03-28 15:51:43 +02:00
Diego Biurrun a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Diego Biurrun 856c8e0a04 faandct: Remove FAAN_POSTSCALE define and related code.
It is not a user-accessible option and unlikely to ever be changed.
2012-03-28 09:38:31 +02:00
Anton Khirnov a839dbb94e dvenc: print allowed profiles if the video doesn't conform to any of them. 2012-03-28 09:29:04 +02:00
Anton Khirnov 3c6607eb6f avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
Otherwise realloc would free it, which would result in double free
later.
2012-03-28 09:28:47 +02:00
Paul B Mahol 55abaa58e5 westwood_vqa: fix SND0 chunk handling
Version from vqa header does not dictate which sound chunks may
appear in file.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-27 11:58:15 -04:00
Ronald S. Bultje 98df2e2414 raw: forward avpicture_fill() error code in raw_decode().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-27 08:54:07 -07:00
Diego Biurrun d724fe665b dv: Split off DV video decoder into its own file. 2012-03-27 11:15:47 +02:00
Mashiat Sarker Shakkhar 95b192de5d vc1: Do not read from array if index is invalid.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-26 17:48:13 -07:00
Ronald S. Bultje 2ad405548b targa: convert to bytestream2.
Also remove some write-only variables or write-only variable
assignments, remove internal colorspace conversion to native
endianness (that can be done by swscale much more efficiently),
and some cosmetics.
2012-03-26 17:46:16 -07:00
Ronald S. Bultje 5484170ac7 rv34: set mb_num_left to 0 after finishing a frame
Prevents running error resilience on a previous frame which will write
to the pic->mb_type[] array of the previous image. The array might
already be re-used for a new image in a subsequent thread, thus cause
two threads to write to the same pic->mb_type[] array, causing a race
condition which can crash in rv34_decode_cbp(), called by
rv34_decode_inter_mb_header() (which accesses mb_type[] twice,
assuming values are maintained, which the race condition breaks).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-26 16:39:01 -07:00
Diego Biurrun 72ccfb3cb7 build: ppc: drop stray leftover backslash 2012-03-26 16:37:57 +02:00
Diego Biurrun e7e19b15c7 build: Only clean the architecture subdirectory we build for.
This allows simplifying the Makefiles; it is no longer necessary to register
arch subdirectory Makefiles, just putting them in place is enough.
2012-03-26 13:29:03 +02:00
Diego Biurrun ad0e31f134 build: prettyprinting cosmetics 2012-03-26 13:00:10 +02:00
Ronald S. Bultje b2af057a36 smacker: convert palette and header reading to bytestream2. 2012-03-25 16:31:16 -07:00
Ronald S. Bultje c3bbd0b53b alac: convert extradata reading to bytestream2. 2012-03-25 13:35:05 -07:00
Diego Biurrun 62ce9defb8 x86: dsputil: prettyprint gcc inline asm 2012-03-25 11:50:48 +02:00
Diego Biurrun 3b54912113 x86: K&R prettyprinting cosmetics for dsputil_mmx.c 2012-03-25 11:50:48 +02:00
Diego Biurrun 915a2a0a65 x86: conditionally compile H.264 QPEL optimizations 2012-03-25 11:50:45 +02:00
Diego Biurrun 3816642eab dsputil_mmx: Surround QPEL macros by "do { } while (0);" blocks.
This makes them safe to use in non-fully braced if-blocks and similar.
2012-03-25 11:48:37 +02:00
Ronald S. Bultje 3a3f06b05e dpcm: convert to bytestream2. 2012-03-24 19:02:26 -07:00
Ronald S. Bultje f31a68e78c interplayvideo: convert to bytestream2. 2012-03-24 17:09:18 -07:00
Alexander Strange cb34867780 h264: fix memleak in error path.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:34:33 -07:00
Alexander Strange 147ee4cf06 pthread: Immediately release all frames in ff_thread_flush()
Before this, they were only added to the delayed release queue and not
freed until later. This could lead to unnecessary memory use or buffer
exhaustion.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:29:51 -07:00
Alexander Strange 6ef4063957 h264: Add check for invalid chroma_format_idc
Fixes a crash when FF_DEBUG_PICT_INFO is used.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 15:29:38 -07:00
Ronald S. Bultje ec0ed97b04 utvideo: port header reading to bytestream2.
Fixes crash during slice size reading if slice_end goes negative.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-24 15:15:56 -07:00
Ronald S. Bultje 2ee01fbded pthread: free progress if buffer allocation failed.
Else we run out of progress variables after a few failed buffer
allocations.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-24 21:29:35 +01:00
Ronald S. Bultje bc1ef85520 lavc/avconv: support changing frame sizes in codecs with frame mt.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-24 21:29:16 +01:00
Kostya Shishkov 72dadaa957 utvideo: mark output picture as keyframe.
Spotted by Антон.
2012-03-24 20:21:33 +01:00
Aneesh Dogra cc965300cb sunrast: Add support for negative linesize.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-24 11:27:20 -04:00
Janne Salonen 14ba7472dc vp8: fix update_lf_deltas in libavcodec/vp8.c
lf_delta.ref[i] and lf_delta.mode[i] were incorrectly reset to 0 if
specific delta value was not updated. Fixed to keep the previous value
if flag indicates that element in question is not updated.

Signed-off-by: Janne Salonen <jsalonen@google.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-24 08:22:05 -07:00
Kostya Shishkov 494bce6224 ralf: read Huffman code lengths without GetBitContext
Those descriptions are stored in nibbles, so they are easy to extract.
And this way we don't need to pad tables for possible bit reader overreads.
2012-03-24 11:53:26 +01:00
Janne Grunau cb7190cd2c rv34: error out on size changes with frame threading 2012-03-23 23:11:55 +01:00
Alex Converse b00307ecd0 aacsbr: Add a debug check to sbr_mapping.
There have been multiple bugs caused by inconsistencies here.

Based on an idea from Michael Niedermayer.

CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse 0cb93dacee aac: Reset some state variables when turning SBR off
This makes sure the reset flag gets set when SBR gets turned back on
and sets control variables for unguided mode back to their defaults.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse a237b38021 aac: Reset PS parameters on header decode failure.
If the next header frame codes zero envelopes the previous frame's
values will be used. Consequently the invalid values must be cleared.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Ronald S. Bultje 71ea26811c aacsbr: handle m_max values smaller than 4.
Prevents a signflip in the counter, and a subsequent crash because of
overreads/overwrites.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 12:56:08 -07:00
Janne Grunau 73ad4471a4 rv34: Handle only complete frames in frame-mt.
Correct handling of errors to prevent hags or crashes is very complex
otherwise.

The frame initializing is also moved from decode_slice() to
decode_frame() for clarity.
2012-03-23 17:50:46 +01:00
Janne Grunau 5ab506a5c8 MPV: set reference frame pointers to NULL when allocation of dummy pictures fails 2012-03-23 17:50:46 +01:00
Michael Niedermayer afa6129016 zerocodec: factorize loop
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-23 12:10:41 +01:00
Ronald S. Bultje 262196445c wmavoice: fix stack overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje 3c9267673e wmalossless: error out if a subframe is not used by any channel.
Prevents infinite loop because min_channel_len never increments.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje 75d7975268 vqa: check palette chunk size before reading data.
Prevents overreads beyond buffer boundaries.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje d462949974 wmalossless: reset sample pointer for each subframe.
Prevents overwrites when some subframes only encode some channels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Ronald S. Bultje 326f7a68bb wmalossless: error out on invalid values for order.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 12:17:14 -07:00
Anton Khirnov 677df4d2ef pngenc: better upper bound for encoded frame size.
Fixes encoding very large pictures.

Thanks to Костя for providing the formula.
2012-03-22 19:50:35 +01:00
Kostya Shishkov 87818103a0 wmall: output packet only if we have decoded some samples
Also set CODEC_CAP_DELAY to indicate that decoder may still have some
undecoded data left in internal buffer.
2012-03-22 07:16:47 +01:00
Justin Ruggles 6aba117f12 adxenc: use AVCodec.encode2() 2012-03-21 15:04:42 -04:00
Justin Ruggles 54e6cf8a94 adxenc: Use the AVFrame in ADXContext for coded_frame 2012-03-21 15:04:42 -04:00
Ronald S. Bultje 68fd077f68 indeo4: fix out-of-bounds function call.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-03-21 19:01:08 +01:00
Justin Ruggles 5d4017b8f3 vorbisenc: use AVCodec.encode2() 2012-03-21 12:49:36 -04:00
Justin Ruggles e5aab2d7a4 libvorbis: use AVCodec.encode2() 2012-03-21 12:49:36 -04:00
Justin Ruggles 8ccf545b95 libopencore-amrnbenc: use AVCodec.encode2() 2012-03-21 12:49:36 -04:00
Justin Ruggles 330d9d1b50 ra144enc: use AVCodec.encode2() 2012-03-21 12:49:36 -04:00
Justin Ruggles f090428234 nellymoserenc: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles 32173df3d2 roqaudioenc: use AVCodec.encode2()
The first frame pts must be saved until we have 8 frames since RoQ audio
requires 8 frames in the first packet.
2012-03-21 12:49:35 -04:00
Justin Ruggles b03dcf07f6 libspeex: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles 57a52f258e libvo_amrwbenc: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles db440fa12d libvo_aacenc: use AVCodec.encode2() 2012-03-21 12:49:35 -04:00
Justin Ruggles 27bacfeb57 wmaenc: use AVCodec.encode2() 2012-03-21 12:49:32 -04:00
Justin Ruggles b0f75ba272 mpegaudioenc: use AVCodec.encode2()
Update FATE references due to encoder delay.
2012-03-20 18:56:22 -04:00
Justin Ruggles 3d853d7ab3 libmp3lame: use AVCodec.encode2() 2012-03-20 18:56:18 -04:00
Justin Ruggles 1987a940b7 libgsmenc: use AVCodec.encode2() 2012-03-20 18:55:39 -04:00
Justin Ruggles d1afb2f94e libfaac: use AVCodec.encode2()
Encoder output is delayed by several frames, so we keep a queue of input
frame timing info to match up with corresponding output packets.
2012-03-20 18:55:36 -04:00
Justin Ruggles 59041fd053 g726enc: use AVCodec.encode2() 2012-03-20 18:47:23 -04:00
Justin Ruggles bb03b6f7b1 g722enc: use AVCodec.encode2()
FATE reference updated due timestamp rounding because of resampling from
44100 Hz to 16000 Hz in avconv.
2012-03-20 18:47:23 -04:00
Justin Ruggles 910bdb9a42 flacenc: use AVCodec.encode2() 2012-03-20 18:47:19 -04:00
Justin Ruggles 24e74f0a0f adpcmenc: update to AVCodec.encode2() 2012-03-20 18:46:57 -04:00
Justin Ruggles aa872af5e3 ac3enc: update to AVCodec.encode2()
Update FATE references due to encoder delay.
2012-03-20 18:46:56 -04:00
Justin Ruggles ad95307f92 aacenc: use AVCodec.encode2() 2012-03-20 18:46:49 -04:00
Justin Ruggles 4bf64961a9 avcodec: add code for a frame queue for use by audio encoders with delay
This simplifies matching of timestamps between input frames and output
packets.
2012-03-20 16:04:21 -04:00
Justin Ruggles f63412fc74 oggdec: output correct timestamps for Vorbis
Takes encoder delay into account by comparing first the coded page
duration with the calculated page duration. Handles last packet duration
if needed, also by comparing coded duration with calculated duration.
Also does better handling of timestamp generation for packets in the
first page for streamed ogg files where the start time is not
necessarily zero.
2012-03-20 14:39:57 -04:00
Justin Ruggles a1977e0103 lavc: shrink encoded audio packet size after encoding. 2012-03-20 14:12:54 -04:00
Kostya Shishkov 1d10afd581 bink: fix typo in FFALIGN() argument 2012-03-20 18:57:51 +01:00
Kostya Shishkov 8ae28ac0f3 bink: align plane width to 8 when calculating bundle sizes
This fixes decoding of Bink files with non-multiple-of-16 width.
2012-03-20 16:33:57 +01:00
Anton Khirnov 4fea8959d8 doc/avconv: remove entries for AVOptions.
Documentation for those will be generated automatically.
2012-03-20 07:09:54 +01:00
Anton Khirnov 5626697104 Move AVFormatContext/AVCodecContext option tables to separate files.
This will allow us to automatically generate manpages for them.
2012-03-20 07:09:18 +01:00
Aaron Colwell 30011bf201 vp8: avoid race condition on segment map.
This change avoids accessing the segment map of the previous frame if
segmentation is not enabled for the current frame. The caller of
decode_mb_mode() only calls ff_thread_await_progress() on the reference
segmentation index array if segmentation is enabled, so Chromium's TSAN
will report a race when accessing this data while segmentation is not
enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-19 13:49:34 -07:00
Derek Buitenhuis 0e714f889e ZeroCodec Decoder
An obscure Japanese lossless video codec, originally intended
for use with a remote desktop application.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-03-19 19:02:23 +01:00
Kostya Shishkov b8560637d9 RealAudio Lossless decoder 2012-03-19 18:46:34 +01:00
Kostya Shishkov bb39bd195a zmbv: check decompress result
Changing flush type from Z_FINISH is needed since encoder compresses fixed
amount of data and doesn't care about writing end of stream marker.
2012-03-19 09:21:05 +01:00
Kostya Shishkov afc2263bcc zmbv: correct indentation 2012-03-19 09:20:39 +01:00
Ronald S. Bultje 1744ab9e46 adpcm: convert adpcm_thp to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje 72eda7786d adpcm: convert adpcm_yamaha to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje f184735a27 adpcm: convert adpcm_swf to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje 8afe2f9002 adpcm: convert adpcm_sbpro to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje 834c81f4c5 adpcm: convert adpcm_ct to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje b3084e29e6 adpcm: convert adpcm_ima_amv/smjpeg to bytestream2. 2012-03-18 15:33:16 -07:00
Ronald S. Bultje 22c48d399d adpcm: convert adpcm_ea_xas to bytestream2. 2012-03-18 15:33:16 -07:00
Ronald S. Bultje edd9555537 adpcm: convert adpcm_ea_r1/2/3 to bytestream2. 2012-03-18 15:33:16 -07:00
Ronald S. Bultje e60d09918c adpcm: convert ea_maxis_xa to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 4a876eba8d adpcm: convert adpcm_ea to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 524af484ed adpcm convert adpcm_ima_ea_sead to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 8f2ed09289 adpcm: convert adpcm_ima_ea_eacs to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 159831cc09 adpcm: convert adpcm_xa to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 16b7a5e241 adpcm: convert ima_ws to bytestream2. 2012-03-18 15:33:11 -07:00
Ronald S. Bultje 74d7ac95fb adpcm: convert adpcm_ima_apc to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 9721901440 adpcm: convert adpcm_ima_iss to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 1da9587026 adpcm: convert adpcm_dk3 to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje d570a96808 adpcm: convert adpcm_dk4 to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 5353ee3c30 adpcm: convert adpcm_ms to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 89f3aa8ce2 adpcm: use av_clip() in adpcm_ima_expand_nibble(). 2012-03-18 15:25:25 -07:00
Ronald S. Bultje 689be85a9a adpcm: convert adpcm_4xm to bytestream2. 2012-03-18 15:25:25 -07:00
Ronald S. Bultje 39505f4240 adpcm: convert adpcm_ima_wav to bytestream2. 2012-03-18 15:25:25 -07:00
Ronald S. Bultje 9604307dd8 adpcm: convert adpcm_ima_qt to bytestream2. 2012-03-18 15:25:25 -07:00
Ronald S. Bultje c346f6304c adpcm: fix nb_samples rounding for adpcm_ima_dk3, and update reference. 2012-03-18 15:25:25 -07:00
Diego Biurrun f36d5c1422 Update Janne's email address. 2012-03-18 16:07:33 +01:00
Diego Biurrun f03183d9a8 bytestream: Eliminate one level of pointless macro indirection. 2012-03-18 16:07:32 +01:00
Ronald S. Bultje abe3c697a3 xwd: convert to bytestream2. 2012-03-18 07:45:41 -07:00
Paul B Mahol 5a3a906ba2 vqavideo: port to bytestream2 API
Protects against overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-18 07:45:40 -07:00
Kostya Shishkov 6acac061ab prores: allow user to set fixed quantiser 2012-03-18 08:04:15 +01:00
Paul B Mahol 0afd8f12e9 avcodec: add XBM encoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-17 15:45:04 -04:00
Justin Ruggles 6ca3b248e2 resample: allocate a large enough output buffer
Fixes invalid writes and crashes when doing conversions such as stereo to 5.1
channels or sample rate conversion on 5.1 channels.
2012-03-17 13:37:44 -04:00
Justin Ruggles c3da9f5060 wmaenc: remove bit-exact hack
It may have improved cross-platform stability, but wasn't the only place in
the encoder with bitexact issues. It is no longer needed because we have FATE
tests for float encoders using fuzzy comparison.
2012-03-17 11:46:15 -04:00
Aneesh Dogra de64d8cf17 qtrle: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-16 17:50:39 -07:00
Paul B Mahol 341404f753 vqavideo: check malloc return values
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-16 16:57:12 -07:00
Uoti Urpala 05b9a89ed7 threads: fix old frames returned after avcodec_flush_buffers()
Calling avcodec_flush_buffers() and then avcodec_decode_video2() with
a 0-sized packet (to get remaining buffered frames) could incorrectly
return an old frame from before the avcodec_flush_buffers() call. Add
a loop in ff_thread_flush() to zero the got_frame field of each thread
to ensure the old frames will not be returned.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-16 15:38:18 -07:00
Janne Grunau 7b60799aa8 MPV: always mark dummy frames as reference
If the dummy frame are not created from a reference frame they could
be deleted untimely resulting in multithreaded decoder waiting on
the current frame to finish.
Noticed by Ronald S. Bultje in the RV34 decoder with a broken file.
2012-03-16 23:35:32 +01:00
Ronald S. Bultje 1e26a48fa2 h264: fix deadlocks on incomplete reference frame decoding.
If decoding a second complementary field, and the first was
decoded in our thread, mark decoding of that field as complete.
If decoding fails, mark the decoded field/frame as complete.
Do not allow switching between field modes or field/frame mode
between slices within the same field/frame. Ensure that two
subsequent fields cover top/bottom (rather than top/frame,
bottom/frame or such nonsense situations).

Fixes various deadlocks when decoding samples with errors in
reference frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-16 15:31:00 -07:00
Ronald S. Bultje c6ccb96bc9 mpeg4: report frame decoding completion at ff_MPV_frame_end().
Prevents hangs on corrupt input.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-16 15:30:53 -07:00
Ronald S. Bultje 80387f0e25 mimic: don't use self as reference, and report completion at end of decode().
Fixes hangs on corrupt samples that reference self-frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-16 15:30:52 -07:00
Diego Biurrun e5d403720e h264: K&R formatting cosmetics
Also remove some disabled code and fix a few comment typos.
2012-03-16 20:35:37 +01:00
Diego Biurrun ad4cec6b80 s3tc.h: Add missing #include to fix standalone header compilation. 2012-03-16 18:51:57 +01:00
Paul B Mahol 702985b8b7 dxa: remove useless code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-15 14:01:23 +01:00
Ronald S. Bultje e0febda22d h264: stricter reference limit enforcement.
Progressive images can have only 16 references, error out if there are
more, since the data is almost certainly corrupt, and the invalid value
will lead to random crashes or invalid writes later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-14 13:24:49 -07:00
Ronald S. Bultje 48cbe4b092 h264: increase reference poc list from 16 to 32.
Interlaced images can have 32 references (16 per field), so limiting the
array size to 16 leads to invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-14 13:24:45 -07:00
Ronald S. Bultje 86020073db xa_adpcm: limit filter to prevent xa_adpcm_table[] array bounds overruns.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-14 13:24:40 -07:00
Michael Niedermayer 1f8ff2b13c snow: check reference frame indices.
Fixes NULL ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-14 13:24:35 -07:00
Michael Niedermayer c9837954e7 snow: reject unsupported chroma shifts.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-14 13:24:31 -07:00