Commit Graph

34108 Commits

Author SHA1 Message Date
Michael Niedermayer
dcf1cf5d24 avcodec/aacsbr: Use FLOAT_0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 11:05:48 +01:00
Timothy Gu
4b80b895a9 pixblockdsp: x86: Condense diff_pixels_* to a shared macro
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
2015-11-07 14:31:34 -08:00
Michael Niedermayer
7cea3430a5 avcodec/takdec: Use memove, avoid undefined memcpy() use
Fixes: e214333cbd94c91228e624ff39329ce6/asan_generic_4a5159_6412_96cda2530e80607210ab41ccae3d456d.tak

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-07 21:30:07 +01:00
wm4
a55fbfa4c4 mmaldec: correct package buffering accounting
The assert in ffmmal_stop_decoder() could trigger sometimes. The
packets_buffered counter was indeed not correctly maintained, and
packets were not subtracted from it if they were still in the waiting
queue.

For some reason, this happened especially with VC-1.
2015-11-07 19:24:49 +01:00
wm4
b07cbf6724 mmaldec: add vc1 decoding support 2015-11-07 19:24:49 +01:00
Andreas Cadhalpun
3e8e1a660e apng: use correct size for output buffer
The buffer needs s->bpp bytes, at maximum currently 10.
Assert that s->bpp is not larger.

This fixes a stack buffer overflow.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-07 13:15:14 +01:00
Will Kelleher
7f7fa90f7b hevc: extract SEI caption data
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-07 12:10:55 +01:00
Michael Niedermayer
43492ff3ab avcodec/jpeg2000dec: Clip all tile coordinates
Fixes out of array access
Fixes: b877a6b788a25c70e8b1d014f8628549/asan_heap-oob_1da2c3f_2324_5a1b329b0b3c4bb6b1d775660ac56717.r3d

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-07 02:17:04 +01:00
Michael Niedermayer
c719cd6cf7 avcodec/microdvddec: Check for string end in 'P' case
Fixes out of array read
Fixes: a9502b60f4cecc19475382aee255f73c/asan_heap-oob_1e87fba_2548_a8ad47f6dde36644fe9cdc444d4632d0.sub

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-07 01:01:19 +01:00
Ronald S. Bultje
20db54906f vp9_parser: allow superframes with a single frame. 2015-11-06 17:12:03 -05:00
Michael Niedermayer
daefd8ab2f avcodec/dirac_parser: Fix undefined memcpy() use
Fixes: 9d375e415486edd1a0c826f2307d89a4/asan_generic_4a5159_1577_faa333e83dacdd9e4dd322380aeed537.iss

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-06 21:59:42 +01:00
Paul B Mahol
b456ece557 XMA1 and XMA2 stereo decoders
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-06 13:45:50 +01:00
Michael Niedermayer
973c3dba27 avcodec/mpeg12dec: Do not call show_bits() with invalid bits
Fixes assertion failure
Fixes: 63e50545709a6440d3d59f6426d58db9/signal_sigabrt_7ffff6ae7cc9_8189_3272a3010fd98ddf947c662bbde1ac13.ts

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-06 00:56:52 +01:00
Michael Niedermayer
cea9eb9520 avcodec/dnxhddec: Make mb_scan_index a fixed length array
Fixes null pointer dereference
Fixes: 5c9d1a6f74a12763fc7c9dd7834022b9/signal_sigsegv_11f78d9_1461_ecee3c5e7205457498e79b3ffaf21d0c.mxf

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-06 00:15:21 +01:00
Michael Niedermayer
d4a731b84a avcodec/faxcompr: Add missing runs check in decode_uncompressed()
Fixes out of array access
Fixes: 54e488b9da4abbceaf405d6492515697/asan_heap-oob_32769b0_160_a8755eb08ee8f9579348501945a33955.TIF

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 21:36:14 +01:00
Michael Niedermayer
93f30f825c avcodec/hevc_ps: Check chroma_format_idc
Fixes out of array access
Fixes: 24d05e8b84676799c735c9e27d97895e/asan_heap-oob_1b70f6a_2955_7c3652a7f370f9f3ef40642bc2c99bb2.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 15:04:57 +01:00
Michael Niedermayer
a813cdda48 avcodec/truemotion1: Initialize mb_change_byte only when needed
Fixes out of array read
Fixes: d92114d8c2a019b8a6e50cd2a7301b54/asan_heap-oob_26bf563_60_1d3420277533de9dbf8aba3f93af346f.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 03:16:15 +01:00
Michael Niedermayer
a8b254e436 avcodec/ffv1dec: Print an error if the quant table count is invalid
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 01:31:52 +01:00
Michael Niedermayer
c665532820 avcodec/ffv1dec: Free tables on init failure
Fixes memleak
Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 01:31:52 +01:00
Michael Niedermayer
5745cf799a avcodec/ffv1dec: Check for 0 quant tables
Fixes assertion failure
Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-05 01:31:52 +01:00
Michael Niedermayer
cc35f6f476 avcodec/mjpegdec: Reinitialize IDCT on BPP changes
Fixes misaligned access
Fixes: dc9262a469f6f315f74c087a7b3a7f35/signal_sigsegv_2e95bcd_9_9c0f9f4a9ba82aa9b3ab2b91ce4d5277.jpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-04 21:51:21 +01:00
Michael Niedermayer
d24888ef19 avcodec/mjpegdec: Check index in ljpeg_decode_yuv_scan() before using it
Fixes: 04715144ba237443010554be0d05343f/asan_heap-oob_1eafc76_1737_c685b48041a563461839e4e7ab97abb8.jpg
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-04 19:33:33 +01:00
Ganesh Ajjanagadde
fd0bf457b7 avcodec/aacsbr_template: replace qsort with AV_QSORT
When sbr->reset is set in encode_frame, a bunch of qsort calls might get made.
Thus, there is the potential of calling qsort whenever the spectral
contents change.

