Commit Graph

92016 Commits

Author SHA1 Message Date
Mark Thompson
852c7ba3f8 hwcontext_vaapi: Improve logging around quirk detection
Clarify that the list is the naughty list, and therefore being on it is
not desirable.  The i965 driver does not need to be on the list after
version 2.0 (when the standard parameter buffer rendering behaviour was
changed).
2018-09-23 14:42:34 +01:00
Mark Thompson
c2e2b04df3 doc/encoders: Add missing options to VAAPI encoders 2018-09-23 14:42:34 +01:00
Mark Thompson
91534786fa vaapi_encode_h26[45]: Make the AUD option a boolean 2018-09-23 14:42:34 +01:00
Mark Thompson
4cc367bf9d vaapi_encode_h264: Properly set constraint flags
constraint_set1_flag should be set for constrained baseline and main
profiles, because the stream conforms to main profile.

constraint_set3_flag should be set for high profile when the stream
is intra-only.

constraint_set4_flag should always be set for main and high profiles
because interlaced encoding is not supported.

constraint_set5_flag should be set for main and high profiles when
B-frames are not used.

Also fix the setting of max_num_ref_frames - use the gop_size value
to check for intra-only rather than the constraint flag (which is not
necessarily set).
2018-09-23 14:42:34 +01:00
Mark Thompson
851a63c22a vaapi_encode: Clean up the packed header configuration
Add a larger warning more clearly explaining the consequences of missing
packed header support in the driver.  Also only write the extradata if the
user actually requests it via the GLOBAL_HEADER flag.
2018-09-23 14:42:34 +01:00
Mark Thompson
bf726c26fd vaapi_encode: Clean up the GOP structure configuration
Choose what types of reference frames will be used based on what types
are available, and make the intra-only mode explicit (GOP size one,
which must be used for MJPEG).
2018-09-23 14:42:33 +01:00
Mark Thompson
8479f99c7d vaapi_encode: Add support for max QP in rate control
This was added in libva 2.1.0 (VAAPI 1.1.0).  Use AVCodecContext.qmax,
matching the existing behaviour for qmin, and clean up the defaults so
that we only pass min/max when explicitly set.
2018-09-23 14:42:33 +01:00
Mark Thompson
af532c9215 vaapi_encode: Clean up rate control configuration
Query which modes are supported and select between VBR and CBR based
on that - this removes all of the codec-specific rate control mode
selection code.
2018-09-23 14:42:33 +01:00
Mark Thompson
2562dd9e78 vaapi_encode: Always reapply global parameters after the sequence header
The codec sequence headers may contain fields which can overwrite the
fine parameters given in the specific settings (e.g. a crude bitrate
value vs. the max-rate / target-percentage / etc. values in
VAEncMiscParameterRateControl).  Always reapply all global parameters
after a sequence header to avoid this causing problems.
2018-09-23 14:42:33 +01:00
Mark Thompson
ac31d84506 vaapi_encode: Clean up the encode quality configuration 2018-09-23 14:42:33 +01:00
Mark Thompson
95f6f7b704 vaapi_encode_mpeg2: Add options
Include the common options, and also named options for setting the profile
and level.
2018-09-23 14:42:33 +01:00
Mark Thompson
aa2563aecc vaapi_encode: Add common options between all encoders
The only common option here is low_power - it was previously supported
for H.264 only, that specific option is removed.
2018-09-23 14:42:33 +01:00
Mark Thompson
3b188666f1 vaapi_encode: Choose profiles dynamically
Previously there was one fixed choice for each codec (e.g. H.265 -> Main
profile), and using anything else then required an explicit option from
the user.  This changes to selecting the profile based on the input format
and the set of profiles actually supported by the driver (e.g. P010 input
will choose Main 10 profile for H.265 if the driver supports it).

