Commit Graph

93473 Commits

Author SHA1 Message Date
Zhong Li 81ae387a26 configure: include pkgconfig path as vaapi header search
Currectly just standard header path can be found,
check_type/struct will fail if vaapi is installed somewhere else.

Move them followed "check_pkg_config"

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-03-28 21:47:15 +08:00
Carl Eugen Hoyos f8fa8bbf22 lavc/vaapi_h264: Do not set FMO fields.
The fields are deprecated in current vaapi,
setting them to 0 in old versions is fine
as FMO is not implemented.

Fixes the following warnings:
libavcodec/vaapi_h264.c:259:10: warning: 'num_slice_groups_minus1' is deprecated [-Wdeprecated-declarations]
        .num_slice_groups_minus1                    = pps->slice_group_count - 1,
         ^
libavcodec/vaapi_h264.c:260:10: warning: 'slice_group_map_type' is deprecated [-Wdeprecated-declarations]
        .slice_group_map_type                       = pps->mb_slice_group_map_type,
         ^
libavcodec/vaapi_h264.c:261:10: warning: 'slice_group_change_rate_minus1' is deprecated [-Wdeprecated-declarations]
        .slice_group_change_rate_minus1             = 0, /* FMO is not implemented */
         ^

Reviewed-by: Mark Thompson
2019-03-28 00:51:14 +01:00
Carl Eugen Hoyos 9fa757ad7c lavc/vaapi_hevc: Do not initialize fields twice.
Fixes the following compilation warnings:
libavcodec/vaapi_hevc.c:155:21: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
        .pic_fields.bits = {
                   ~^~~~
libavcodec/vaapi_hevc.c:125:57: note: previous initialization is here
        .pic_fields.value                             = 0,
                                                        ^
libavcodec/vaapi_hevc.c:175:31: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
        .slice_parsing_fields.bits = {
                             ~^~~~
libavcodec/vaapi_hevc.c:126:57: note: previous initialization is here
        .slice_parsing_fields.value                   = 0,

Reviewed-by: Mark Thompson
2019-03-28 00:33:07 +01:00
Mark Thompson d0b174d7df configure: Do not enable both OpenCL-VAAPI interop modes simultaneously
Beignet offers a far more flexiable and complete interface, so choose it
by default if available.
2019-03-27 22:29:23 +00:00
Carl Eugen Hoyos 6bc800dead lavf/latmenc: Return the correct error for wrong codec.
Requested-by: Nicolas George
2019-03-27 14:54:05 +01:00
Michael Niedermayer 54655623a8 avcodec/hevcdec: Avoid only partly skiping duplicate first slices
Fixes: NULL pointer dereference and out of array access
Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432
Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304

This also fixes the return code for explode mode

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-27 08:42:10 +01:00
Lauri Kasanen 681957b88d swscale/ppc: VSX-optimize yuv2rgb_full
./ffmpeg -f lavfi -i yuvtestsrc=duration=1:size=1200x1440 \
        -s 1200x1440 -f null -vframes 100 -pix_fmt $i -nostats \
        -cpuflags 0 -v error -

This uses 32-bit mul, so POWER8 only.

The following output formats get about 4.5x speedup:

rgb24
  39980 UNITS in yuv2packed1,   32768 runs,      0 skips
   8774 UNITS in yuv2packed1,   32768 runs,      0 skips
bgr24
  40069 UNITS in yuv2packed1,   32768 runs,      0 skips
   8772 UNITS in yuv2packed1,   32766 runs,      2 skips
rgba
  39759 UNITS in yuv2packed1,   32768 runs,      0 skips
   8681 UNITS in yuv2packed1,   32767 runs,      1 skips
bgra
  39729 UNITS in yuv2packed1,   32768 runs,      0 skips
   8696 UNITS in yuv2packed1,   32766 runs,      2 skips
argb
  39766 UNITS in yuv2packed1,   32768 runs,      0 skips
   8672 UNITS in yuv2packed1,   32766 runs,      2 skips
bgra
  39784 UNITS in yuv2packed1,   32768 runs,      0 skips
   8659 UNITS in yuv2packed1,   32767 runs,      1 skips
2019-03-27 09:05:08 +02:00
Lauri Kasanen 81a4719d8e swscale: Remove duplicated code
In this function, the exact same clamping happens both in the if and unconditionally.
2019-03-27 09:00:06 +02:00
Decai Lin ec1e4a8baf lavc/h264_levels: add MaxMBPS checking and update fate test.
1. add MaxMBPS checking for level idc setting to align with AVC spec
   AnnexA table A-1/A-6 level limits.
2. update h264 level fate test.

Signed-off-by: Decai Lin <decai.lin@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2019-03-27 00:13:27 +00:00
Carl Eugen Hoyos 1e34014010 lavc/bmp: Avoid a heap buffer overwrite for 1bpp input.
Found by Mingi Cho, Seoyoung Kim, and Taekyoung Kwon
of the Information Security Lab, Yonsei University.
2019-03-26 21:07:51 +01:00
Jun Zhao e9c9514ce3 avformat/avformat.h: Update the comment for AVInputFormat.flags
AVFMT_NOTIMESTAMPS may be using in AVInputFormat.flags for demuxing

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-03-26 20:58:19 +08:00
Daniel Playfair Cal 6e42021128 avfilter/vf_lensfun: add scale parameter
The lensfun filter wraps the lensfun library which performs
transformations on videos to correct for lens distortion. Often this
results in areas in the input being mapped to areas that fall outside
the boundaries of the output. The library has a parameter called scale
which is a scale factor applied to the output video. By decreasing it it
is possible to regain the areas of the video which would otherwise have
been lost. There is a special value of 0 which indicates that the
library should automatically determine a scale factor that results in
the output frame being filled (i.e. little or no black/unmapped areas).

This patch adds a corresponding scale option to the lensfun filter which
is passed through to the library. The existing behaviour of using the
automatic value of 0 is retained as the default behaviour, while other
values will be passed through to the library.

Signed-off-by: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
2019-03-25 22:50:54 +01:00
Gyan Doshi 9ae8f3cdd3 doc/filters: indicate range for zoom in lavfi/zoompan 2019-03-25 22:03:47 +05:30
James Almer 40490b3a63 avcodec/cbs_av1: fix range of values for Mastering Display Color Volume Metadata OBUs
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-25 11:26:26 -03:00
Michael Niedermayer b8f53a2342 avcodec/jpeg2000dec: Skip de-quantization of empty areas
Fixes: Timeout (26sec -> 18sec)
Fixes: 13448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-576903098243481

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:30 +01:00
Michael Niedermayer c0ca67ba40 avcodec/prosumer: Check decoded size
Fixes: Timeout (longer than i had patience for -> 2sec)
Fixes: 13205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5105644481282048

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:30 +01:00
Michael Niedermayer 635067b75f avcodec/mpegpicture: Check size of edge_emu_buffer
Fixes: OOM
Fixes: 13710/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5633152942342144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:30 +01:00
Michael Niedermayer 4ef27d4072 avcodec/indeo2: Check input size against resolution in ir2_decode_plane()
Fixes: Timeout (56 sec -> 14 sec)
Fixes: 13708/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO2_fuzzer-5656342004498432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:30 +01:00
Michael Niedermayer ff13a92a6f avformat/mov: Fix potential integer overflow in entry check in mov_read_trun()
No testcase

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:30 +01:00
Michael Niedermayer d92034a06a avcodec/dxtory: Check slice sizes before allocating image
Fixes: Timeout (26sec -> 2sec)
Fixes: 13612/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5676845977042944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:29 +01:00
Michael Niedermayer 1223696c72 avcodec/truemotion2: Fix integer overflow in tm2_null_res_block()
Fixes: signed integer overflow: 1111638592 - -2122219136 cannot be represented in type 'int'
Fixes: 13441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5732769815068672

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-25 13:20:29 +01:00
Jun Li c3b517dac2 avformat/rtsp: Add https tunneling support
Add https based tunneling for RTSP/RTP. Tested on Axis and Bosch cameras.
Https is widely used for security consideration.
2019-03-25 01:17:23 +01:00
James Almer 699d0c2a30 avcodec/av1_parser: don't abort parsing the first frame if extradata parsing fails
The first frame contains the sequence header, which is needed to parse every
following frame.

This fixes parsing streams with broken extradata but correct packet data.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-24 18:26:49 -03:00
Michael Niedermayer 013f71497b avcodec/tiff: do not allow bpp 40 with undefined pixel formats
Fixes: Out of array access, assertion failure
Fixes: 13851/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5754570929602560
Fixes: 13869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5695998313103360
Fixes: 13873/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5077273645940736
Fixes: 13874/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5756396757319680
Fixes: 13877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5741026750234624
Fixes: 13880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5649148809838592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-24 10:35:47 +01:00
Carl Eugen Hoyos 5fceac1cdb lavd/v4l2: Fix the type of the probe function. 2019-03-23 23:42:09 +01:00
hwrenx 5252d594a1 lavc/libdavs2: fix frame dumping error description
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwrenx <hwrenx@126.com>
2019-03-23 14:08:00 +08:00
hwrenx bf05f621d5 lavc/libdavs2: add davs2_flush
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwrenx <hwrenx@126.com>
2019-03-23 14:07:16 +08:00
Steven Liu 2cb29a5d8d avformat/avformat.h: update the comment from deprecated to new API
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-03-23 14:04:39 +08:00
Jun Zhao fba42b33b7 lavf/flvdec: fix typo in log message
fix typo in log message, it's come from cd141e71bd

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-03-23 12:06:06 +08:00
Jun Zhao 305025c8ae lavfi/sidedata: add missed frame side data type
add missed frame side data type

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-03-23 11:25:06 +08:00
James Almer 47e12966b7 Merge commit '0676de935b1e81bc5b5698fef3e7d48ff2ea77ff'
* commit '0676de935b1e81bc5b5698fef3e7d48ff2ea77ff':
  arm: Implement a NEON version of 422 h264_h_loop_filter_chroma

Merged-by: James Almer <jamrial@gmail.com>
2019-03-22 16:06:04 -03:00
Carl Eugen Hoyos e704070f61 lavd/v4l2-common: Add an entry for Z16. 2019-03-22 12:30:47 +01:00
Ruiling Song b073fb9eea lavfi/colorspace_common: add ifdef check to be more compatible.
Some filters may not need to do linearize/delinearize, thus
will even not define them. Add ifdef check, so they could easily
re-use the .cl file.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-03-22 09:33:28 +08:00
Ruiling Song 8b951cd475 lavfi/tonemap_opencl: reuse color matrix calculation from colorspace.c
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-03-22 09:33:28 +08:00
Ruiling Song 2593122a16 lavfi/opencl: add ff_opencl_print_const_matrix_3x3()
This is used to print a 3x3 matrix into a part of OpenCL
source code.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-03-22 09:33:28 +08:00
Ruiling Song d0f3798b4e lavfi/colorspace: move some functions to common file
These functions can be reused by other colorspace filters,
so move them to common file. No functional changes.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-03-22 09:33:28 +08:00
Ruiling Song 61cb505d18 lavu/opencl: replace va_ext.h with standard name
Khronos OpenCL header (https://github.com/KhronosGroup/OpenCL-Headers)
uses cl_va_api_media_sharing_intel.h. And Intel's official OpenCL driver
for Intel GPU (https://github.com/intel/compute-runtime) was compiled
against Khronos OpenCL header. So it's better to align with Khronos.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-03-22 09:33:28 +08:00
Martin Storsjö 0676de935b arm: Implement a NEON version of 422 h264_h_loop_filter_chroma
Previously, the 420 version was used even for 422.

This fixes occasional checkasm failures.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-03-21 22:03:46 +02:00
Lou Logan 7366174086 MAINTAINERS: remove myself as mailing list maintainer
Refer to Michael, compn, or Baptiste.

Signed-off-by: Lou Logan <lou@lrcd.com>
2019-03-21 11:34:13 -08:00
Lou Logan 171f8ee40b doc/mailing-list-faq: ffmpeg-devel is now subscription only
Nobody is going to check the queue anymore, so users must now subscribe to
send messages to ffmpeg-devel. This will prevent orphaned/ignored messages
from rotting in the abandoned queue. This matches the behavior of ffmpeg-user
and libav-user.

Also, this addresses some other nits.

Signed-off-by: Lou Logan <lou@lrcd.com>
2019-03-21 11:29:52 -08:00
Carl Eugen Hoyos 4d8875ec23 lavf: Constify the probe function argument.
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
2019-03-21 11:42:17 +01:00
Martin Vignali 6dc1da416e Maintainers : remove myself
Too much hostility in this project
Not enough respect for users and contributors

I'm not interested to contribute anymore
2019-03-21 01:39:12 +01:00
Marton Balint 6af67dcc35 avfilter/af_astats: add support for optimized min/max/peak calculation
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-21 00:39:57 +01:00
Marton Balint 5cc4b79b29 avfilter/af_astats: rework sample loops
The channel loop is now the outer loop for both planar and interleaved. This is
needed by the next patch, and the speed difference is negligable if any.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-21 00:39:57 +01:00
Marton Balint 235228ea50 avfilter/af_astats: factorize sample loops
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-21 00:39:57 +01:00
Marton Balint 233fdd84c2 avfilter/af_astats: fix identation
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-21 00:39:57 +01:00
Marton Balint e85f37d51e avfilter/af_astats: add support for selecting measured statistics
set_metadata with many entries is not very efficient, and with small audio
frames the performance loss is noticable. Also with this very simple
calculations (like peak) can be even further optimized.

Unfoturnately there are some small differences in metadata and av_log info
output, so factorizing calculations and output might not worth the hassle.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-03-21 00:39:57 +01:00
Carl Eugen Hoyos 978880c803 lavf/latmenc: Error out for unsupported codecs. 2019-03-21 00:00:47 +01:00
James Almer 70c8c8a818 avcodec/hevcdec: decode at most one slice reporting being the first in the picture
Fixes deadlocks when decoding packets containing more than one of the aforementioned
slices when using frame threads.

Tested-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-20 19:53:12 -03:00
Carl Eugen Hoyos 3ac474892c lavf/allformats: Remove an accidentally committed line.
Regression since 3aa6208d.
Reported-by: Lou Logan
2019-03-20 23:36:45 +01:00