ffmpeg.git
4 years agolavd/libdc1394: Do not crash if dc1394_camera_new() fails.
Carl Eugen Hoyos [Fri, 18 Aug 2017 17:20:15 +0000 (19:20 +0200)]
lavd/libdc1394: Do not crash if dc1394_camera_new() fails.

Fixes Ubuntu bug 1710849

4 years agoopus_pvq_search: only use rsqrtps approximation on CPUs with avx
Rostislav Pehlivanov [Fri, 18 Aug 2017 16:28:40 +0000 (17:28 +0100)]
opus_pvq_search: only use rsqrtps approximation on CPUs with avx

Makes the search produce idential results with the C version.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
4 years agoops_pvq_search: remove dead macro
Rostislav Pehlivanov [Fri, 18 Aug 2017 16:27:41 +0000 (17:27 +0100)]
ops_pvq_search: remove dead macro

There's no point in toggling it, even for debugging. Its just worse.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
4 years agoSIMD opus pvq_search implementation
Ivan Kalvachev [Thu, 8 Jun 2017 19:24:33 +0000 (22:24 +0300)]
SIMD opus pvq_search implementation

Explanation on the workings and methods used by the
Pyramid Vector Quantization Search function
could be found in the following Work-In-Progress mail threads:
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-June/212146.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-June/212816.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/213030.html
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/213436.html

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
4 years agoAdd macros to x86util.asm .
Ivan Kalvachev [Sat, 5 Aug 2017 17:18:50 +0000 (20:18 +0300)]
Add macros to x86util.asm .

Improved version of VBROADCASTSS that works like the avx2 instruction.
Emulation of vpbroadcastd.
Horizontal sum HSUMPS that places the result in all elements.
Emulation of blendvps and pblendvb.

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
4 years agoavcodec/pixlet: fixes integer overflow in read_highpass()
Michael Niedermayer [Thu, 17 Aug 2017 01:54:56 +0000 (03:54 +0200)]
avcodec/pixlet: fixes integer overflow in read_highpass()

Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself
Fixes: 2879/clusterfuzz-testcase-minimized-6317542639403008

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/ffv1dec: Check for bitstream end in decode_line()
Michael Niedermayer [Sun, 13 Aug 2017 22:15:55 +0000 (00:15 +0200)]
avcodec/ffv1dec: Check for bitstream end in decode_line()

Fixes: timeout
Fixes: 2971/clusterfuzz-testcase-6130678276030464

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/rangecoder: Do not increase the pointer beyond the buffer
Michael Niedermayer [Sun, 13 Aug 2017 22:15:54 +0000 (00:15 +0200)]
avcodec/rangecoder: Do not increase the pointer beyond the buffer

Fixes: undefined behavior

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agolibavformat/mov: Fix inserting frames before current_frame.
Jacob Trimble [Thu, 27 Jul 2017 17:34:32 +0000 (10:34 -0700)]
libavformat/mov: Fix inserting frames before current_frame.

When using streaming input, it may be possible to see frames that appear
before the current_frame.  When these frames are inserted into the
index, the current_frame needs to be updated so it is still pointing
at the same frame.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoffprobe: fix use of uninitialized variable
Zhao Zhili [Thu, 17 Aug 2017 02:24:01 +0000 (10:24 +0800)]
ffprobe: fix use of uninitialized variable

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofilters.texi: clarify audio upsampling in loudnorm
Kyle Swanson [Thu, 17 Aug 2017 21:01:42 +0000 (14:01 -0700)]
filters.texi: clarify audio upsampling in loudnorm

Signed-off-by: Kyle Swanson <k@ylo.ph>
4 years agofilters.texi: explain audio upsampling in loudnorm
Werner Robitza [Wed, 16 Aug 2017 11:27:19 +0000 (13:27 +0200)]
filters.texi: explain audio upsampling in loudnorm