The entrypoint and render target format are also chosen dynamically in the
same way, removing those explicit selections from the per-codec code.
2018-09-23 14:42:33 +01:00
Mark Thompson
a00763be88 configure: Use pkgconfig for VAAPI
Set the minimum version to 0.35.0 (libva 1.3.0) and remove redundant
configure tests.  This also allows the proprietary libmfx fork of libva,
which always shows the version number 0.99.0 (independent of the actual
version).
2018-09-23 14:42:33 +01:00
Paul B Mahol
009597ca33 avcodec: add native iLBC decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-09-23 15:25:50 +02:00
Martin Vignali
59256dea14 fate/mov : use do_md5sum for mov-faststart-4gb-overflow test
fix test on osx

based on suggestion by Hendrik Leppkes
2018-09-22 15:22:06 +02:00
Michael Niedermayer
148a21611d avcodec/ac3dec: Fix shift signedness in mask creation
Fixes: 9924/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5473421772193792
Fixes: left shift of 1 by 63 places cannot be represented in type 'long long'

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-22 00:12:27 +02:00
Michael Niedermayer
fe315feab5 avcodec/eac3dec: Check that channel_map does not contain more than EAC3_MAX_CHANNELS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-22 00:12:27 +02:00
James Almer
a068594248 Revert "avformat/matroskaenc: write CodecPrivate in WebM"
This reverts commit 4755b6e6d1.

This change was not necessary. CodecPrivate was being written to WebM
for codecs like AV1 already.
2018-09-21 18:22:37 -03:00
James Almer
4755b6e6d1 avformat/matroskaenc: write CodecPrivate in WebM
This is now needed for AV1.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-21 16:57:32 -03:00
Kagami Hiiragi
cbe5c7ef38 lavf/matroska: Allow AV1 in WebM
Nothing prevents it to work except this check. AV1 is already supported
by Matroska muxer and aomenc produces WebM/AV1 files as well.