AV_QSORT is substantially faster due to the inlining of the comparison callback.
Thus, the increase in performance should be worth the increase in binary size.

Tested with FATE.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-04 08:15:24 -05:00
Michael Niedermayer
bc55cec57e avcodec/rawenc: Cast argument for av_image_copy_to_buffer() to const
Fixes: libavcodec/rawenc.c:64:40: warning: passing argument 3 of av_image_copy_to_buffer from incompatible pointer type [enabled by default]

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-04 04:41:22 +01:00
Michael Niedermayer
432c1f35f7 avcodec/libzvbi-teletextdec: Remove unused variable ret
Fixes: libavcodec/libzvbi-teletextdec.c:232:9: warning: unused variable ret [-Wunused-variable]

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-04 04:40:00 +01:00
Michael Niedermayer
f3867b0a4a avcodec/vdpau: Remove CONFIG_H263_VDPAU_HWACCEL
Fixes: libavcodec/vdpau.c:320:5: warning: "CONFIG_H263_VDPAU_HWACCEL" is not defined [-Wundef]

It was removed in d15adeacf3

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-04 04:30:19 +01:00
Paul B Mahol
c89e075d5a avcodec: add Interplay ACM decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-03 12:01:27 +01:00
Hendrik Leppkes
d15adeacf3 Merge commit 'd35d0c723e3c8fc8cde76bf677f67928f5e179a8'
* commit 'd35d0c723e3c8fc8cde76bf677f67928f5e179a8':
  vdpau: remove dysfunctional H.263 support

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-02 11:58:01 +01:00
Hendrik Leppkes
3ff6d40cbc Merge commit 'b4a82e740743744136e07054525560351e4892ae'
* commit 'b4a82e740743744136e07054525560351e4892ae':
  h264: Print the complete user message

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-02 11:54:34 +01:00
Hendrik Leppkes
ed6d451d93 Merge commit '8487987b87a252963b27b6adfd82887ea5933918'
* commit '8487987b87a252963b27b6adfd82887ea5933918':
  h264: Print user data SEI under normal debug verbosity

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-02 11:53:55 +01:00
Hendrik Leppkes
1fc13a6269 Merge commit '1720791e36f9cc24c05efea5bb275ab52156ce50'
* commit '1720791e36f9cc24c05efea5bb275ab52156ce50':
  png: read and write stereo3d frame side data information

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-02 11:50:35 +01:00
Paul B Mahol
c293ef258c avformat/ipmovie: put video decoding_map_size into packet and use it in decoder
The size of decoding map can differ from one calculated
internally, producing artifacts while decoding video.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-02 08:44:05 +01:00
Timothy Gu
ee20354b29 pixblockdsp: Use AV_COPY128U for get_pixels_16_c
Before:
  15543 decicycles in get_pixels, 4193214 runs,   1090 skips
