1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-11 03:45:05 +02:00
Commit Graph

251 Commits

Author SHA1 Message Date
Clément Bœsch
8df1dbd798 Merge commit '5afb94c817abffad030c6b94d7003dca8aace3d5'
* commit '5afb94c817abffad030c6b94d7003dca8aace3d5':
  Mark read-only tables as static

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 22:09:35 +02:00
Diego Biurrun
5afb94c817 Mark read-only tables as static 2016-05-05 10:48:34 +02:00
Derek Buitenhuis
a5a6621616 Merge commit 'f4d581cda3897f66c1dda7586b93f86a591dbbef'
* commit 'f4d581cda3897f66c1dda7586b93f86a591dbbef':
  lavc: Deduplicate zigzag_scan table

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-24 11:47:39 +01:00
Diego Biurrun
f4d581cda3 lavc: Deduplicate zigzag_scan table 2016-03-25 15:23:56 +01:00
Ganesh Ajjanagadde
2cbaa078d1 avcodec: use HAVE_THREADS header guards to silence -Wunused-function
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-04 12:47:34 -04:00
Michael Niedermayer
dabea74d0e avcodec/vp8: Do not use num_coeff_partitions in thread/buffer setup
The variable is not a constant and can lead to race conditions

Fixes: repro.webm (not reproducable with FFmpeg alone)

Found-by: Dale Curtis <dalecurtis@google.com>
Tested-by: Dale Curtis <dalecurtis@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-01 00:58:46 +02:00
Hendrik Leppkes
983fa5a1a9 Merge commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b'
* commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b':
  vp7: bound checking in vp7_decode_frame_header

Only partially merged, see 46f72ea507

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-08-18 09:14:08 +02:00
Federico Tomassetti
7bf9647264 vp7: bound checking in vp7_decode_frame_header
CC: libav-stable@libav.org
2015-08-16 19:02:16 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
599d746e07 avcodec/vp8: Check buffer size in vp8_decode_frame_header()
avoids null pointer dereference
Fixes: signal_sigsegv_d5de40_964_vp80-00-comprehensive-010.ivf with memlimit of 1048576

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 19:37:04 +02:00
Michael Niedermayer
a84f0e8d8f avcodec/vp8: Fix null pointer dereference in ff_vp8_decode_free()
Fixes: signal_sigsegv_d5de23_967_vp80_00_comprehensive_010.ivf with memlimit 524288

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-18 19:03:23 +02:00
Andreas Cadhalpun
6fdbaa2b7f vp8: change mv_{min,max}.{x,y} type to int
If one of the dimensions is larger than 8176, s->mb_width or
s->mb_height is larger than 511, leading to an int16_t overflow of
s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax.

Changing the type to int avoids the overflow and has no negative
effect, because s->mv_max is only used in clamp_mv for clipping.
Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't
increase the absolute value. The input to av_clip is an int16_t, and
thus the output fits into int16_t as well.

For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range
before use.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-08 23:29:14 +02:00
Michael Niedermayer
0a6b410edf avcodec/vp8: Suppress empty body warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-06 16:03:56 +02:00
Christophe Gisquet
3814f92fd7 lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
The later may yield incorrect code for on-stack variables.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 20:36:43 +01:00
Michael Niedermayer
9b2a964cee avcodec/vp8: Fix undefined shifts in vp8_mc_luma()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 16:55:07 +01:00
Clément Bœsch
4d028bf202 avcodec/vp8: remove double ;; 2015-01-18 00:34:19 +01:00
Michael Niedermayer
9fb5a91c66 Merge commit '014b6b416fec89777cb9cff61bcf7896eaf7cf39'
* commit '014b6b416fec89777cb9cff61bcf7896eaf7cf39':
  vp8: improve memory allocation checks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-15 13:10:48 +01:00
Vittorio Giovara
014b6b416f vp8: improve memory allocation checks
Check memory earlier, check one more allocation and clean up on error.

