summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.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>
| * adpcm: ADPCM Electronic Arts has always two channelsJanne Grunau2012-01-05
| |
* | 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>
| * adpcm: fix IMA SMJPEG decodingPaul B Mahol2011-12-22
| | | | | | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | adpcm: Fix crashMichael Niedermayer2011-12-19
| | | | | | | | | | | | | | Fixes half of Ticket794 Bug found by: Oana Stratulat Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: build: link test programs with static libraries dct-test: remove unused variable cropTbl swscale: fix overflow in gray16 vertical scaling. get_bits: remove LAST_SKIP_CACHE macro swscale: fix integer overflows in RGB pixel writing. swscale: add endian conversion for RGB555 and RGB444 pixel formats swscale: fix overflows in output of RGB48 pixels. get_bits: remove strange/obsolete comments get_bits: whitespace (mostly) cosmetics swscale: add rgb565 endianess conversion get_bits: remove unnecessary #includes mp3dec: hack: fix decoding with safe bitstream reader fate: fix eatqi test adpcm: Check for channels to be a non-zero integer swscale: fix overflows in RGB rounding constants. get_bits: introduce safe bitreading to prevent overreads. Conflicts: libswscale/swscale.c libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * adpcm: Check for channels to be a non-zero integerShitiz Garg2011-12-17
| | | | | | | | | | | | | | channels would be 0 sometimes and would cause floating point exception Fixes bugzilla #124 Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | adpcm: fix division by zero in fate/creative/intro-partial.wav with -s 2 and ↵Michael Niedermayer2011-12-10
| | | | | | | | | | | | | | -r 0.001:1 Bug-Found-by: Shitiz Garg Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aac_latm: reconfigure decoder on audio specific config changes latmdec: fix audio specific config parsing Add avcodec_decode_audio4(). avcodec: change number of plane pointers from 4 to 8 at next major bump. Update developers documentation with coding conventions. svq1dec: avoid undefined get_bits(0) call ARM: h264dsp_neon cosmetics ARM: make some NEON macros reusable Do not memcpy raw video frames when using null muxer fate: update asf seektest vp8: flush buffers on size changes. doc: improve general documentation for MacOSX asf: use packet dts as approximation of pts asf: do not call av_read_frame rtsp: Initialize the media_type_mask in the rtp guessing demuxer Cleaned up alacenc.c Conflicts: doc/APIchanges doc/developer.texi libavcodec/8svx.c libavcodec/aacdec.c libavcodec/ac3dec.c libavcodec/avcodec.h libavcodec/nellymoserdec.c libavcodec/tta.c libavcodec/utils.c libavcodec/version.h libavcodec/wmadec.c libavformat/asfdec.c tests/ref/seek/lavf_asf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add avcodec_decode_audio4().Justin Ruggles2011-12-02
| | | | | | | | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * adpcm: use sign_extend()Mans Rullgard2011-10-24
| | | | | | | | | | | | This avoids warnings from the overflow checker and simplifies the code. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: prores: get correct size for coded V plane if alpha is present prores: do not set pixel format on codec init pthread: prevent updating AVCodecContext from itself in frame_thread_free pthread: copy coded frame dimensions in update_context_from_thread vp8: prevent read from uninitialized memory in decode_mvs vp8: force reallocation in update_thread_context after frame size change vp8: fix return value if update_dimensions fails matroskadec: fix out of bounds write adpcmdec: calculate actual number of output samples for each decoder. adpcmdec: check remaining buffer size before decoding next block in the ADPCM IMA WAV decoder. adpcmdec: do not terminate early in ADPCM IMA Duck DK3 decoder. adpcmdec: remove unneeded buf_size==0 check. adpcmdec: remove unneeded zeroing of *data_size dnxhdenc: fixed signed multiplication overflow Conflicts: tests/ref/fate/prores-alpha tests/ref/fate/truemotion1-24 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * adpcmdec: calculate actual number of output samples for each decoder.Justin Ruggles2011-10-14
| | | | | | | | | | This also allows for removing some of the buf_size checks and using the sample count for some of the decoding loops.
| * adpcmdec: check remaining buffer size before decoding next block in theJustin Ruggles2011-10-14
| | | | | | | | ADPCM IMA WAV decoder.
| * adpcmdec: do not terminate early in ADPCM IMA Duck DK3 decoder.Justin Ruggles2011-10-14
| | | | | | | | | | There are still 2 nibbles to decode once the last byte in the packet has been read. Updated FATE reference.
| * adpcmdec: remove unneeded buf_size==0 check.Justin Ruggles2011-10-14
| | | | | | | | This is already done by avcodec_decode_audio3()
| * adpcmdec: remove unneeded zeroing of *data_sizeJustin Ruggles2011-10-14
| |
| * adpcm: fix out of bound reads due to integer overflowLaurent Aimar2011-10-10
| | | | | | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (34 commits) dpcm: return error if packet is too small dpcm: use smaller data types for static tables dpcm: use sol_table_16 directly instead of through the DPCMContext. dpcm: replace short with int16_t dpcm: check to make sure channels is 1 or 2. dpcm: misc pretty-printing dpcm: remove unnecessary variable by using bytestream functions. dpcm: move codec-specific variable declarations to their corresponding decoding blocks. dpcm: consistently use the variable name 'n' for the next input byte. dpcm: output AV_SAMPLE_FMT_U8 for Sol DPCM subcodecs 1 and 2. dpcm: calculate and check actual output data size prior to decoding. dpcm: factor out the stereo flag calculation dpcm: cosmetics: rename channel_number to ch avserver: Fix a bug where the socket is IPv4, but IPv6 is autoselected for the loopback address. lavf: Avoid using av_malloc(0) in av_dump_format dxva2_h264: pass the correct 8x8 scaling lists dca: NEON optimised high freq VQ decoding avcodec: reject audio packets with NULL data and non-zero size dxva: Add ability to enable workaround for older ATI cards latmenc: Set latmBufferFullness to largest value to indicate it is not used ... Conflicts: libavcodec/dxva2_h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * adpcm: move codec-specific variable declarations to the sections for the ↵Justin Ruggles2011-09-29
| | | | | | | | corresponding codecs.
| * adpcm: check buffer size in Funcom ISS decoder before reading header.Justin Ruggles2011-09-29
| | | | | | | | | | Also use the post-header data size to control termination of the main decoding loop.
| * adpcm: simplify reading of Funcom ISS frame header.Justin Ruggles2011-09-29
| |
| * adpcm: check buffer size in IMA DK4 decoder before reading header.Justin Ruggles2011-09-29
| | | | | | | | | | Also use the post-header data size to control termination of the main decoding loop.
| * adpcm: simplify reading of IMA DK4 frame header.Justin Ruggles2011-09-29
| |
| * adpcm_ms: clean up reading of predictor coefficientsJustin Ruggles2011-09-29
| |
| * adpcm_4xm: process planar packets sequentially rather than simultaneously.Justin Ruggles2011-09-29
| | | | | | | | Also properly clip the right channel step_index.
| * adpcm_ima_wav: process channel-interleaved blocks sequentially rather than ↵Justin Ruggles2011-09-29
| | | | | | | | | | | | simultaneously. Speeds up the ADPCM IMA WAV decoder by 15-20% overall.
| * adpcm: update reference linksJustin Ruggles2011-09-29
| | | | | | | | | | | | | | | | Add Multimedia Wiki link. Mark dead links with [dead]. Some can still be accessed through archive.org. Update URLs for pages which have moved. Replace duplicated links in adpcmenc.c with a note to see the ADPCM decoder reference documents.
| * adpcm: simplify packet size bounds checking in the ADPCM IMA QT decoder.Justin Ruggles2011-09-29
| | | | | | | | | | This is easier to understand. It also avoids returning existing samples mixed with new samples when the packet is too small.
| * adpcm: simplify and speed up several ADPCM decoders.Justin Ruggles2011-09-29
| |
| * adpcm: pretty-print tablesJustin Ruggles2011-09-29
| |
* | Fix out of bound reads due to integer overflow in the ADPCM IMA Electronic ↵Laurent Aimar2011-10-01
| | | | | | | | | | | | Arts EACS decoder. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: flvdec: Fix invalid pointer deferences when parsing index configure: disable hardware capabilities ELF section with suncc on Solaris x86 Use explicit struct initializers for AVCodec declarations. Use explicit struct initializers for AVOutputFormat/AVInputFormat declarations. adpcmenc: Set bits_per_coded_sample adpcmenc: fix QT IMA ADPCM encoder adpcmdec: Fix QT IMA ADPCM decoder permit decoding of multichannel ADPCM_EA_XAS Fix input buffer size check in adpcm_ea decoder. fft: avoid a signed overflow mpegps: Handle buffer exhaustion when reading packets. Conflicts: libavcodec/adpcm.c libavcodec/adpcmenc.c libavdevice/alsa-audio-enc.c libavformat/flvdec.c libavformat/mpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Use explicit struct initializers for AVCodec declarations.Diego Biurrun2011-09-24
| |
| * adpcmdec: Fix QT IMA ADPCM decoderBaptiste Coudurier2011-09-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
| * permit decoding of multichannel ADPCM_EA_XASPeter Ross2011-09-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
| * Fix input buffer size check in adpcm_ea decoder.Reimar Döffinger2011-09-23
| | | | | | | | | | | | | | | | | | | | Unfortunately the output buffer size check assumes that the input buffer is never over-consumed, thus this actually also allowed to write outside the output buffer if "lucky". Based on: git.videolan.org/ffmpeg.git commit 701d0eb185192542c4a17f296e39e37cedf7abc6
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: adpcm: split ADPCM encoders and decoders into separate files. doc/avconv: fix typo. rv34: check that subsequent slices have the same type as first one. smacker demuxer: handle possible av_realloc() failure. lavfi: add split filter from soc. lavfi: add showinfo filter libxavs: add private options corresponding to deprecated global options Conflicts: Changelog libavcodec/adpcm.c libavfilter/avfilter.h libavfilter/vf_showinfo.c libavfilter/vf_split.c libavformat/smacker.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * adpcm: split ADPCM encoders and decoders into separate files.Justin Ruggles2011-09-12
| | | | | | | | Move shared tables to a separate file as well.
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Remove final semicolon from some macrosMans Rullgard2011-02-10
| | | | | | | | | | | | This avoids double semicolons after macro expansion. 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>
* | Set bits_per_coded_sample when encoding ADPCM.Carl Eugen Hoyos2011-08-03
| |
* | adpcmenc:Optimize adpcm_ima_qt_compress_sample()Michael Niedermayer2011-05-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | adpcmenc: fix QT IMA ADPCM encoderBaptiste Coudurier2011-05-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | adpcmdec: Fix QT IMA ADPCM decoderBaptiste Coudurier2011-05-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | permit decoding of multichannel ADPCM_EA_XASPeter Ross2011-04-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix input buffer size check in adpcm_ea decoder.Reimar Döffinger2011-04-10
| | | | | | | | | | | | Unfortunately the output buffer size check assumes that the input buffer is never over-consumed, thus this actually also allowed to write outside the output buffer if "lucky".
* | Remove final semicolon from some macrosMans Rullgard2011-02-11
| | | | | | | | | | | | | | This avoids double semicolons after macro expansion. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit 44adbebe1744c68d66d7f811c38270fdcc89665a)