Commit Graph

103672 Commits

Author SHA1 Message Date
Andreas Rheinhardt
97bc4695fb avcodec/bsf: ff_list_bsf static
It is a special BSF that is only available via the av_bsf_list-API;
it is not part of the list generated from the declarations in
bitstream_filters.c and therefore needn't have external linkage.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-08 22:59:14 +02:00
Paul B Mahol
7b523a06d0 avformat/dhav: use frame number if timestamp difference is zero 2021-09-08 22:54:55 +02:00
Artem Galin
19a17388d8 libavfilter/vf_deinterlace_qsv: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callback with
proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
c1cebaa4c4 libavfilter/vf_scale_qsv: add MFX_MEMTYPE_FROM_VPPOUT flag to frame_type
In case of DX11 device type, Media SDK is sensitive to these flags.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
46c6946eee libavfilter/vf_scale_qsv: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callback with
proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
36166cc304 libavfilter/qsvvpp: add MFX_MEMTYPE_FROM_VPPOUT flag to output frames
In case of DX11 device type, Media SDK is sensitive to these flags.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
a611c35001 libavfilter/qsvvpp: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callback with
proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:32 -03:00
Artem Galin
4f78711f9c libavutil/hwcontext_d3d11va: adding more texture information to the D3D11 hwcontext API
Microsoft VideoProcessor requires texture with D3DUSAGE_RENDERTARGET flag as output.
There is no way to allocate array of textures with D3D11_BIND_RENDER_TARGET flag
and .ArraySize > 2 by ID3D11Device_CreateTexture2D due to the Microsoft limitation.
Adding AVD3D11FrameDescriptors array to store array of single textures
instead of texture with multiple slices resolves this.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:48:02 -03:00
Artem Galin
f1cd1dc6ce libavutil/hwcontext_qsv: add usage child_device_type argument to explicitly select d3d11va/DX11 device type
UPD: Rebase of last patch set over current master and use DX9 as default device type.

Makes selection of dxva2/DX9 device type by default as before with explicit d3d11va/DX11 usage to cover more HW configurations.
Added warning message to expect changing default device type in the future.

Fixes TGL / AV1 decode as requires DX11 with explicit DX11 type
selection.

Add headless/multi adapter support and fixes:
    https://trac.ffmpeg.org/ticket/7511
    https://trac.ffmpeg.org/ticket/6827
    http://ffmpeg.org/pipermail/ffmpeg-trac/2017-November/041901.html
    https://trac.ffmpeg.org/ticket/7933
    338fbcd5bb
    https://github.com/jellyfin/jellyfin/issues/2626#issuecomment-602153952

Any other fixes are welcome including OpenCL interop patch since I don't have proper setup to validate this use case

Decoding, encoding, transcoding have been validated.

child_device_type option is responsible for d3d11va/dxva2 device selection

Usage examples:

DirectX 11:
    -init_hw_device qsv:hw,child_device_type=d3d11va
    -init_hw_device qsv:hw,child_device_type=d3d11va,child_device=0
OR
    -init_hw_device d3d11va=dx -init_hw_device qsv@dx

DirectX 9 is still supported but requires explicit selection:
    -init_hw_device qsv:hw,child_device_type=dxva2
OR
    -init_hw_device dxva2=dx -init_hw_device qsv@dx

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:42:53 -03:00
Artem Galin
a08a5299ac libavutil/hwcontext_qsv: supporting d3d11va device type
This enables usage of non-powered/headless GPU, better HDR support.
Pool of resources is allocated as one texture with array of slices.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:42:53 -03:00
Artem Galin
776d5a7472 libavcodec/qsv: enabling d3d11va support, added mfxhdlpair
Adding DX11 relevant device type checks and adjusting callbacks with
proper MediaSDK pair type support.

Extending structure for proper MediaSDK pair type support.