CC: libav-stable@libav.org
Bug-Id: CID 1257773
2015-01-15 01:25:07 +01:00
Michael Niedermayer
cdbebae444 Merge commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa'
* commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa':
  lavc: fix bitshifts amount bigger than the type

Conflicts:
	libavcodec/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-18 03:16:38 +01:00
Vittorio Giovara
85dc006b1a lavc: fix bitshifts amount bigger than the type
CC: libav-stable@libav.org
Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
2014-11-18 00:39:23 +01:00
Michael Niedermayer
29234f5681 vp7: fix checking vp7_feature_value_size()
CC: libav-stable@libav.org
Bug-Id: CID 1197061
2014-11-13 01:41:25 +01:00
Michael Niedermayer
3bc86462a2 Merge commit '65875a8b3b079752da25a61ec188d2e3d90a569f'
* commit '65875a8b3b079752da25a61ec188d2e3d90a569f':
  vp8: initialize color space and range properties

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-09 02:36:58 +02:00
Vittorio Giovara
65875a8b3b vp8: initialize color space and range properties 2014-10-08 18:17:50 +01:00
Michael Niedermayer
fb33bff990 Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'
* commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39':
  cosmetics: Write NULL pointer equality checks more compactly

Conflicts:
	cmdutils.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/dvbsub.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/dxa.c
	libavcodec/libxvid_rc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/rv10.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/vc1dec.c
	libavcodec/zmbv.c
	libavdevice/v4l2.c
	libavformat/matroskadec.c
	libavformat/movenc.c
	libavformat/sdp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-15 21:00:50 +02:00
Gabriel Dume
f929ab0569 cosmetics: Write NULL pointer equality checks more compactly
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
Michael Niedermayer
8d0c7031a8 Merge commit '79793f833784121d574454af4871866576c0749d'
* commit '79793f833784121d574454af4871866576c0749d':
  Update Fiona's name in copyright statements.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-01 15:43:40 +02:00
Diego Biurrun
79793f8337 Update Fiona's name in copyright statements. 2014-07-01 03:26:51 -07:00
Michael Niedermayer
8c22bea574 avcodec/vp8: Fix multiple ff_thread_finish_setup() calls
Fixes Ticket3725

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-27 22:45:43 +02:00
Michael Niedermayer
c89be82c98 avcodec/vp8: fix () in macros
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 03:13:37 +02:00
Matt Oliver
cef99e12bc Use rac_get_prob branchy version when used within a conditional branch.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-13 16:04:08 +02:00
Carl Eugen Hoyos
836b60ce2b Fix standalone compilation of vp7 and vp8 decoder.
Fixes ticket #3536.
2014-04-07 15:30:48 +02:00
Michael Niedermayer
28f8114bd2 avcodec/vp8: fix checking vp7_feature_value_size
Fixes CID1197061

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-06 18:10:47 +02:00
Michael Niedermayer
26e70fd5ba avcodec/vp8: fix name of copy_luma()
This function was introduced by ac4b32df71

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 21:33:53 +02:00
Michael Niedermayer
fb61ed1e9f Merge commit 'ac4b32df71bd932838043a4838b86d11e169707f'
* commit 'ac4b32df71bd932838043a4838b86d11e169707f':
  On2 VP7 decoder

Conflicts:
	Changelog
	libavcodec/arm/h264pred_init_arm.c
	libavcodec/arm/vp8dsp.h
	libavcodec/arm/vp8dsp_init_arm.c
	libavcodec/arm/vp8dsp_init_armv6.c
	libavcodec/arm/vp8dsp_init_neon.c
	libavcodec/avcodec.h
	libavcodec/h264pred.c
	libavcodec/version.h
	libavcodec/vp8.c
	libavcodec/vp8.h
	libavcodec/vp8data.h
	libavcodec/vp8dsp.c
	libavcodec/vp8dsp.h
	libavcodec/x86/h264_intrapred_init.c
	libavcodec/x86/vp8dsp_init.c