Explain that audio will be upsampled to 192 kHz. Addresses issues mentioned in
issue 6570.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
4 years agoavformat/utils: always av_reduce r_frame_rate
Marton Balint [Wed, 16 Aug 2017 22:20:01 +0000 (00:20 +0200)]
avformat/utils: always av_reduce r_frame_rate

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavcodec/zmbv: Check decomp_size
Michael Niedermayer [Wed, 16 Aug 2017 14:03:23 +0000 (16:03 +0200)]
avcodec/zmbv: Check decomp_size

Fixes: OOM
Fixes: 2710/clusterfuzz-testcase-minimized-4750001420894208

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/dnxhdenc: call slice thread code only if slice threading is enabled
Paul B Mahol [Thu, 17 Aug 2017 09:42:16 +0000 (11:42 +0200)]
avcodec/dnxhdenc: call slice thread code only if slice threading is enabled

4 years agoavcodec/diracdec: Fixes integer overflow
Michael Niedermayer [Tue, 15 Aug 2017 01:32:44 +0000 (03:32 +0200)]
avcodec/diracdec: Fixes integer overflow

Fixes: runtime error: signed integer overflow: 340018243 * 27 cannot be represented in type 'int'
Fixes: 2861/clusterfuzz-testcase-minimized-5361070510178304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/diracdec: Check perspective_exp and zrs_exp.
Michael Niedermayer [Tue, 15 Aug 2017 01:32:43 +0000 (03:32 +0200)]
avcodec/diracdec: Check perspective_exp and zrs_exp.

Fixes: undefined shift
Fixes: runtime error: shift exponent 264 is too large for 32-bit type 'int'
Fixes: 2860/clusterfuzz-testcase-minimized-4672811689836544

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agofate: add overlay filter tests with alpha
Marton Balint [Thu, 10 Aug 2017 23:10:19 +0000 (01:10 +0200)]
fate: add overlay filter tests with alpha

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoavfilter/vf_weave: fix top vs bottom field order
Paul B Mahol [Wed, 16 Aug 2017 11:29:34 +0000 (13:29 +0200)]
avfilter/vf_weave: fix top vs bottom field order

Fixes #6590.

4 years agoavfilter/vf_transpose: rewrite for x86 SIMD
Paul B Mahol [Tue, 15 Aug 2017 18:12:32 +0000 (20:12 +0200)]
avfilter/vf_transpose: rewrite for x86 SIMD

Transpose first in chunks of 8x8 blocks.
15% faster overall.

4 years agoencoders.texi: Replace x264 --full-help suggestion with --fullhelp
Leo Izen [Thu, 10 Aug 2017 16:40:23 +0000 (12:40 -0400)]
encoders.texi: Replace x264 --full-help suggestion with --fullhelp

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/mov: Fix memory leak when reading DDTS box.
Nikolas Bowe [Tue, 15 Aug 2017 19:08:44 +0000 (12:08 -0700)]
avformat/mov: Fix memory leak when reading DDTS box.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoswresample/resample: Fix flush refelction length
Michael Niedermayer [Tue, 15 Aug 2017 12:58:25 +0000 (14:58 +0200)]
swresample/resample: Fix flush refelction length

Reviewed-by: atomnuker
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoAdd tonemap filter
Vittorio Giovara [Mon, 10 Jul 2017 14:34:30 +0000 (10:34 -0400)]
Add tonemap filter

Based off mpv automatic tonemapping capabilities.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agozscale: Enable single precision input/ouput filtering
Vittorio Giovara [Mon, 10 Jul 2017 15:21:30 +0000 (11:21 -0400)]
zscale: Enable single precision input/ouput filtering

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agoAdd single precision planar RGB pixel formats
Vittorio Giovara [Fri, 7 Jul 2017 21:42:57 +0000 (17:42 -0400)]
Add single precision planar RGB pixel formats

