1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

31446 Commits

Author SHA1 Message Date
Michael Niedermayer
0a4808741e avcodec/h264dsp_template: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-15 17:30:10 +01:00
Michael Niedermayer
e3f5b6f16d avcodec/ac3: Fix undefined shift in ff_ac3_bit_alloc_calc_mask()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-15 11:21:50 +01:00
Michael Niedermayer
94ccbad488 avcodec/ac3dec: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-15 04:30:41 +01:00
Michael Niedermayer
3b63819dfb avcodec/vc1: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-15 02:57:24 +01:00
Michael Niedermayer
b8535b273f Revert "ppc: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED"
This broke build, note, LOCAL_ALIGNED_16() does not work either

Found-by: James Almer <jamrial@gmail.com>
This reverts commit 98cccdd91c.
2015-03-15 02:02:21 +01:00
Michael Niedermayer
a994fc39b3 avcodec/utils: mark codec argument as const in ff_lock_avcodec()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 23:33:31 +01: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
Christophe Gisquet
238db7cc56 x86: 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:06:47 +01:00
Christophe Gisquet
98cccdd91c ppc: 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 19:07:27 +01:00
Michael Niedermayer
a48b24e5eb avcodec/wmadec: Fix undefined shift in wma_decode_block()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 17:32:12 +01:00
Christophe Gisquet
73ebbfdff0 ac3dec: cosmetics
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 15:25:42 +01:00
Christophe Gisquet
0c3339f4bd eac3dec: fix scaling
This is the remaining error, the output on the SPX samples,
respectively csi_miami_stereo_128_spx.eac3 and
csi_miami_5.1_256_spx.eac3, goes from:
stddev:    8.71 PSNR: 77.52 MAXDIFF:  235
stddev:24270.51 PSNR: 22.17 MAXDIFF:47166
to:
stddev:    0.12 PSNR:114.12 MAXDIFF:    1
stddev:    0.12 PSNR:114.73 MAXDIFF:    1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 14:05:25 +01:00
Christophe Gisquet
c4bf3833f4 ac3_fixed: fix computation of spx_noise_blend
It was set to 1 instead of sqrt(3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 14:05:22 +01:00
Christophe Gisquet
b083440060 ac3_fixed: fix out-of-bound read
Should also improve decoding, but actually doesn't...

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 14:05:18 +01:00
Christophe Gisquet
15ce160183 x86: xvid_idct: SSE2 merged add version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 13:36:47 +01:00
Christophe Gisquet
decd5193e1 x86: xvid_idct: merged idct_put SSE2 versions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 13:36:29 +01:00
Christophe Gisquet
8200575d84 x86: dct-test: evaluate prores idct avx version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 13:23:27 +01:00
Christophe Gisquet
4eb4451be1 x86: dct-test: fix compilation for prores
When the decoder is deactivated, the x86-optimized versions are
not compiled, resulting in a link error.

The C version is unaffected, as it is part of the idctdsp
subsystem.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 13:23:06 +01:00
Christophe Gisquet
c3bf52713a x86: xvid_idct: port MMX iDCT to yasm
Also reduce the table duplication with SSE2 code, remove duplicated
macro parameters.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 11:45:11 +01:00
Andreas Cadhalpun
7b05b5093e ac3dec_fixed: always use the USE_FIXED=1 variant of the AC3DecodeContext
The AC3DecodeContext has a float (USE_FIXED=0) and an integer
(USE_FIXED=1) variant, both of which can be present in the same binary.
This is not only very confusing, but it also breaks horribly, when one
variant is used by code expecting the other.

This currently happens, because eac3dec.c is only compiled for the float
variant, but also used from ac3dec_fixed.c, which uses the integer
variant.

The result is memory corruption, leading to crashes.

So compile eac3dec.c once for each variant and adapt it, so that it
works with the integer variant.

A loss of precission and scaling bug has been fixed by the committer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-14 04:27:06 +01:00
Michael Niedermayer
b14de8e689 avcodec/utils: use atomic operations on entangled_thread_counter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 23:59:07 +01:00
Michael Niedermayer
88ddcfa37f avcodec/tdsc: use ff_codec_open2_recursive()
Fixes assertion failure and race conditions

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 23:23:16 +01:00
Michael Niedermayer
e1f37c48e5 Merge commit '247e370e2a913db52ca079b347a174c8d393b171'
* commit '247e370e2a913db52ca079b347a174c8d393b171':
  TDSC decoder

Conflicts:
	Changelog
	doc/general.texi
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/version.h
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 23:23:01 +01:00
Michael Niedermayer
fa4bb7c5b2 Merge commit '5a0e953c2465be9d449d5f523c3d3e2b886910b2'
* commit '5a0e953c2465be9d449d5f523c3d3e2b886910b2':
  mjpeg: Mark decoder family as thread safe

Conflicts:
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mxpegdec.c
	libavcodec/sp5xdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 22:48:54 +01:00
Michael Niedermayer
a048bd44b2 Merge commit '117b432748ca87de4cd0f09d9b1495545e264733'
* commit '117b432748ca87de4cd0f09d9b1495545e264733':
  lavc: Introduce AVCodec internal capabilities

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 22:38:53 +01:00
Michael Niedermayer
79f013a206 Merge commit '9993a067f6c8c7e7838052ac3146aa6b80dd7e81'
* commit '9993a067f6c8c7e7838052ac3146aa6b80dd7e81':
  lavc: Improve thread locking error message

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 22:02:19 +01:00
Vittorio Giovara
247e370e2a TDSC decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-13 19:48:14 +00:00
Vittorio Giovara
5a0e953c24 mjpeg: Mark decoder family as thread safe
No global variables are used and the VLC tables are allocated without
static elements. This will allow using a JPEG decoding context within
other decoders.
2015-03-13 19:48:07 +00:00
Vittorio Giovara
117b432748 lavc: Introduce AVCodec internal capabilities
This field is designed for marking codec properties useful to lavc internals.
Two internal capabilities are added:
 - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks;
 - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails.
2015-03-13 19:47:47 +00:00
Vittorio Giovara
9993a067f6 lavc: Improve thread locking error message 2015-03-13 19:47:34 +00:00
Michael Niedermayer
7b0daec233 avcodec/svq1dec: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 11:55:45 +01:00
Carl Eugen Hoyos
3cd823e46f lavc: Print number of reference frames if debug level >= verbose. 2015-03-13 08:52:36 +01:00
Christophe Gisquet
2999bd7da2 x86: xvid_idct: port SSE2 iDCT to yasm
The main difference consists in renaming properly labels, and
letting yasm select the gprs for skipping 1D transforms.

Previous-version-reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 01:04:52 +01:00
Michael Niedermayer
8f8c31f4c7 Merge commit '913aa9a4874418724183a3ec862cdc63b829367d'
* commit '913aa9a4874418724183a3ec862cdc63b829367d':
  libx264: Return more meaningful error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-13 00:02:27 +01:00
Michael Niedermayer
a91c175db2 Merge commit '17c45d4d056d0e10ecb88b424ec9e68be398da5e'
* commit '17c45d4d056d0e10ecb88b424ec9e68be398da5e':
  libtheora: Check frame allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 21:41:55 +01:00
Michael Niedermayer
9ecfe0b878 Merge commit 'a72d93daa09ffbad2771f1450820941055eaf210'
* commit 'a72d93daa09ffbad2771f1450820941055eaf210':
  mpegvideo_enc: Check AVCodecContext allocation

Conflicts:
	libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 21:30:37 +01:00
Michael Niedermayer
0bc2da6dcf Merge commit '78c892284150e12f6b08b287bdf7e62307c6985f'
* commit '78c892284150e12f6b08b287bdf7e62307c6985f':
  dca: Document the permuted order in the lfe_fir_64 and lfe_fir_128 tables

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 21:20:24 +01:00
James Almer
d5addf1555 hevcdsp: fix compilation for arm and aarch64
Also add av_cold to ff_hevcdsp_init_arm.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 20:01:01 +01:00
Himangi Saraogi
913aa9a487 libx264: Return more meaningful error codes
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-12 19:09:22 +01:00
Vittorio Giovara
17c45d4d05 libtheora: Check frame allocation 2015-03-12 15:29:59 +00:00
Vittorio Giovara
a72d93daa0 mpegvideo_enc: Check AVCodecContext allocation 2015-03-12 15:29:59 +00:00
Michael Niedermayer
27191b82de avcodec/vp9: Fix undefined shifts in decode_frame_header()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 15:31:41 +01:00
Michael Niedermayer
b7cb8b3d43 avcodec/h264_mb: Fix undefined shifts
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 15:16:46 +01:00
Rainer Hochecker
31816eae32 hevc: delay ff_thread_finish_setup for hwaccel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 14:49:41 +01:00
Niels Möller
78c8922841 dca: Document the permuted order in the lfe_fir_64 and lfe_fir_128 tables 2015-03-12 13:28:42 +01:00
Michael Niedermayer
e197dc04bb Merge commit '212556cd2144659dc6b9d121ddb38cd272bd10ae'
* commit '212556cd2144659dc6b9d121ddb38cd272bd10ae':
  qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-12 00:15:58 +01:00
Andreas Cadhalpun
67142a8c72 roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in
roq_encode_end to free the coded_frame. This currently segfaults if
roq_encode_frame is not called between roq_encode_init and
roq_encode_end.

CC:libav-stable@libav.org
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 20:28:13 +01:00
Yukinori Yamazoe
212556cd21 qsv: Improve the log message of when initializing MFX_IMPL_HARDWARE{2, 3, 4}
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-03-11 19:48:01 +01:00
Michael Niedermayer
fd4e17fcc2 avcodec/mpegvideo_motion: Fix undefined shifts in mpeg_motion_internal()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 19:12:38 +01:00
Michael Niedermayer
c756b3fca2 avcodec/h264dsp_template: Fix undefined shift in biweight_h264_pixels and weight_h264_pixels
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 18:57:36 +01:00