See: 89f2f5dbd7 and others
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 14:46:10 +02:00
Peter Ross
ac4b32df71 On2 VP7 decoder
Further performance improvements and security fixes by
Vittorio Giovara, Luca Barbato and Diego Biurrun.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-04-04 04:00:11 +02:00
Michael Niedermayer
ae3313e154 Merge commit '53c20f17c78d1d8a0fc2505868f201e69ff59cc5'
* commit '53c20f17c78d1d8a0fc2505868f201e69ff59cc5':
  vp8: K&R formatting cosmetics

Conflicts:
	libavcodec/vp8.c
	libavcodec/vp8.h
	libavcodec/vp8data.h
	libavcodec/vp8dsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-30 01:55:31 +01:00
Vittorio Giovara
53c20f17c7 vp8: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-03-29 16:11:09 +01:00
Michael Niedermayer
46f72ea507 avcodec/vp7: check buffer size
Fixes overread
Fixes Ticket 3501
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-29 04:27:00 +01:00
Michael Niedermayer
57e939d963 avcodec/vp7: Fix null pointer dereference in vp7_decode_frame_header()
This simply copies the "interframe without a prior keyframe" check
thats done later into vp7_decode_frame_header()

Found-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 05:02:18 +01:00
Peter Ross
89f2f5dbd7 On2 VP7 decoder
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: BBB
previous patch reviewed by jason
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-25 13:29:05 +01:00
Peter Ross
7d4c0220f1 avcodec/vp8: vp8_find_free_buffer
Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-25 13:11:38 +01:00
Peter Ross
b8664c9294 avcodec/vp8dsp: add VP7 idct and loop filter
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-15 02:15:35 +01:00
Michael Niedermayer
9a082fec1a Merge commit 'e46ad30a808744ddf3855567e162292a4eaabac7'
* commit 'e46ad30a808744ddf3855567e162292a4eaabac7':
  vp8: use a fixed-size edge emu buffer

Conflicts:
	libavcodec/vp8.c
	libavcodec/vp8.h

See: face578d56
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 16:14:30 +01:00
Anton Khirnov
e46ad30a80 vp8: use a fixed-size edge emu buffer
The reason is the same as for e588615d93

Based on a patch by Ronald S. Bultje <rsbultje@gmail.com>
2014-02-04 11:21:07 +01:00
Peter Ross
f29cdbe1b5 vp8: remove redundant "equals 1" test
mb_layout is either zero or non-zero.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-19 22:26:43 +01:00
Michael Niedermayer
7904dfed73 Merge commit 'ef8c93e2f18c624d0c266687e43ab99af7921dd3'
* commit 'ef8c93e2f18c624d0c266687e43ab99af7921dd3':
  vp8: drop support for real (non-emulated) edges

Conflicts:
	tests/fate/vpx.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 14:32:09 +01:00
Anton Khirnov
ef8c93e2f1 vp8: drop support for real (non-emulated) edges
They are not measurably faster on x86, they might be somewhat faster on
other platforms due to missing emu edge SIMD, but the gain is not large
enough to justify the added complexity.
2014-01-09 09:41:24 +01:00
Michael Niedermayer
91e00c4a78 Merge commit '458446acfa1441d283dacf9e6e545beb083b8bb0'
* commit '458446acfa1441d283dacf9e6e545beb083b8bb0':
  lavc: Edge emulation with dst/src linesize

Conflicts:
	libavcodec/cavs.c
	libavcodec/h264.c
	libavcodec/hevc.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/rv34.c
	libavcodec/svq3.c
	libavcodec/vc1dec.c
	libavcodec/videodsp.h
	libavcodec/videodsp_template.c
	libavcodec/vp3.c
	libavcodec/vp8.c
	libavcodec/wmv2.c
	libavcodec/x86/videodsp.asm
	libavcodec/x86/videodsp_init.c

Changes to the asm are not merged, they are left for volunteers or
in their absence for later.
The changes this merge introduces are reordering of the function
arguments

See: face578d56
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-15 15:07:10 +01:00
Ronald S. Bultje
458446acfa lavc: Edge emulation with dst/src linesize
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
2013-11-15 10:16:27 +01:00