Signed-off-by: Artem Galin <artem.galin@intel.com>
2021-09-08 17:42:52 -03:00
Paul B Mahol
3df55c7bd6 avfilter/af_speechnorm: add timeline support 2021-09-08 22:13:26 +02:00
Paul B Mahol
5db1e07a62 avfilter/af_speechnorm: check return value of av_frame_make_writable() 2021-09-08 21:44:54 +02:00
Paul B Mahol
ccd95cb248 avfilter/af_speechnorm: use floats in place of doubles where it is already float used 2021-09-08 21:44:54 +02:00
Michael Niedermayer
2d36d2fbd7 avcodec/h264_parser: Fix nalsize check
Fixes: Assertion failure
Fixes: 37463/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-4914693494931456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-09-08 20:14:00 +02:00
Paul B Mahol
38ab20e591 avfilter/af_silenceremove: fix stop_silence handling 2021-09-08 19:10:39 +02:00
Paul B Mahol
8a42ee6697 avfilter/af_silenceremove: avoid returning 1 sample duration frames 2021-09-08 19:10:39 +02:00
Paul B Mahol
3b331468da avfilter/af_silenceremove: fix processing of periods > 1 2021-09-08 19:10:39 +02:00
Paul B Mahol
5e7e2e5031 avfilter/af_silenceremove: guard against negative numbers 2021-09-08 10:45:53 +02:00
Paul B Mahol
c3e11e3092 avfilter/af_silenceremove: add asserts to check for NaNs 2021-09-08 10:45:53 +02:00
Paul B Mahol
4e1ee16cbb avfilter/af_silenceremove: use duration option for window option 2021-09-07 19:44:25 +02:00
Paul B Mahol
15e844ed9d avfilter/af_silenceremove: fix indentation 2021-09-07 19:44:25 +02:00
Paul B Mahol
1d1e8a47b7 avfilter/af_silenceremove: cover default case too 2021-09-07 19:44:25 +02:00
Paul B Mahol
9e33572b3d avcodec/mlpenc: simplify some complicated expressions more 2021-09-07 18:16:13 +02:00
Paul B Mahol
1cbd4b00b1 avcodec/mlpenc: simplify strange pointer initializations 2021-09-07 18:16:13 +02:00
Paul B Mahol
7ebeef6aff avformat/mlpdec: fix time_base for packet timestamps 2021-09-07 18:16:13 +02:00
Paul B Mahol
5d92b73c64 avcodec/mlpdec: fix integer sanitizer warning under clang
Fixes:
libavcodec/mlpdec.c:1108:37: runtime error: negation of 1 cannot be represented in type 'unsigned int'
2021-09-07 18:16:13 +02:00
James Almer
5fe648d04a libswscale/swscale: initialize all dst plane pointers in sws_receive_slice()
Fixes valgrind warnings about use of uninitialised values.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-07 09:44:58 -03:00
Peter Ross
c655a734b1 avcodec/siren: MSN Siren decoder
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Peter Ross <pross@xvid.org>
2021-09-07 18:07:11 +10:00
Paul B Mahol
b9426f371a avcodec/mlpenc: remove convoluted incomplete multiple substreams support code
It is very hard to follow data structures indirections in current code,
so just remove it for now.
2021-09-07 00:18:33 +02:00
Paul B Mahol
e811b0080e avcodec/mlpenc: use variables local to for loops 2021-09-07 00:18:33 +02:00
Limin Wang
75001ae844 avcodec/nvenc: add constrainedFrame encoding support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-09-06 14:25:26 +02:00
Limin Wang
3756525a59 avcodec/nvenc: add single slice intra refresh support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-09-06 14:13:00 +02:00
Limin Wang
e6bd5171ac avcodec/nvenc: add intra refresh support
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-09-06 14:12:57 +02:00
Limin Wang
85489e0308 avcodec/nvenc: make number of slices per frame configurable
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-09-06 13:33:53 +02:00
Anton Khirnov
60515a6d61 lavfi/vf_scale: pass the thread count to the scaler 2021-09-06 09:18:05 +02:00
Anton Khirnov
d6fdc78e91 sws: implement slice threading 2021-09-06 09:17:53 +02:00
Anton Khirnov
22c6fbc847 lavfi/vf_scale: convert to the frame-based sws API 2021-09-06 09:17:06 +02:00
Anton Khirnov
42cd64c182 sws: add a new scaling API 2021-09-06 09:16:52 +02:00
Michael Niedermayer
3c659f8618 avcodec/jpeg2000dec: Check that atom header is within bytsetream
Fixes: Infinite loop
Fixes: 36666/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5912760671141888

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>
2021-09-05 22:22:27 +02:00
Michael Niedermayer
33feb527ff avcodec/apedec: Fix 2 integer overflows in filter_3800()
Fixes: signed integer overflow: 1683879955 - -466265224 cannot be represented in type 'int'
Fixes: 37419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-6074294407921664

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>
2021-09-05 22:22:27 +02:00
Michael Niedermayer
e58692837c avcodec/xpmdec: Move allocations down after more error checks
Fixes: Timeout
Fixes: 37035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XPM_fuzzer-5142718576721920

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>
2021-09-05 22:22:05 +02:00
Michael Niedermayer
26659fe53e avcodec/argo: Move U, fix shift
Fixes: left shift of 255 by 24 places cannot be represented in type 'int'
Fixes: 37249/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5754862984888320

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>
2021-09-05 22:22:05 +02:00
Paul B Mahol
0c87b43c6c avcodec/mlp: move sync defines to common header 2021-09-05 18:12:56 +02:00
Paul B Mahol
3ea0171ea3 avcodec/mlpenc: remove frame_size array from private context
It is supposed to be used with different bit depth and/or sample rates
per each substream, but such currently not implemented feature is not
important and current state causes problems when implementing variable
restart interval to fix decoding with sample rates not multiple of 40.
2021-09-05 16:08:19 +02:00
Paul B Mahol
5852bb6b4b avcodec/mlpenc: stop using hardcoded value 2021-09-05 15:02:39 +02:00
Paul B Mahol
ac29cec312 avcodec/mlpenc: use av_shrink_packet() 2021-09-05 14:09:50 +02:00
Paul B Mahol
cfc491bf44 avcodec/mlpenc: remove no more needed goto 2021-09-05 14:09:50 +02:00
Gyan Doshi
a947098558 doc/muxers: add entry for OBU muxer 2021-09-05 16:01:02 +05:30
Paul B Mahol
4ca9877b91 avcodec/mlpenc: fix removal of packet timestamp/size from queue 2021-09-05 12:15:34 +02:00