summaryrefslogtreecommitdiffstats
path: root/libavcodec/vmdav.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-251-42/+79
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ppc: fix some pointer to integer casts ppc: fix 32-bit PIC build vmdaudio: fix decoding of 16-bit audio format. lavf: do not set codec_tag for rawvideo h264: check for out of bounds reads in ff_h264_decode_extradata(). flvdec: Check for overflow before allocating arrays avconv: use correct output stream index when checking max_frames avconv: remove fake coded_frame on streamcopy hack Conflicts: avconv.c libavcodec/h264.c libavcodec/ppc/asm.S libavcodec/vmdav.c libavformat/flvdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vmdaudio: fix decoding of 16-bit audio format.Justin Ruggles2011-09-251-40/+80
| | | | | | | | | | | | The initial sample of each block is raw 16-bit PCM, not DPCM. Fixes decoding of all samples in: http://streams.videolan.org/samples/game-formats/sierra-vmd/Lighthouse/
* | Fix potential pointer arithmetic overflows in rle_unpack() of vmd video decoder.Laurent Aimar2011-09-251-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix out of bound reads in rle_unpack() of vmd video decoder.Laurent Aimar2011-09-251-8/+15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Check for out of bound reads in vmd_decode() of vmd video decoder.Laurent Aimar2011-09-251-4/+19
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix potential pointer arithmetic overflows in lz_unpack of vmd video decoder.Laurent Aimar2011-09-251-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Prevent out of bound read in lz_unpack in vmd video decoder.Laurent Aimar2011-09-251-6/+18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Prevent NULL dereferences when the previous frame is missing in vmd video ↵Laurent Aimar2011-09-241-4/+5
| | | | | | | | | | | | decoder. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Check for invalid update parameters in vmd video decoder.Laurent Aimar2011-09-241-0/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Fix potential overread in vmd audio decoder.Laurent Aimar2011-09-241-1/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-301-17/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-291-17/+14
| | | | | | | | It's more readable and less prone to breakage.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-211-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (28 commits) Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample(). x86: cabac: fix register constraints for 32-bit mode cabac: move x86 asm to libavcodec/x86/cabac.h x86: h264: cast pointers to intptr_t rather than int x86: h264: remove hardcoded edi in decode_significance_8x8_x86() x86: h264: remove hardcoded esi in decode_significance[_8x8]_x86() x86: h264: remove hardcoded edx in decode_significance[_8x8]_x86() x86: h264: remove hardcoded eax in decode_significance[_8x8]_x86() x86: cabac: change 'a' constraint to 'r' in get_cabac_inline() x86: cabac: remove hardcoded esi in get_cabac_inline() x86: cabac: remove hardcoded edx in get_cabac_inline() x86: cabac: remove unused macro parameter x86: cabac: remove hardcoded ebx in inline asm x86: cabac: remove hardcoded struct offsets from inline asm cabac: remove inline asm under #if 0 cabac: remove BRANCHLESS_CABAC_DECODER switch cabac: remove #if 0 cascade under never-set #ifdef ARCH_X86_DISABLED document libswscale bump error_resilience: skip last-MV predictor step if MVs are not available. error_resilience: actually add counter when adding a MV predictor. ... Conflicts: Changelog libavcodec/error_resilience.c libavfilter/defaults.c libavfilter/vf_drawtext.c libswscale/swscale.h tests/ref/vsynth1/error tests/ref/vsynth2/error Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().Justin Ruggles2011-06-201-1/+1
| | | | | | | | av_get_bits_per_sample_fmt() is deprecated.
| * Remove unused variablesMans Rullgard2011-06-021-2/+0
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.Justin Ruggles2011-02-231-8/+7
| | | | | | | | | | | | There is no need to expand to 16-bits. Just use memcpy() to copy the raw data. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: remove unnecessary fields from VmdAudioContext and use the ↵Justin Ruggles2011-02-231-12/+8
| | | | | | | | | | | | corresponding AVCodecContext fields instead. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded ↵Justin Ruggles2011-02-231-3/+5
| | | | | | | | | | | | sample size. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, ↵Justin Ruggles2011-02-231-12/+12
| | | | | | | | | | | | | | | | then making a single call to vmdaudio_loadsound(). This also adds output buffer size checks for AUDIO and SILENCE block types. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * cosmetics: reindent after previous commitJustin Ruggles2011-02-231-8/+8
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: move all silence chunk handling to vmdaudio_loadsound().Justin Ruggles2011-02-231-14/+9
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * cosmetics: remove debugging cruftJustin Ruggles2011-02-231-3/+0
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * cosmetics: reindent after previous commitJustin Ruggles2011-02-231-11/+11
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: simplify buffer pointer and header size handling.Justin Ruggles2011-02-231-9/+10
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: set *data_size to zero when skipping small packets and add a ↵Justin Ruggles2011-02-231-1/+4
| | | | | | | | | | | | warning log message. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: validate block typeJustin Ruggles2011-02-231-0/+4
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: use macros and a local variable for block type.Justin Ruggles2011-02-231-3/+10
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: correct the silent chunk count in the first block.Justin Ruggles2011-02-231-5/+1
| | | | | | | | | | | | | | This fixes A/V sync with several samples, notably: http://samples.mplayerhq.hu/game-formats/sierra-vmd/swat_*.vmd Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: output audio samples for standalone silent blocks.Justin Ruggles2011-02-231-1/+1
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: remove duplicated code by merging mono and stereo decoding.Justin Ruggles2011-02-231-22/+1
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * vmdaudio: fix raw_block_size calculation.Justin Ruggles2011-02-231-1/+2
| | | | | | | | | | | | The size should depend on the output sample size, not the internal bit depth. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-261-2/+2
| | | | | | | | | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Fix various unused variable warningsClément Bœsch2011-05-301-2/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: set defaults in internal codec framesStefano Sabatini2011-05-071-0/+3
| | | | | | | | | | | | | | | | | | 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.
* | vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.Justin Ruggles2011-02-261-8/+7
| | | | | | | | | | | | | | There is no need to expand to 16-bits. Just use memcpy() to copy the raw data. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 1108f8998c6536bb44d6ecbe5adfa18e0c1478e8)
* | vmdaudio: remove unnecessary fields from VmdAudioContext and use the ↵Justin Ruggles2011-02-261-12/+8
| | | | | | | | | | | | | | corresponding AVCodecContext fields instead. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 2ec7862db8b782020cc220dae827c3438d108b3a)
* | vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded ↵Justin Ruggles2011-02-261-3/+5
| | | | | | | | | | | | | | sample size. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 1e86d685e0935077766c645e49b8533d41ca11cb)
* | vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, ↵Justin Ruggles2011-02-261-12/+12
| | | | | | | | | | | | | | | | | | then making a single call to vmdaudio_loadsound(). This also adds output buffer size checks for AUDIO and SILENCE block types. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 1574eff3d23ad799d25454a449b01f94795495ea)
* | cosmetics: reindent after previous commitJustin Ruggles2011-02-261-8/+8
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit ba9516cca845f8d3fb7ac08ef53a996c3ee0dbf5)
* | vmdaudio: move all silence chunk handling to vmdaudio_loadsound().Justin Ruggles2011-02-261-14/+9
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 762b386e4aafc7bbdbec367bc652cf1199e81f51)
* | cosmetics: remove debugging cruftJustin Ruggles2011-02-261-3/+0
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 8e9027d266ef39ab9f88b4bbad5cf9e425d0696c)
* | cosmetics: reindent after previous commitJustin Ruggles2011-02-261-11/+11
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 868f2f4d90e07edd9a65bd9b917bb5940643ec75)
* | vmdaudio: simplify buffer pointer and header size handling.Justin Ruggles2011-02-261-9/+10
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 2d213695fce86e740800ddcf43d8d0864d2ecea5)
* | vmdaudio: set *data_size to zero when skipping small packets and add a ↵Justin Ruggles2011-02-261-1/+4
| | | | | | | | | | | | | | warning log message. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 7a4fb3fd9357dfdd27431a0a8d7250dab54a9938)
* | vmdaudio: validate block typeJustin Ruggles2011-02-261-0/+4
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 22f893e1c9f9387f0a021f775757130fa48e0180)
* | vmdaudio: use macros and a local variable for block type.Justin Ruggles2011-02-261-3/+10
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit dd1af5136fe7767f2f18ac943efe994946864640)
* | vmdaudio: correct the silent chunk count in the first block.Justin Ruggles2011-02-261-5/+1
| | | | | | | | | | | | | | | | This fixes A/V sync with several samples, notably: http://samples.mplayerhq.hu/game-formats/sierra-vmd/swat_*.vmd Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 6989cb2dae85ea455ffcc8a36a763134fb311e29)
* | vmdaudio: output audio samples for standalone silent blocks.Justin Ruggles2011-02-261-1/+1
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 9b73f786005f31429d7c88092edfeef6696a5f69)
* | vmdaudio: remove duplicated code by merging mono and stereo decoding.Justin Ruggles2011-02-261-22/+1
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 1328d433137c055df06f99772b243ceec2bbf36e)
OpenPOWER on IntegriCloud