After:
   5713 decicycles in get_pixels, 8387564 runs,   1044 skips
2015-10-31 17:25:30 -07:00
Michael Niedermayer
507b01f899 avcodec/h264_slice: Disable slice threads if there are multiple access units in a packet
Fixes null pointer dereference
Fixes Ticket4977

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 22:56:48 +01:00
Clément Bœsch
953d358462 avcodec/libopenh264enc: use AV_OPT_TYPE_BOOL for allow_skip_frames option 2015-10-31 17:33:22 +01:00
Agatha Hu
20abda6b62 avcodec/nvenc: fix potential profile error when encoding yuv444p
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2015-10-31 16:00:39 +01:00
Michael Niedermayer
81d3986d2d avcodec/libopenh264enc: AV_OPT_TYPE_STRING should use .str default
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:29:01 +01:00
Michael Niedermayer
9319e08380 avcodec/libopenh264enc: Fix project name
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:21:58 +01:00
Michael Niedermayer
a75bebfe9a avcodec/libopenh264enc: set .i64 for AV_OPT_TYPE_INT
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:20:53 +01:00
Ganesh Ajjanagadde
47af5db721 all: fix enum definition for large values
ISO C restricts enumerator values to the range of int. Thus (for instance) 0x80000000
unfortunately does not work, and throws a warning with -Wpedantic on
clang 3.7.

This fixes it by using alternative expressions that result in identical
values but do not have this issue.

Tested with FATE.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-30 15:06:19 -04:00
Rémi Denis-Courmont
d35d0c723e vdpau: remove dysfunctional H.263 support
The VDPAU API never explicitly supported H.263 in the first place.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-30 12:46:56 +01:00
Vittorio Giovara
b4a82e7407 h264: Print the complete user message
Previously the message was cut off at 256th byte.
This will allow dumping the complete x264 encode info when needed.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-30 12:46:56 +01:00
Vittorio Giovara
8487987b87 h264: Print user data SEI under normal debug verbosity
Drop the need of setting -debug bugs since it's not a bug, and the
message is already under a AV_LOG_DEBUG log level. Instead only print
it when there is an actual string in it.
2015-10-30 12:46:56 +01:00
Kirill Gavrilov
1720791e36 png: read and write stereo3d frame side data information
Use optional sTER chunk defining side-by-side stereo pair
within "Extensions to the PNG 1.2 Specification", version 1.3.0.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-30 12:46:56 +01:00
Carl Eugen Hoyos
bd1d67efe8 lavc/proresdec2: Fix slice_count for very high resolutions.
QT ignores the value written in the frame header.
Issue reported by forum user Koracas.
2015-10-30 01:32:39 +01:00
Carl Eugen Hoyos
2f1d6d45af lavc/cdg: Add transparency support. 2015-10-30 01:24:50 +01:00
Ganesh Ajjanagadde
603d627457 avcodec/zmbvenc: use log2 instead of log()/M_LN2
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:46:00 -04:00
Ganesh Ajjanagadde
68ba63ebd5 avcodec/nellymoserenc: use log2 instead of log()/M_LN2
This is likely more precise and conveys the intent better.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:46:00 -04:00
Ganesh Ajjanagadde
4870d8518a avcodec/snowenc: use log2 instead of log() / log(2...)
This is likely more precise and conveys the intent better.
The expression has also been accordingly simplified.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-29 18:46:00 -04:00
Paul B Mahol
af3f793f60 avcodec: add ADPCM AICA decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-29 21:26:43 +01:00