Add a pixel format flag to identify this family.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agoavfilter/vf_datascope: make it possible to change pixscope window position
Paul B Mahol [Tue, 15 Aug 2017 11:54:19 +0000 (13:54 +0200)]
avfilter/vf_datascope: make it possible to change pixscope window position

4 years agoavcodec/cavsdec: Check P/B frame mb decode which return error codes
Michael Niedermayer [Sun, 13 Aug 2017 16:44:25 +0000 (18:44 +0200)]
avcodec/cavsdec: Check P/B frame mb decode which return error codes

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/cavsdec: Check I frame mb decode for errors
Michael Niedermayer [Sun, 13 Aug 2017 16:42:45 +0000 (18:42 +0200)]
avcodec/cavsdec: Check I frame mb decode for errors

Fixes: timeout
Fixes: 2943/clusterfuzz-testcase-5430257156882432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/scale_npp: fix logic used in previous patch
Timo Rothenpieler [Mon, 14 Aug 2017 14:03:11 +0000 (16:03 +0200)]
avfilter/scale_npp: fix logic used in previous patch

4 years agoavfilter/scale_npp: check for buffer allocation failure
Timo Rothenpieler [Mon, 14 Aug 2017 12:15:25 +0000 (14:15 +0200)]
avfilter/scale_npp: check for buffer allocation failure

I totally did not forget to amend this to the previous patch...

4 years agoavfilter/scale_npp: fix passthrough mode
Yogender Gupta [Mon, 14 Aug 2017 10:41:32 +0000 (16:11 +0530)]
avfilter/scale_npp: fix passthrough mode

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
4 years agoavcodec/lagarith: Detect end of input in lag_decode_line() loop
Michael Niedermayer [Fri, 11 Aug 2017 19:47:31 +0000 (21:47 +0200)]
avcodec/lagarith: Detect end of input in lag_decode_line() loop

Fixes: timeout
Fixes: 2933/clusterfuzz-testcase-5124990208835584

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/gdv: Check available space before reading palette
Michael Niedermayer [Fri, 11 Aug 2017 17:27:02 +0000 (19:27 +0200)]
avcodec/gdv: Check available space before reading palette

Fixes: Timeout
Fixes: 2926/clusterfuzz-testcase-498711001458278

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/ffv1dec_template: Fix undefined shift
Michael Niedermayer [Fri, 11 Aug 2017 16:20:03 +0000 (18:20 +0200)]
avcodec/ffv1dec_template: Fix undefined shift

Fixes: runtime error: left shift of negative value -127
Fixes: 2834/clusterfuzz-testcase-minimized-5988039123795968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mpeg4videodec: Clear mcsel before decoding an image
Michael Niedermayer [Sun, 6 Aug 2017 11:32:54 +0000 (13:32 +0200)]
avcodec/mpeg4videodec: Clear mcsel before decoding an image

Fixes: runtime error: signed integer overflow: 2146467840 + 1032192 cannot be represented in type 'int'
Fixes: 2826/clusterfuzz-testcase-minimized-5901511613743104

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/avidec: Move packet skip after prefix and related checks
Michael Niedermayer [Tue, 8 Aug 2017 00:17:16 +0000 (02:17 +0200)]
avformat/avidec: Move packet skip after prefix and related checks

This fixes loosing packets
Fixes: big.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/tests/dct: Add Mean square error test
Michael Niedermayer [Sun, 9 Jul 2017 01:10:51 +0000 (03:10 +0200)]
avcodec/tests/dct: Add Mean square error test

based on quotes of IEEE 1180 / ISO/IEC 23002-1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/tests/dct: Add peak mean error check
Michael Niedermayer [Sun, 9 Jul 2017 01:10:51 +0000 (03:10 +0200)]
avcodec/tests/dct: Add peak mean error check

