1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
Andreas Rheinhardt
25c8507818 Remove/replace some unnecessary avcodec.h inclusions
Also remove other unnecessary headers and include headers directly while
at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:29:46 +02:00
Andreas Rheinhardt
e3023e9015 avcodec/g729postfilter.h: Include acelp_pitch_delay.h
Needed for PITCH_DELAY_MAX.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:02:46 +02:00
Michael Niedermayer
82d4c7b95e avcodec/g729postfilter: Clip gain before scaling with AGC_FAC1
The fixed point integer reference specifies the multiplication used
to have 16bit input and clips so we need to clip the input
The floating point implementation does not seem to do that.

Fixes: signed integer overflow: 6317568 * 410 cannot be represented in type 'int'
Fixes: 20492/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G729_fuzzer-5700189272932352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-11 00:45:09 +02:00
Michael Niedermayer
c0bd5fa43d avcodec/g729postfilter: Optimize out overflowing multiplication from apply_tilt_comp()
Fixes: signed integer overflow: -1114392282 * 2 cannot be represented in type 'int'
Fixes: 19236/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G729_fuzzer-5741678938030080

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-11 23:31:18 +01:00
Michael Niedermayer
5f0acc5064 avcodec/g729postfilter: Fix left shift of negative value
Fixes: Ticket8176

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-19 18:20:44 +02:00
Michael Niedermayer
0c61661a2c avcodec/g729postfilter: Fix undefined intermediate pointers
Fixes: index -49 out of bounds for type 'int16_t [192]'
Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-16 19:17:57 +02:00
Michael Niedermayer
6a4fdbf112 avcodec/g729postfilter: Fix undefined shifts
Fixes: left shift of negative value -12
Fixes: 17689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ACELP_KELVIN_fuzzer-5756275014500352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-16 19:17:57 +02:00
Michael Niedermayer
6e3244fb09 avcodec/g729postfilter: Avoid function calls in FFMAX() arguments
This avoid double calling functions

Found-by: Muhammad Faiz <mfcc64@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 15:44:46 +01: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
Michael Niedermayer
1fc28cf164 avcodec/g729postfilter: avoid potential negative shift
Fixes CID1194402

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27 23:12:42 +02:00
Michael Niedermayer
bf807a5e87 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  sbrdsp.asm: convert all instructions to float/SSE ones.
  dv: cosmetics.
  dv: check buffer size before reading profile.
  Revert "AAC SBR: group some writes."
  udp: Print an error message if bind fails
  cook: extend channel uncoupling tables so the full bit range is covered.
  roqvideo: cosmetics.
  roqvideo: convert to bytestream2 API.
  dca: don't use av_clip_uintp2().
  wmall: fix build with -DDEBUG enabled.
  smc: port to bytestream2 API.
  AAC SBR: group some writes.
  dsputil: remove shift parameter from scalarproduct_int16
  SBR DSP: unroll sum_square
  rv34: remove dead code in intra availability check
  rv34: clean a bit availability checks.
  v4l2: update documentation
  tgq: convert to bytestream2 API.
  parser: remove forward declaration of MpegEncContext
  dca: prevent accessing static arrays with invalid indexes.
  ...

Conflicts:
	doc/indevs.texi
	libavcodec/Makefile
	libavcodec/dca.c
	libavcodec/dvdata.c
	libavcodec/eatgq.c
	libavcodec/mmvideo.c
	libavcodec/roqvideodec.c
	libavcodec/smc.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-08 02:51:45 +01:00
Michael Niedermayer
fe70c1f45f g729dec: prevent out of array access
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-01 06:07:05 +02: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
Vitor Sessak
58c61492c6 g729dec: fix warnings:
libavcodec/g729postfilter.c: In function ‘long_term_filter’:
libavcodec/g729postfilter.c:114: warning: unused variable ‘n’

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 21:17:22 +02:00
Vitor Sessak
82d99e0b41 g729dec: Fix warnings:
libavcodec/g729dec.c: In function ‘decode_frame’:
libavcodec/g729dec.c:662: warning: passing argument 3 of ‘ff_g729_postfilter’ from incompatible pointer type
libavcodec/g729postfilter.h:96: note: expected ‘int16_t *’ but argument is of type ‘int *’

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 21:16:55 +02:00
Vitor Sessak
1c4712db81 g729dec: Add ff_ prefix to g729_postfilter() and g729_adaptive_gain_control()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-09-25 21:13:19 +02:00
Vladimir Voroshilov
682337672c Adaptive gain control 2011-09-24 21:11:01 +02:00
Vladimir Voroshilov
aca516cd67 G.729 postfilter 2011-09-24 21:11:01 +02:00