Commit Graph

218 Commits

Author SHA1 Message Date
Michael Niedermayer c6282141cb avcodec/ra144: Fix integer overflow in add_wav()
Fixes: signed integer overflow: -2144033225 + -5208934 cannot be represented in type 'int'
Fixes: 10633/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-5679133791617024

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-18 02:28:54 +02:00
Michael Niedermayer 93a203662f avcodec/ra144: Fix undefined integer overflow in add_wav()
Fixes: signed integer overflow: -26884 * 91439 cannot be represented in type 'int'
Fixes: 9687/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-4995588121690112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-03 00:01:32 +02:00
Michael Niedermayer b31189881a avcodec/ra144: Fix integer overflow in ff_eval_refl()
Fixes: signed integer overflow: -4096 * -524288 cannot be represented in type 'int'
Fixes: 8650/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RA_144_fuzzer-5734816036159488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-27 13:43:39 +02:00
Michael Niedermayer 71da0a5c97 avcodec/ra144: Fix runtime error: signed integer overflow: -2200 * 1033073 cannot be represented in type 'int'
Fixes: 2175/clusterfuzz-testcase-minimized-5809657849315328

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-11 00:47:29 +02:00
Michael Niedermayer 08cb69e870 avcodec/ra144: Fixes runtime error: signed integer overflow: 7160 * 327138 cannot be represented in type 'int'
Fixes: 1908/clusterfuzz-testcase-minimized-5392712477966336

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-31 16:08:46 +02:00
Michael Niedermayer 7c845450d2 avcodec/ra144: Fix runtime error: signed integer overflow: -2449 * 1398101 cannot be represented in type 'int'
Fixes: 1885/clusterfuzz-testcase-minimized-5336328549957632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-28 21:55:02 +02:00
Michael Niedermayer 4c472c5252 avcodec/ra144: Fix runtime error: signed integer overflow: 11184810 * 404 cannot be represented in type 'int'
Fixes: 1884/clusterfuzz-testcase-minimized-4637425835966464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-28 21:38:55 +02:00
Michael Niedermayer 78bf446852 avcodec/ra144: Fix runtime error: left shift of negative value -798
Fixes: 1388/clusterfuzz-testcase-minimized-6680800936329216

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-07 15:31:00 +02:00
Clément Bœsch 8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Paul B Mahol 6dfa70f272 Correct few "ffmpeg" typos
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2014-08-24 11:05:42 +00:00
Michael Niedermayer 99497b4683 Merge commit '9a9e2f1c8aa4539a261625145e5c1f46a8106ac2'
* commit '9a9e2f1c8aa4539a261625145e5c1f46a8106ac2':
  dsputil: Split audio operations off into a separate context

Conflicts:
	configure
	libavcodec/takdec.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil.asm
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c
	libavcodec/x86/dsputil_x86.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-22 17:58:28 +02:00
Christophe Gisquet c3390fd56c ra144: use scalarproduct_int16
The buffer holding the coefficients must be padded with 0 so as to use DSP
functions that may overread. Currently, the SSE2/3 versions is an example,
as they process batches of 16 bytes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-10 21:45:55 +01:00
Michael Niedermayer 04fa818779 Merge commit '088f38a4f9f54bb923405c67c9e72d96d90aa284'
* commit '088f38a4f9f54bb923405c67c9e72d96d90aa284':
  avcodec: Drop unnecessary ff_ name prefixes from static functions

Conflicts:
	libavcodec/ass.c
	libavcodec/h264_parser.c
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-01 18:16:32 +02:00
Diego Biurrun 088f38a4f9 avcodec: Drop unnecessary ff_ name prefixes from static functions 2013-04-30 16:02:02 +02:00
Michael Niedermayer 3220083c11 ra144: Try to fix int16/uint16 warnings from pgc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-17 21:31:11 +02:00
Michael Niedermayer e335658370 Merge commit '9734b8ba56d05e970c353dfd5baafa43fdb08024'
* commit '9734b8ba56d05e970c353dfd5baafa43fdb08024':
  Move avutil tables only used in libavcodec to libavcodec.

Conflicts:
	libavcodec/mathtables.c
	libavutil/intmath.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:26:46 +02:00
Diego Biurrun 9734b8ba56 Move avutil tables only used in libavcodec to libavcodec. 2012-10-11 18:29:36 +02:00
Michael Niedermayer 1e83e6ad7a ra144: fix code with ftrapv.
A better solution is welcome!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-09 06:02:34 +02:00
Michael Niedermayer 127b70e423 ra144: factor division out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-23 21:12:23 +02:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Mohamed Naufal Basheer 8aac5585fa Add a shift parameter to celp_lp_synthesis_filter()
This is intended for reuse by the G.723.1 decoder

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-07-22 07:58:53 +02:00
Michael Niedermayer 41f55277fa Merge remote-tracking branch 'qatar/master'
* qatar/master: (34 commits)
  h264: reset h->ref_count in case of errors in ff_h264_decode_ref_pic_list_reordering()
  error_resilience: fix the check for missing references in ff_er_frame_end() for H264
  4xm: prevent NULL dereference with invalid huffman table
  4xmdemux: prevent use of uninitialized memory
  4xm: clear FF_INPUT_BUFFER_PADDING_SIZE bytes in temporary buffers
  ptx: check for out of bound reads
  tiffdec: fix out of bound reads/writes
  eacmv: check for out of bound reads
  eacmv: fix potential pointer arithmetic overflows
  adpcm: fix out of bound reads due to integer overflow
  anm: prevent infinite loop
  avsdemux: check for out of bound writes
  avs: check for out of bound reads
  avsdemux: check for corrupted data
  AVOptions: refactor set_number/write_number
  AVOptions: cosmetics, rename static av_set_number2() to write_number().
  AVOptions: cosmetics, move and rename static av_set_number().
  AVOptions: split av_set_string3 into opt type-specific functions
  avidec: fix signed overflow in avi_sync()
  mxfdec: Fix some buffer overreads caused by the misuse of AVPacket related functions.
  ...