based on quotes of IEEE 1180 / ISO/IEC 23002-1

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mjpegenc: cosmetic changes
Davinder Singh [Thu, 10 Aug 2017 01:40:36 +0000 (07:10 +0530)]
avcodec/mjpegenc: cosmetic changes

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/mjpegenc: disable unused code with AMV
Davinder Singh [Thu, 10 Aug 2017 01:38:34 +0000 (07:08 +0530)]
avcodec/mjpegenc: disable unused code with AMV

disable unused amv_encode_picture() when AMV encoder is not configured.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_overlay: fix alpha blending for planar formats with a transparent background
Marton Balint [Wed, 2 Aug 2017 23:48:06 +0000 (01:48 +0200)]
avfilter/vf_overlay: fix alpha blending for planar formats with a transparent background

When the background had an alpha channel, the old code in blend_plane
calculated premultiplied alpha from the destination plane colors instead of the
destination alpha.

Also the calculation of the output alpha should only happen after the color
planes are already finished.

Fixes output of:
ffplay -f lavfi "testsrc2=alpha=32[a];color=black[b];[b][a]overlay[out0]"

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoffplay: add support for more SDL pixel formats when rendering video
Marton Balint [Sun, 6 Aug 2017 12:22:20 +0000 (14:22 +0200)]
ffplay: add support for more SDL pixel formats when rendering video

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoffplay: add support for displaying rgb images with alpha
Marton Balint [Sat, 5 Aug 2017 20:54:18 +0000 (22:54 +0200)]
ffplay: add support for displaying rgb images with alpha

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agoffplay: add support for rendering yuv images with negative line size
Marton Balint [Sat, 5 Aug 2017 20:15:10 +0000 (22:15 +0200)]
ffplay: add support for rendering yuv images with negative line size

Signed-off-by: Marton Balint <cus@passwd.hu>
4 years agopixfmt: Support chroma-derived and ictcp color matrices
Vittorio Giovara [Tue, 8 Aug 2017 14:30:32 +0000 (16:30 +0200)]
pixfmt: Support chroma-derived and ictcp color matrices

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agoh264: Add support for alternative transfer characterics SEI
Vittorio Giovara [Fri, 9 Jun 2017 21:27:22 +0000 (17:27 -0400)]
h264: Add support for alternative transfer characterics SEI

The use of this SEI is for backward compatibility in HLG HDR systems:
older devices that cannot interpret the "arib-std-b67" transfer will
get the compatible transfer (usually bt709 or bt2020) from the VUI,
while newer devices that can interpret HDR will read the SEI and use
its value instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
4 years agod3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
Martin Storsjö [Tue, 4 Jul 2017 17:03:00 +0000 (20:03 +0300)]
d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY

If using the winstore compat library, a fallback LoadLibrary
function does exist, that only calls LoadPackagedLibrary though
(which doesn't work for dynamically loading d3d11 DLLs).

Therefore explicitly check the targeted API family instead.

Make this check a reusable HAVE_* component which other parts
of the libraries can check when necessary as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merged from Libav commit 4d330da006fe48178.

4 years agoavformat/movenc: reindent after the previous commit
James Almer [Thu, 10 Aug 2017 02:15:38 +0000 (23:15 -0300)]
avformat/movenc: reindent after the previous commit

4 years agolavf/movenc.c: Set sgpd and sbgp atoms to represent decoder delay for AAC.
Sasi Inguva [Wed, 9 Aug 2017 00:00:19 +0000 (17:00 -0700)]
lavf/movenc.c: Set sgpd and sbgp atoms to represent decoder delay for AAC.

According to https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html and ISO-IEC-14496-12 Section 10.1.1.1 and 10.1.1.3

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/aacdec: Fix PCE channel_layout verification
Nicolas Sugino [Wed, 26 Jul 2017 18:29:02 +0000 (15:29 -0300)]
avcodec/aacdec: Fix PCE channel_layout verification

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/dynaudnorm: increment input outside of the FFMIN macro so it doesn't get...
Andy [Tue, 8 Aug 2017 22:42:21 +0000 (22:42 +0000)]
avfilter/dynaudnorm: increment input outside of the FFMIN macro so it doesn't get double incremented

4 years agoavcodec/dvenc: Change quantizer dead zone default to 7
Michael Niedermayer [Sun, 6 Aug 2017 23:20:56 +0000 (01:20 +0200)]
avcodec/dvenc: Change quantizer dead zone default to 7

This improves the quality and reduces the "blocking" in flat areas

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/dvenc: Support adjusting the quantizer deadzone
Michael Niedermayer [Sun, 6 Aug 2017 23:20:55 +0000 (01:20 +0200)]
avcodec/dvenc: Support adjusting the quantizer deadzone

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/dirac_dwt: Fixes integer overflows in COMPOSE_DAUB97*
Michael Niedermayer [Sun, 6 Aug 2017 03:01:45 +0000 (05:01 +0200)]
avcodec/dirac_dwt: Fixes integer overflows in COMPOSE_DAUB97*

Fix multiple: runtime error: signed integer overflow: 6497 * 3409630 cannot be represented in type 'int'
Fixes: 2819/clusterfuzz-testcase-minimized-4743700301217792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter/vf_separatefields: stop leaking last frame
Paul B Mahol [Tue, 8 Aug 2017 16:45:32 +0000 (18:45 +0200)]
avfilter/vf_separatefields: stop leaking last frame

This can happen when filtering is ended without receiving EOF.

4 years agoimgutils: add function to clear an image to black
wm4 [Sat, 22 Jul 2017 21:05:14 +0000 (23:05 +0200)]
imgutils: add function to clear an image to black

Black isn't always just memset(ptr, 0, size). Limited YUV in particular
requires relatively non-obvious values, and filling a frame with
repeating 0 bytes is disallowed in some contexts. With component sizes
larger than 8 or packed YUV, this can become relatively complicated. So
having a generic function for this seems helpful.

In order to handle the complex cases in a generic way without destroying
performance, this code attempts to compute a black pixel, and then uses
that value to clear the image data quickly by using a function like
memset.

Common cases like yuv410p10 or rgba can't be handled with a simple
memset, so there is some code to fill memory with 2/4/8 byte patterns.
For the remaining cases, a generic slow fallback is used.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merged from Libav commit 45df7adc1d9b7.

4 years agolavc, lavu: move frame cropping to a convenience function
wm4 [Sat, 22 Jul 2017 21:05:13 +0000 (23:05 +0200)]
lavc, lavu: move frame cropping to a convenience function

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merged from Libav commit 47399ccdfd.

4 years agofate: update ref files for gray pixel formats changes
James Almer [Tue, 8 Aug 2017 04:34:18 +0000 (01:34 -0300)]
fate: update ref files for gray pixel formats changes

4 years agoavfilter/drawutils: add gray9/10/12 support
Paul B Mahol [Mon, 7 Aug 2017 16:39:29 +0000 (18:39 +0200)]
avfilter/drawutils: add gray9/10/12 support

4 years agoavfilter/vf_premultiply: add inplace mode
Paul B Mahol [Fri, 4 Aug 2017 20:28:53 +0000 (22:28 +0200)]
avfilter/vf_premultiply: add inplace mode

4 years agoavfilter: add support for GRAY9 and GBRAP10
Paul B Mahol [Mon, 7 Aug 2017 09:52:18 +0000 (11:52 +0200)]
avfilter: add support for GRAY9 and GBRAP10

4 years agoavfilter/vf_waveform: add support for 9 bit depth lowpass
Paul B Mahol [Mon, 7 Aug 2017 08:34:34 +0000 (10:34 +0200)]
avfilter/vf_waveform: add support for 9 bit depth lowpass

4 years agoavfilter/vf_extractplanes: add 9 bitdepth support
Paul B Mahol [Sat, 5 Aug 2017 13:18:12 +0000 (15:18 +0200)]
avfilter/vf_extractplanes: add 9 bitdepth support

4 years agolibswscale: add gray9 support
Paul B Mahol [Sat, 5 Aug 2017 12:28:45 +0000 (14:28 +0200)]
libswscale: add gray9 support

4 years agolibavutil: add GRAY9 pixel format
Paul B Mahol [Sat, 5 Aug 2017 12:19:26 +0000 (14:19 +0200)]
libavutil: add GRAY9 pixel format

4 years agoavfilter/drawutils: support gbrap10 too
Paul B Mahol [Mon, 7 Aug 2017 10:50:13 +0000 (12:50 +0200)]
avfilter/drawutils: support gbrap10 too

4 years agoavformat/hlsenc: allow dynamic encryption key rotation
DeHackEd [Sun, 6 Aug 2017 07:10:35 +0000 (15:10 +0800)]
avformat/hlsenc: allow dynamic encryption key rotation

Makes behaviour of 805ce25b1d2f optional, re-enables
HLS key rotation feature

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: DHE <git@dehacked.net>
4 years agoavcodec/aacdec_fixed: fix invalid shift in predict()
Michael Niedermayer [Fri, 4 Aug 2017 01:26:30 +0000 (03:26 +0200)]
avcodec/aacdec_fixed: fix invalid shift in predict()

Fixes: runtime error: shift exponent -2 is negative
Fixes: 2818/clusterfuzz-testcase-minimized-5062943676825600

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/h264_slice: Fix overflow in slice offset
Michael Niedermayer [Fri, 4 Aug 2017 00:41:05 +0000 (02:41 +0200)]
avcodec/h264_slice: Fix overflow in slice offset

Fixes: runtime error: signed integer overflow: 1610612736 * 2 cannot be represented in type 'int'
Fixes: 2817/clusterfuzz-testcase-minimized-5289691240726528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/utils: fix memory leak in avformat_free_context
Steven Siloti [Tue, 18 Jul 2017 18:26:39 +0000 (11:26 -0700)]
avformat/utils: fix memory leak in avformat_free_context

The pointer to the packet queue is stored in the internal structure
so the queue needs to be flushed before internal is freed.

Signed-off-by: Steven Siloti <ssiloti@bittorrent.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoswscale: fix gbrap16 alpha channel issues
James Cowgill [Thu, 3 Aug 2017 15:21:54 +0000 (16:21 +0100)]
swscale: fix gbrap16 alpha channel issues

Fixes filter-pixfmts-scale test failing on big-endian systems due to
alpSrc not being cast to (const int32_t**).

Also fixes distortions in the output alpha channel values by copying the
alpha channel code from the rgba64 case found elsewhere in output.c.

Fixes ticket 6555.

Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter: add floodfill filter
Paul B Mahol [Sat, 5 Aug 2017 18:27:32 +0000 (20:27 +0200)]
avfilter: add floodfill filter

4 years agodoc/filters.texi: add yet another laplacian edge detector
Paul B Mahol [Sat, 5 Aug 2017 08:36:48 +0000 (10:36 +0200)]
doc/filters.texi: add yet another laplacian edge detector

4 years agodoc/libav-merge: remove the hls merge TODO
Steven Liu [Fri, 4 Aug 2017 14:18:22 +0000 (22:18 +0800)]
doc/libav-merge: remove the hls merge TODO

This TODO is done.
See 5caaa3a49e76b084ff8a9840d541bad64d96d7f7

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Steven Liu <lq@onvideo.cn>
4 years agoavformat/hlsenc: support fmp4 single file mode
Steven Liu [Fri, 4 Aug 2017 13:38:55 +0000 (21:38 +0800)]
avformat/hlsenc: support fmp4 single file mode

add byterange mode of the hls fmp4

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
4 years agoavfilter: add tlut2 filter
Paul B Mahol [Fri, 4 Aug 2017 08:29:12 +0000 (10:29 +0200)]
avfilter: add tlut2 filter

4 years agoavfilter/vf_ssim: fix temp size calculation
Muhammad Faiz [Thu, 3 Aug 2017 00:59:09 +0000 (07:59 +0700)]
avfilter/vf_ssim: fix temp size calculation

Also use av_mallocz_array.
Fix Ticket6519.

Reviewed-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
4 years agohwcontext_cuda : Support YUV444P16 format
Yogender Gupta [Tue, 18 Jul 2017 11:05:53 +0000 (16:35 +0530)]
hwcontext_cuda : Support YUV444P16 format

Signed-off-by: Philip Langdale <philipl@overt.org>
4 years agohwupload_cuda : Add 10/16 bit format support
Yogender Gupta [Tue, 18 Jul 2017 10:31:02 +0000 (16:01 +0530)]
hwupload_cuda : Add 10/16 bit format support

Signed-off-by: Philip Langdale <philipl@overt.org>
4 years agoavcodec/htmlsubtitles: fix format specifier in av_bprintf calls
James Almer [Thu, 3 Aug 2017 20:51:51 +0000 (17:51 -0300)]
avcodec/htmlsubtitles: fix format specifier in av_bprintf calls

4 years agoAdd myself as speedhq maintainer, per request.
Steinar H. Gunderson [Thu, 3 Aug 2017 07:31:34 +0000 (09:31 +0200)]
Add myself as speedhq maintainer, per request.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agospeedhq: add FATE tests
Steinar H. Gunderson [Thu, 3 Aug 2017 07:31:30 +0000 (09:31 +0200)]
speedhq: add FATE tests

Also add simple FATE tests, based on output produced by the NDI SDK.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agospeedhq: fix behavior of single-field decoding
Steinar H. Gunderson [Thu, 3 Aug 2017 07:22:57 +0000 (09:22 +0200)]
speedhq: fix behavior of single-field decoding

The height convention for decoding frames with only a single field made sense
for compatibility with legacy decoders, but doesn't really match the convention
used by NDI, which is the primary (only?) user. Thus, change it to simply
assuming that if the two fields overlap, the frame is meant to be a single
field and the frame height matches the field height.

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec/hevc_cabac: Check for ff_init_cabac_decoder() failure in cabac_reinit()
Michael Niedermayer [Tue, 1 Aug 2017 22:46:49 +0000 (00:46 +0200)]
avcodec/hevc_cabac: Check for ff_init_cabac_decoder() failure in cabac_reinit()

Fixes: runtime error: left shift of negative value -967831544
Fixes: 2815/clusterfuzz-testcase-minimized-6062914471460864

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/h264idct_template: Fix integer overflow in ff_h264_idct_add()
Michael Niedermayer [Tue, 1 Aug 2017 17:56:07 +0000 (19:56 +0200)]
avcodec/h264idct_template: Fix integer overflow in ff_h264_idct_add()

Fixes: runtime error: signed integer overflow: 26215360 + 2121330944 cannot be represented in type 'int'
Fixes: 2809/clusterfuzz-testcase-minimized-4785181833560064

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
4 years agoavformat/riff: remove useless tag correlation 'mpg2'->MPEG1VIDEO.
Aleksandr Slobodeniuk [Tue, 1 Aug 2017 11:48:39 +0000 (14:48 +0300)]
avformat/riff: remove useless tag correlation 'mpg2'->MPEG1VIDEO.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavformat/riff.h : remove unused function parameter "const AVCodecTag *tags" of "void...
Aleksandr Slobodeniuk [Fri, 14 Jul 2017 11:03:20 +0000 (14:03 +0300)]
avformat/riff.h : remove unused function parameter "const AVCodecTag *tags" of "void ff_put_bmp_header()"

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavfilter: add unpremultiply filter
Paul B Mahol [Tue, 1 Aug 2017 09:32:22 +0000 (11:32 +0200)]
avfilter: add unpremultiply filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agolavc/htmlsubtitles: reindent after previous commits
Clément Bœsch [Sat, 29 Jul 2017 19:24:34 +0000 (21:24 +0200)]
lavc/htmlsubtitles: reindent after previous commits

4 years agolavc/htmlsubtitles: handle colors starting with many '#'
Clément Bœsch [Sat, 29 Jul 2017 19:22:17 +0000 (21:22 +0200)]
lavc/htmlsubtitles: handle colors starting with many '#'

4 years agolavc/htmlsubtitles: improve line breaks handling
Clément Bœsch [Sat, 29 Jul 2017 19:09:54 +0000 (21:09 +0200)]
lavc/htmlsubtitles: improve line breaks handling

4 years agolavc/tests: add htmlsubtitles
Clément Bœsch [Sat, 29 Jul 2017 18:56:55 +0000 (20:56 +0200)]
lavc/tests: add htmlsubtitles

4 years agolavc/htmlsubtitles: improve handling broken garbage
Clément Bœsch [Sat, 29 Jul 2017 18:56:25 +0000 (20:56 +0200)]
lavc/htmlsubtitles: improve handling broken garbage

This commit switches off forced correct nesting of tags and only keeps
it for font tags. See long explanations in the code for the rationale.

This results in various FATE changes which I'll explain here:

- various swapping in font attributes, this is mostly noise due to the
  old reverse stack way of printing them. The new one is more correct as
  the last attribute takes over the previous ones.

- unrecognized tags disappears

- invalid tags that were previously displayed aren't anymore (instead,
  we have a warning). This is better for the end user

