summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) ipmovie: do not read audio packets before the codec is known truemotion2: check size before GetBitContext initialisation avio: Only do implicit network initialization for network protocols avio: Add an URLProtocol flag for indicating that a protocol uses network adpcm: ADPCM Electronic Arts has always two channels matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc() fate: Add missing reference file from 9b4767e4. mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions. 4xm: Prevent buffer overreads. mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan vp3: add fate test for non-zero last coefficient vp3: fix streams with non-zero last coefficient swscale: remove unused U/V arguments from yuv2rgb_write(). timer: K&R formatting cosmetics lavf: cosmetics, reformat av_read_frame(). lavf: refactor av_read_frame() to make it easier to understand. Report an error if pitch_lag is zero in AMR-NB decoder. Revert "4xm: Prevent buffer overreads." 4xm: Prevent buffer overreads. 4xm: pass the correct remaining buffer size to decode_i2_frame(). ... Conflicts: libavcodec/4xm.c libavcodec/mjpegdec.c libavcodec/truemotion2.c libavformat/ipmovie.c libavformat/mov_chan.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 4xm: Prevent buffer overreads.Aneesh Dogra2012-01-05
| | | | | | | | | | | | | | 4xm decoder while decoding i2 frames can overread the buffer if proper checks are not made. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * Revert "4xm: Prevent buffer overreads."Ronald S. Bultje2012-01-04
| | | | | | | | | | This reverts commit 295a7c0238e84b0ffa8f21ed938d45f51f54a4cd. The patch breaks decoding of regular files (e.g. fate-4xm-2).
| * 4xm: Prevent buffer overreads.Aneesh Dogra2012-01-04
| | | | | | | | | | | | | | 4xm decoder while decoding i2 frames can overread the buffer if proper checks are not made. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * 4xm: pass the correct remaining buffer size to decode_i2_frame().Aneesh Dogra2012-01-04
| | | | | | | | | | | | | | frame_size is the number of bytes left in the packet, so if we are passing buf-4 we can safely read frame_size+4 bytes. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * 4xm: fix calculation of the next output line position in decode_i2_frame().Aneesh Dogra2012-01-04
| | | | | | | | | | | | The current code doesn't work unless width is an exact multiple of 16. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vp3dec: Check coefficient index in vp3_dequant() svq1dec: call avcodec_set_dimensions() after dimensions changed. Prepare for 0.8_beta1 snapshot release threads: check defines before using them in automatic thread detection pthread: include sys/types.h before sys/sysctl.h 4xm: remove unused variables. h264: Fix a possible overread in decode_nal_units() allfilters: fix type of avfilter_vsrc_buffer. w32thread: call ResetEvent() in pthread_cond_broadcast(). Conflicts: Changelog RELEASE doc/RELEASE_NOTES libavcodec/pthread.c libavcodec/vp3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 4xm: remove unused variables.Anton Khirnov2011-12-23
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: build: fix standalone compilation of OMA muxer build: fix standalone compilation of Microsoft XMV demuxer build: fix standalone compilation of Core Audio Format demuxer kvmc: fix invalid reads 4xm: Add a check in decode_i_frame to prevent buffer overreads adpcm: fix IMA SMJPEG decoding options: set minimum for "threads" to zero bsd: use number of logical CPUs as automatic thread count windows: use number of CPUs as automatic thread count linux: use number of CPUs as automatic thread count pthreads: reset active_thread_type when slice thread_init returrns early v410dec: include correct headers Drop ALT_ prefix from BITSTREAM_READER_LE name. lavfi: always build vsrc_buffer. ra144enc: zero the reflection coeffs if the filter is unstable sws: readd PAL8 to isPacked() mov: Don't stick the QuickTime field ordering atom in extradata. truespeech: fix invalid reads in truespeech_apply_twopoint_filter() Conflicts: configure libavcodec/4xm.c libavcodec/avcodec.h libavfilter/Makefile libavfilter/allfilters.c libavformat/Makefile libswscale/swscale_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 4xm: Add a check in decode_i_frame to prevent buffer overreadsShitiz Garg2011-12-22
| | | | | | | | | | | | Fixes bugzilla #135 Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavc: always align height by 32 pixel raw: add 10bit YUV definitions nut: support 10bit YUV mpegvideo_enc: separate declarations and statements oma: make header compile standalone vp3: Reorder some functions to fix VP3 build with Theora disabled. build: fix standalone compilation of ADX encoder build: fix standalone compilation of ADPCM decoders build: fix standalone compilation of mpc7/mpc8 decoders 4xm: Use bytestream2 functions to prevent overreads bytestream: add a new set of bytestream functions with overread checking mpegts: Suppress invalid timebase warnings on DMB streams. mpegts: Fix typo in handling sections in the PMT. vc1dec: Use the right pointer type for the tmp pointer Conflicts: libavcodec/4xm.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/vp3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 4xm: Use bytestream2 functions to prevent overreadsAneesh Dogra2011-12-20
| | | | | | | | | | | | Fixes Bug 110. Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: APIchanges: fill in revision for AVFrame.age deprecation avcodec: deprecate AVFrame.age 4xm: remove unneeded check for remaining unused data. lavf: force threads to 1 in avformat_find_stream_info() swscale: fix overflows in vertical scaling at top/bottom edges. lavf: add OpenMG audio muxer. omadec: split data that will be used in the muxer to a separate file. lavf: rename oma.c -> omadec.c tmv decoder: set correct pix_fmt Conflicts: Changelog doc/APIchanges libavcodec/mpegvideo.c libavcodec/version.h libavformat/oma.c libavformat/version.h libswscale/swscale.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 4xm: remove unneeded check for remaining unused data.Justin Ruggles2011-12-18
| | | | | | | | | | This is unnecessary complication that only prints a message and does not affect decoding.
| * 4xm: prevent NULL dereference with invalid huffman tableLaurent Aimar2011-10-10
| | | | | | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
| * 4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffersLaurent Aimar2011-10-10
| | | | | | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | 4xm: check if there are bits left in decode_i_block()Michael Niedermayer2011-12-14
| | | | | | | | | | | | | | Fixed Ticket753 Bug Found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Try to set AVFrame.reference to correct values.Reimar Döffinger2011-11-05
| | | | | | | | | | | | | | | | | | I am not sure these new values are correct, not am I sure the semantics are a good idea since we do not seem to make any use of them but they caused a lot of confusion, but this seems to make things closer to matching the documentation. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header mpeg124: use sign_extend() function ac3dec: use get_sbits() instead of manually sign-extending 4xm: fix signed overflow wmavoice: fix a signed overflow mpegvideo_enc: fix a signed overflow crc: fix signed overflow fate: run avconv with -nostats flag avtools: add -v as alias for -loglevel avconv: always print stats with AV_LOG_INFO doc/avconv: add forgotten output/per-stream info to -filter avconv: add -stats option to enable/disable printing encoding progress avconv: in output_packet() don't set decoded_data_size for video. avconv: remove pointless always true condition avconv: factorize common code in transcode_init() zmbv: remove memcpy() of decoded frame mpeg12enc: use sign_extend() function h264pred: use unsigned types for pixel values, fix signed overflows h264: fix signed overflows in x*0x01010101 expressions h264pred: remove unused variables Conflicts: avconv.c tests/fate-run.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 4xm: fix signed overflowMans Rullgard2011-10-09
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Reject video with non multiple of 16 width/height in the 4xm decoder.Laurent Aimar2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 4xm decoder: fix data size for i2 frames.Michael Niedermayer2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 4xm decoder: print some error messages in case of errors.Michael Niedermayer2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Check for out of bound accesses in the 4xm decoder.Laurent Aimar2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffers ↵Laurent Aimar2011-10-02
| | | | | | | | | | | | used in 4xm decoder. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Prevent NULL dereference when the huffman table is invalid in the 4xm decoder.Laurent Aimar2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata. H.264: tweak some other x86 asm for Atom probe: Fix insane flow control. mpegts: remove invalid error check s302m: use nondeprecated audio sample format API lavc: use designated initialisers for all codecs. x86: cabac: add operand size suffixes missing from 6c32576 Conflicts: libavcodec/ac3enc_float.c libavcodec/flacenc.c libavcodec/frwu.c libavcodec/pictordec.c libavcodec/qtrleenc.c libavcodec/v210enc.c libavcodec/wmv2dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: use designated initialisers for all codecs.Anton Khirnov2011-07-29
| | | | | | | | It's more readable and less prone to breakage.
| * Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.Stefano Sabatini2011-05-02
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-26
| | | | | | | | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | lavc: set defaults in internal codec framesStefano Sabatini2011-05-07
| | | | | | | | | | | | | | | | | | This is required specifically for setting frame->format to -1, otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading the format from the output decoded frame will get misled. In particular fix regressions occurring with the pending vsrc_buffer patch.
* | replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*Stefano Sabatini2011-05-02
| |
* | 4xm: use reget_buffer() in decode_frame()Stefano Sabatini2011-04-27
| | | | | | | | | | | | | | | | | | | | | | | | Also remove unnecessary call to avctx->release_buffer(). reget_buffer is required since apparently the codec needs to be feeded with the previous frame data. Releasing the frame and using get_buffer was working only in the case get_buffer() was returning the old frame data, and resulting in playback artifacts otherwise. Fix trac issue #85.
* | Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-28
|/ | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit d36beb3f6902b1217beda576aa18abf7eb72b03c)
* Allocate last picture for 4xm pfrm if its not allocated.Michael Niedermayer2011-01-16
| | | | | | Fixes segfault and issue2527 Originally committed as revision 26397 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix visual artifacts in 4XM decoding on big-endian systemVitor Sessak2010-11-12
| | | | Originally committed as revision 25734 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add av_ prefix to bswap macrosMåns Rullgård2010-07-10
| | | | Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
* bswap: change ME to NE in macro namesMåns Rullgård2010-07-10
| | | | | | | Other parts of FFmpeg use NE (native endian) rather than ME (machine). This makes it consistent. Originally committed as revision 24169 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove DECLARE_ALIGNED_{8,16} macrosMåns Rullgård2010-03-06
| | | | | | | These macros are redundant. All uses are replaced with the generic DECLARE_ALIGNED macro instead. Originally committed as revision 22233 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move array specifiers outside DECLARE_ALIGNED() invocationsMåns Rullgård2010-01-22
| | | | Originally committed as revision 21377 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix red/blue swap for 4xa files.Carl Eugen Hoyos2010-01-07
| | | | Originally committed as revision 21070 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add missing release_buffer on closeReimar Döffinger2009-10-13
| | | | Originally committed as revision 20227 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 4xm: provide 16-byte alignment where requiredMåns Rullgård2009-08-26
| | | | Originally committed as revision 19717 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 4xm decoder uses get_buffer, set CODEC_CAP_DR1Baptiste Coudurier2009-06-05
| | | | Originally committed as revision 19091 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-13
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add a av_fast_malloc function and replace several uses of av_fast_realloc,Reimar Döffinger2009-04-12
| | | | | | thus avoiding potential memleaks and pointless memcpys. Originally committed as revision 18470 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use void * instead of uint8_t * for the destination buffer for dsp.bswap_bufReimar Döffinger2009-04-12
| | | | | | | where easily possible (mimic, eatqi, 4xm). This allows to avoid a typecast. Originally committed as revision 18469 to svn://svn.ffmpeg.org/ffmpeg/trunk