Commit Graph

86985 Commits

Author SHA1 Message Date
Vittorio Giovara 1460408703 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>
2017-08-15 15:26:20 +02:00
Paul B Mahol 8d2da0939c avfilter/vf_datascope: make it possible to change pixscope window position 2017-08-15 13:54:19 +02:00
Michael Niedermayer b9ce43625c avcodec/cavsdec: Check P/B frame mb decode which return error codes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-15 01:27:36 +02:00
Michael Niedermayer 426a322aa2 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>
2017-08-15 01:27:36 +02:00
Timo Rothenpieler 62b75537db avfilter/scale_npp: fix logic used in previous patch 2017-08-14 16:03:11 +02:00
Timo Rothenpieler f4ebbda566 avfilter/scale_npp: check for buffer allocation failure
I totally did not forget to amend this to the previous patch...
2017-08-14 14:15:27 +02:00
Yogender Gupta 77c5a54192 avfilter/scale_npp: fix passthrough mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-08-14 13:56:10 +02:00
Michael Niedermayer 5859b5b439 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>
2017-08-11 22:02:38 +02:00
Michael Niedermayer 0561bd2fc2 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>
2017-08-11 19:27:52 +02:00
Michael Niedermayer 62702eebde 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>
2017-08-11 18:21:06 +02:00
Michael Niedermayer 7735ed2974 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>
2017-08-11 12:07:16 +02:00
Michael Niedermayer 511e10f673 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>
2017-08-11 12:07:08 +02:00
Michael Niedermayer 84786e928f 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>
2017-08-11 12:06:41 +02:00
Michael Niedermayer 86cbffdc4d 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>
2017-08-11 12:06:40 +02:00
Davinder Singh 4116b2b136 avcodec/mjpegenc: cosmetic changes
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-11 04:28:52 +02:00
Davinder Singh 1939b90306 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>
2017-08-11 04:28:52 +02:00
Marton Balint 498c90c708 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>
2017-08-10 22:25:51 +02:00
Marton Balint 3bd2228d05 ffplay: add support for more SDL pixel formats when rendering video
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-10 22:08:40 +02:00
Marton Balint 7004ac5eeb ffplay: add support for displaying rgb images with alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-10 22:08:40 +02:00
Marton Balint 493f637d1e ffplay: add support for rendering yuv images with negative line size
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-08-10 22:08:40 +02:00
Vittorio Giovara f357104866 pixfmt: Support chroma-derived and ictcp color matrices
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-08-10 15:54:06 +02:00
Vittorio Giovara 8c34a2024d 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>
2017-08-10 15:40:16 +02:00
Martin Storsjö 9042402ec7 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 4d330da006.
2017-08-10 11:58:25 +02:00
James Almer c100330a8f avformat/movenc: reindent after the previous commit 2017-08-09 23:15:38 -03:00
Sasi Inguva e7e1fbc49b 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>
2017-08-10 02:43:53 +02:00
Nicolas Sugino df884e038f avcodec/aacdec: Fix PCE channel_layout verification
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-09 22:08:18 +02:00
Andy 448c88e1a5 avfilter/dynaudnorm: increment input outside of the FFMIN macro so it doesn't get double incremented 2017-08-09 10:21:36 +02:00
Michael Niedermayer abaeeb3ce0 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>
2017-08-08 19:39:21 +02:00
Michael Niedermayer fea7bc9e7b avcodec/dvenc: Support adjusting the quantizer deadzone
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-08 19:39:10 +02:00
Michael Niedermayer a5380f9c1c 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>
2017-08-08 19:25:17 +02:00
Paul B Mahol 41096904d0 avfilter/vf_separatefields: stop leaking last frame
This can happen when filtering is ended without receiving EOF.
2017-08-08 18:53:10 +02:00
wm4 463b81de2b 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 45df7adc1d.
2017-08-08 13:37:37 +02:00
wm4 caa12027ba lavc, lavu: move frame cropping to a convenience function
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Merged from Libav commit 47399ccdfd.
2017-08-08 13:35:09 +02:00
James Almer 45759540a5 fate: update ref files for gray pixel formats changes 2017-08-08 01:34:18 -03:00
Paul B Mahol 1bef0088dc avfilter/drawutils: add gray9/10/12 support 2017-08-07 18:39:29 +02:00
Paul B Mahol 181c9abd47 avfilter/vf_premultiply: add inplace mode 2017-08-07 18:15:36 +02:00
Paul B Mahol bac508fec1 avfilter: add support for GRAY9 and GBRAP10 2017-08-07 13:11:09 +02:00
Paul B Mahol 86222a7ea0 avfilter/vf_waveform: add support for 9 bit depth lowpass 2017-08-07 13:09:57 +02:00
Paul B Mahol 7bfbc2d787 avfilter/vf_extractplanes: add 9 bitdepth support 2017-08-07 13:09:56 +02:00
Paul B Mahol de48710c11 libswscale: add gray9 support 2017-08-07 13:09:41 +02:00
Paul B Mahol ab6d89d7ee libavutil: add GRAY9 pixel format 2017-08-07 13:06:51 +02:00
Paul B Mahol 5621a99e27 avfilter/drawutils: support gbrap10 too 2017-08-07 13:06:34 +02:00
DeHackEd eabeb9093a avformat/hlsenc: allow dynamic encryption key rotation
Makes behaviour of 805ce25b1d optional, re-enables
HLS key rotation feature

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: DHE <git@dehacked.net>
2017-08-06 15:10:35 +08:00
Michael Niedermayer 1e443051b2 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>
2017-08-05 23:56:55 +02:00
Michael Niedermayer 1f53bde6d8 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>
2017-08-05 23:56:52 +02:00
Steven Siloti 949debd1d1 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>
2017-08-05 23:24:02 +02:00
James Cowgill 013ec23cbe 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>
2017-08-05 23:24:02 +02:00
Paul B Mahol 2cc56741b1 avfilter: add floodfill filter 2017-08-05 21:05:22 +02:00
Paul B Mahol c474910414 doc/filters.texi: add yet another laplacian edge detector 2017-08-05 10:36:48 +02:00
Steven Liu 44e9783ab9 doc/libav-merge: remove the hls merge TODO
This TODO is done.
See 5caaa3a49e

Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-08-04 22:18:22 +08:00