The main benefit of this commit is to be more tolerant to error, leading
to a better handling of badly nested tags or random wrong formatting for
the end user.

4 years agoavcodec/diracdsp: fix integer overflow
Michael Niedermayer [Sat, 29 Jul 2017 13:55:36 +0000 (15:55 +0200)]
avcodec/diracdsp: fix integer overflow

Fixes: runtime error: signed integer overflow: 11 * 225726413 cannot be represented in type 'int'
Fixes: 2764/clusterfuzz-testcase-minimized-5382561922547712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/diracdec: Check weight_log2denom
Michael Niedermayer [Sat, 29 Jul 2017 13:46:50 +0000 (15:46 +0200)]
avcodec/diracdec: Check weight_log2denom

Fixes: runtime error: shift exponent -1 is negative
Fixes: 2742/clusterfuzz-testcase-minimized-5724322402402304
Fixes: 2744/clusterfuzz-testcase-minimized-4672435653705728
Fixes: 2749/clusterfuzz-testcase-minimized-5298741273690112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/dirac_vlc: Fix invalid shift
Michael Niedermayer [Fri, 28 Jul 2017 00:23:25 +0000 (02:23 +0200)]
avcodec/dirac_vlc: Fix invalid shift

Fixes: runtime error: shift exponent 65 is too large for 64-bit type 'residual' (aka 'unsigned long')
Fixes: 2737/clusterfuzz-testcase-minimized-4968639147016192

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
4 years agoavcodec/atrac3p: use float_dsp in ff_atrac3p_power_compensation
James Almer [Thu, 20 Jul 2017 18:37:36 +0000 (15:37 -0300)]
avcodec/atrac3p: use float_dsp in ff_atrac3p_power_compensation

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agodoc/filters.texi: add another lut2 example
Paul B Mahol [Mon, 31 Jul 2017 12:07:27 +0000 (14:07 +0200)]
doc/filters.texi: add another lut2 example

Signed-off-by: Paul B Mahol <onemda@gmail.com>
4 years agosws/tests/pixdesc_query: fix use of free() instead of av_free()
Clément Bœsch [Sun, 30 Jul 2017 18:48:04 +0000 (20:48 +0200)]
sws/tests/pixdesc_query: fix use of free() instead of av_free()

Fix CID 1415949