Signed-off-by: Kagami Hiiragi <kagami@genshiken.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-21 12:20:48 -03:00
Pedro Arthur
1cb101f60d avfilter/vf_sr: Fix coverity CID 1439584 2018-09-21 11:22:06 -03:00
Jun Zhao
50d9c85358 lavc/avpacket: Add missing conversions from side data enum to name.
Add missing conversions from side data enum to name.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-09-21 18:09:37 +08:00
Jun Zhao
04cbaae2aa lavu/frame: Add missing conversions from side data enum to name
Add missing conversions from side data enum to name.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-09-21 18:09:26 +08:00
Michael Niedermayer
c02ff77681 doc/examples/vaapi_transcode: Fix the typo
Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-21 00:52:17 +02:00
Karthick Jeyapal
49c67e79ca avformat/dashenc: Reduce Muxing overhead for chunked CMAF format
SIDX atom being inserted for every MOOF atom increases the muxing overhead.
This behaviour can be disabled for chunked CMAF format by enabling Global SIDX option of mov muxer.
2018-09-19 17:31:56 +05:30
Michael Niedermayer
e7b023e1db avcodec/dvdsubdec: Sanity check len in decode_rle()
Fixes: Timeout
Fixes: 9778/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5186007132536832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 23:16:00 +02:00
Michael Niedermayer
c88afa44c4 avcodec/mpeg4videodec: Fix undefined shift in get_amv()
Fixes: runtime error: shift exponent -1 is negative
Fixes: 9938/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5653783529914368

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 23:08:31 +02:00
Michael Niedermayer
fb7b0347b3 avcodec/mpeg4videodec: Check rice_prefix_code
Fixes: out of array read
Fixes: 10064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5766801384800256
Fixes: 10225/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5071833448054784
Fixes: 10261/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5115048024866816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 23:08:23 +02:00
Michael Niedermayer
7ed8d5cfd9 avcodec/pcx: Check for end of input in pcx_rle_decode() and propagate error
Fixes: Timeout
Fixes: 10279/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCX_fuzzer-5729311395414016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 23:08:20 +02:00
Michael Niedermayer
86e76762fc avcodec/av1_parse: Fix bistream typo
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 23:01:44 +02:00
Shiyou Yin
ba175578d1 avcodec: [loongson] optimize get_cabac_inline.
This optimization improved h264 decoding performance about 4%(from 74fps to 77fps, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 18:33:59 +02:00
Zhao Zhili
cd732ac472 avfilter/dnn_backend_native: fix memleak
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-19 13:21:27 -03:00
Zhao Zhili
5dad514379 avfilter/dnn_backend_native: fix invalid free
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-19 13:21:27 -03:00
Zhao Zhili
0d7a75e848 avfilter/vf_sr: fix read out of bounds
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-19 13:21:27 -03:00
Carl Eugen Hoyos
076558a9f4 Cosmetics: Reindent after last commit. 2018-09-19 18:14:40 +02:00
Carl Eugen Hoyos
1ba32a3c46 lavd/dshow: Interpret negative height as bottom-down frame.
Fixes ticket #7436.
2018-09-19 18:13:46 +02:00
Carl Eugen Hoyos
26902f2ef0 lavf/webvttenc: Always write hours in the timestamp with two characters.
Fixes ticket #7442.

Reviewed-by: Reto Kromer
2018-09-19 18:07:32 +02:00
Michael Niedermayer
e33b28cc79 avcodec/zmbv: Check that the decompressed data size is correct
This checks the value exactly for intra frames and checks it against a
minimum for inter frames as they can be variable.

Fixes: Timeout
Fixes: 10182/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-6245951174344704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 00:46:41 +02:00
Michael Niedermayer
3d201b83cd avcodec/zmbv: Update decomp_len in raw frames
decomp_len is used in raw frames, so it should not be left at the value from
whatever was decoded previously (which may be any other frame)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 00:46:44 +02:00
Shiyou Yin
2b646dac78 avcodec/mips: [loongson] refine ff_vc1_inv_trans_8x8_mmi.
Combined 1st and 2nd loop into one inline asm in function ff_vc1_inv_trans_8x8_mmi to
reduce memory operation, and made some small optimization in ff_vc1_inv_trans_4x8_mmi.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-19 00:44:44 +02:00
James Almer
f4cf6ba8c9 Merge commit 'a2041a6522642859ce64af1c618d6fb90a50d4af'
* commit 'a2041a6522642859ce64af1c618d6fb90a50d4af':
  qsvenc: AV_PIX_FMT_QSV path should release frame

Merged-by: James Almer <jamrial@gmail.com>
2018-09-18 13:28:05 -03:00
Maxym Dmytrychenko
a2041a6522 qsvenc: AV_PIX_FMT_QSV path should release frame
Fixes high memory usage and prevents over allocation of the frames via
proper unref.

Can be checked as:
-hwaccel qsv -c:v h264_qsv -i ../h264-conformance/CANL2_Sony_E.jsv -c:v
h264_qsv -b:v 2000k -y qsv.mp4
2018-09-18 17:53:37 +02:00
Sergey Lavrushkin
bd10c1e9a8 libavfilter: Removes stored DNN models. Adds support for native backend model file format in tf backend.
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2018-09-17 19:44:42 -03:00
hwren
bc1097a2bf lavc/libxavs2: remove nonexistent parameters
Signed-off-by: hwren <hwrenx@126.com>
2018-09-17 23:20:40 +01:00
hwren
c0e9824c0f lavc/libdavs2: fix error return codes
Signed-off-by: hwren <hwrenx@126.com>
2018-09-17 23:20:40 +01:00
hwren
6f23c327c5 lavc/libdavs2: remove unused header files
Signed-off-by: hwren <hwrenx@126.com>
2018-09-17 23:20:40 +01:00
James Almer
e3981c5a21 avformat/dashenc: Format VP9 profile as decimal instead of Hexadecimal
Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-17 14:29:46 -03:00
Karthick Jeyapal
422be081a3 avformat/dashenc: Format VP9 bitdepth as decimal instead of Hexadecimal
For example bitdepth should be printed as 10 instead of 0A. Thanks to Hendrik Leppkes for pointing this out

Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-17 14:29:40 -03:00
Karthick Jeyapal
7ff3d2594f avformat/dashenc: Format VP9 level as decimal instead of hexadecimal
Commit ID 63c69d51c7 fixed the bug in vpcc, get_vp9_level() function, causing this change.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-09-17 14:29:40 -03:00