Conflicts:
	Changelog
	configure
	libavcodec/ptx.c
	libavcodec/ra144.c
	libavcodec/vaapi_vc1.c
	libavcodec/vc1.c
	libavcodec/version.h
	libavformat/4xm.c
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-11 03:42:43 +02:00
Justin Ruggles f10524d51c ra144: use macro constants to make the code more understandable. 2011-10-10 11:38:58 -04:00
Mohamed Naufal Basheer bcc67dffa0 Add a shift parameter to celp_lp_synthesis_filter for reuse by the G.723.1 decoder 2011-09-29 21:43:52 +02:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Diego Elio Pettenò be61983d52 Make ff_add_wav static to ra144.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 1a88674862)
2011-01-26 03:43:33 +01:00
Diego Elio Pettenò 1a88674862 Make ff_add_wav static to ra144.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:11:54 +01:00
Francesco Lavra 756e346798 Split do_output_subblock() into common code and decoder specific parts
Patch by Francesco Lavra (firstnamelastname@interfree.it)

Originally committed as revision 23576 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-11 08:05:17 +00:00
Francesco Lavra 5ec29beeb4 Cosmetics: indent
Patch by Francesco Lavra (firstnamelastname@interfree.it)

Originally committed as revision 23575 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-11 08:04:22 +00:00
Francesco Lavra 6ea6c8ebcf Add ff_ prefix to non-static functions
Patch by Francesco Lavra (firstnamelastname@interfree.it)

Originally committed as revision 23574 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-11 08:03:43 +00:00
Francesco Lavra 0acaf8b0f2 Split ra144.c in common code (to be shared with the future encoder) and
decoder.

Patch by Francesco Lavra (firstnamelastname@interfree.it)

Originally committed as revision 23573 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-11 08:01:51 +00:00
Stefano Sabatini 72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Måns Rullgård 94ca624fbc Move ff_sqrt() to libavutil/intmath.h
Originally committed as revision 22345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 21:19:56 +00:00
Francesco Lavra 7df8af6385 Fix reading beyond buffer end on RA144Context.lpc_tables.
Patch by Francesco Lavra (francescolavra -at- interfree -dot- it)

Originally committed as revision 21796 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-13 17:42:58 +00:00
Francesco Lavra 643bae382c Use correct context for av_log(), should prevent a crash for malformed files.
Patch by Francesco Lavra (francescolavra at interfree dot it).

Originally committed as revision 21031 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-05 16:25:41 +00:00
Stefano Sabatini 9106a698e7 Rename bitstream.h to get_bits.h.
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-13 16:20:26 +00:00
Thilo Borgmann 7a00bbad21 Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows
passing of packet-specific flags from demuxer to decoder, such as the keyframe
flag, which appears necessary to playback corePNG P-frames.

Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread
"Google Summer of Code participation" on the mailinglist.

Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-07 15:59:50 +00:00
Måns Rullgård 09096c9fad RA144: work around gcc bug/oddity on ARM
This should not make any difference, yet some gcc versions on ARM
produce incorrect output without this fix.

Approved by Vitor.

Originally committed as revision 17698 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-01 23:41:39 +00:00
Vitor Sessak 8d2544bd1b Reindent after last commit
Originally committed as revision 17678 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-01 11:16:57 +00:00
Vitor Sessak 9e27e0d4f8 Do not read uninitialized buffer, no matter if it will be multiplied by
zero later. This should fix some valgrind warnings and hopefully FATE
ra144 test on ARM.

Originally committed as revision 17677 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-03-01 11:14:21 +00:00
Kenan Gillet 4599d22c0c Split off celp_filters.[ch] from acelp_filters.[ch] for the QCELP decoder.
patch by Kenan Gillet, kenan.gillet gmail com

Originally committed as revision 15680 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-10-24 21:29:23 +00:00
Diego Biurrun 36b3e36e00 misc spelling/wording/grammar fixes
Originally committed as revision 15296 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-11 08:13:23 +00:00
Vitor Sessak 20242eed99 Normalize triplets in gain_val_tab[][] so gain_exp_tab[] can be just an
one-dimensional array.

Originally committed as revision 15273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 18:51:33 +00:00
Vitor Sessak 3e30f46f8b Pass directly variable 'a' to interp instead of evaluating it from num_blocks
Originally committed as revision 15269 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 18:18:29 +00:00
Vitor Sessak b28bdce688 Simplify if() in copy_and_dup()
Originally committed as revision 15268 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 18:16:00 +00:00
Vitor Sessak 8022a8ebc2 Add av_cold attribute to decode_init()
Originally committed as revision 15267 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 18:14:37 +00:00
Vitor Sessak c96a764c72 Cosmetics: Make the two additional units in size more clear
Originally committed as revision 15266 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-08 18:13:53 +00:00
Vitor Sessak 4fdb41a84b Test a var for overflow just after it is set
Originally committed as revision 15223 to svn://svn.ffmpeg.org/ffmpeg/trunk
2008-09-06 11:46:29 +00:00