Commit Graph

1001 Commits

Author SHA1 Message Date
kikaxa
926535469d
fix videoio/src/container_avi.cpp VideoInputStream alignment 2021-07-07 18:31:53 +03:00
Rafael H Tibães
bf489feef1
Merge pull request #20327 from tibaes:MSMF-Slow-Webcam-Startup
* fixes MSMF slow webcam startup

* add variable to change MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS at runtime
2021-06-30 22:08:24 +00:00
Alexander Alekhin
ba98cd97e5 videoio(test): skip AV1 HW tests
- FFMPEG: "[av1 @ 0000027ac07d1340] Your platform doesn't suppport hardware accelerated AV1 decoding."
2021-06-08 17:25:09 +00:00
Alexander Alekhin
1b5fe91624 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-06-08 05:04:57 +00:00
Alexander Alekhin
61e30c15a9 Merge pull request #20211 from kstuedem:fix_dshow_memory_leak 2021-06-05 16:02:12 +00:00
Kai Stüdemann
636db09d73 videoio(dshow) fix incompatible media type left set on video device 2021-06-04 10:45:39 +02:00
Kai Stüdemann
64c018507b videoio(dshow) fix memory leak 2021-06-04 10:02:48 +02:00
Alexander Alekhin
d42a2b2d16 videoio(test): bailout from VP9 tests if first frame can't be read 2021-05-28 02:05:45 +00:00
Mikhail Nikolskii
a604d44d06
Merge pull request #19755 from mikhail-nikolskiy:ffmpeg-umat
cv::UMat output/input in VideoCapture/VideoWriter (data stays in GPU memory)

* FFMPEG with UMat input/output

* OpenCL_D3D* context

* fix Linux build

* cosmetic changes

* fix build if USE_AV_HW_CODECS=0

* simplify how child context pointer stored in parent context

* QSV interop with OpenCL on Windows

* detect_msdk.cmake via pkg-config

* fix av_buffer_ref() usage

* revert windows-decode-mfx whitelisting; remove debug msg

* address review comments

* rename property to HW_ACCELERATION_USE_OPENCL

* fix issue with "cl_khr_d3d11_sharing" extension not reported by OpenCL GPU+CPU platform

* core(ocl): add OpenCL stubs for configurations without OpenCL

* videoio(ffmpeg): update #if guards

* Put OpenCL related code under HAVE_OPENCL; simplify reuse of media context from OpenCL context

* videoio(test): skip unsupported tests

- plugins don't support OpenCL/UMat yet
- change handling of *_USE_OPENCL flag

* videoio(ffmpeg): OpenCL dependency

* videoio(ffmpeg): MediaSDK/oneVPL dependency

* cleanup, logging

* cmake: fix handling of 3rdparty interface targets

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-05-14 16:48:50 +00:00
Francesco Petrogalli
7a31a6edee [build][option] Build option to disable filesystem support. 2021-05-11 12:54:54 +00:00
Maksim Shabunin
c4ca9a7bae Initial oneVPL support 2021-04-26 17:42:20 +03:00
Alexander Alekhin
e68657cdb2 Merge pull request #19934 from alalek:videoio_plugin_query_api 2021-04-24 18:13:05 +00:00
Alexander Alekhin
896bffb543 videoio(plugin): add query API for plugins 2021-04-19 14:25:45 +00:00
Alexander Alekhin
0df6159149 cmake: fix handling of VIDEOIO_ENABLE_PLUGINS=OFF 2021-04-19 02:12:25 +00:00
Giles Payne
770445ae2a Log warning that Exposure/ISO have no effect unless AutoExposure is off 2021-04-04 22:14:40 +09:00
Giles Payne
b9b65e9392 Fix Android NDK camera's color format conversions 2021-04-04 12:39:29 +09:00
Alexander Alekhin
12d80b9e64 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-01 21:48:52 +00:00
Alexander Alekhin
0ff57e3292 Merge pull request #19830 from alalek:issue_19368 2021-04-01 15:30:18 +00:00
Alexander Alekhin
d7cb2ea210 videoio(dshow): add NULL ptr check 2021-04-01 11:28:41 +00:00
Alexander Alekhin
4ae2c11520 videoio(build): eliminate inconsistent 'override' warnings 2021-04-01 09:56:21 +00:00
Alexander Alekhin
3e1673e8b2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-04-01 09:54:57 +00:00
Alexander Alekhin
6fa2bdd7f2 Merge pull request #19812 from alalek:workaround_19634 2021-03-31 22:57:15 +00:00
Alexander Alekhin
b697b3162f videoio(mjpeg): disable parallel encoder 2021-03-31 12:35:12 +00:00
Alexander Alekhin
40c0830b63 videoio(avfoundation): add getCaptureDomain() 2021-03-31 09:35:11 +00:00
Alexander Alekhin
4287961aed videoio(doc): add 'videoio_hwaccel' group, fix typos 2021-03-07 04:47:22 +00:00
Alexander Alekhin
85009800b3 videoio(docs): fixes 2021-03-07 04:26:49 +00:00
Alexander Alekhin
be24659c03 Merge pull request #19666 from alalek:update_ffmpeg_4.x 2021-03-03 13:06:44 +00:00
Alexander Alekhin
2dc157246b Merge pull request #19669 from alalek:fix_static_analyzer_issues_4.x 2021-03-03 12:26:54 +00:00
Alexander Alekhin
b6670f3ac3 ffmpeg/4.x: update FFmpeg wrapper 2021.03
- FFmpeg 4.3.2
2021-03-03 11:41:36 +00:00
Alexander Alekhin
16c3522f4e static analyzer issues 2021-03-03 09:18:40 +00:00
Alexander Alekhin
7ac6abe02a videoio(ffmpeg): fix VIDEO_ACCELERATION_ANY handling
- default is VIDEO_ACCELERATION_NONE
2021-03-03 08:44:46 +00:00
Alexander Alekhin
ec4baf337a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-03-02 21:47:19 +00:00
Alexander Alekhin
1c88e1fd19
Merge pull request #19661 from alalek:ffmpeg_fixes_3.4
* videoio(ffmpeg): eliminate MSVC build warnings

* videoio(ffmpeg): update initialization code

- repair FFmpeg logger settings on each .open() call
2021-03-02 20:41:05 +00:00
Maksim Shabunin
137ec1c846 videoio: av_frame_unref compilation fix 2021-03-02 14:20:24 +03:00
Mikhail Nikolskii
7bcb51eded
Merge pull request #19460 from mikhail-nikolskiy:videoio-hw
videoio: HW decode/encode in FFMPEG backend; new properties with support in FFMPEG/GST/MSMF

* HW acceleration in FFMPEG backend

* fixes on Windows, remove D3D9

* HW acceleration in FFMPEG backend

* fixes on Windows, remove D3D9

* improve va test

* Copyright

* check LIBAVUTIL_BUILD >= AV_VERSION_INT(55, 78, 100) // FFMPEG 3.4+

* CAP_MSMF test on .mp4

* .mp4 in test

* improve va test

* Copyright

* check LIBAVUTIL_BUILD >= AV_VERSION_INT(55, 78, 100) // FFMPEG 3.4+

* CAP_MSMF test on .mp4

* .mp4 in test

* .avi for GStreamer test

* revert changes around seek()

* cv_writer_open_with_params

* params.warnUnusedParameters

* VideoCaptureParameters in GStreamer

* open_with_params

* params->getUnused

* Reduce PSNR threshold 33->32 (other tests use 30)

* require FFMPEG 4.0+; PSNR 30 as in other tests

* GStreamer AVI-demux plugin not installed in Ubuntu test environment?

* fix build on very old ffmpeg

* fix build on very old ffmpeg

* fix build issues

* fix build issues (static_cast)

* FFMPEG built on Windows without H264 encoder?

* fix for write_nothing test on VAAPI

* fix warnings

* fix cv_writer_get_prop in plugins

* use avcodec_get_hw_frames_parameters; more robust fallback to SW codecs

* internal function hw_check_device() for device check/logging

* two separate tests for HW read and write

* image size 640x480 in encode test

* WITH_VA=ON (only .h headers used in OpenCV, no linkage dependency)

* exception on VP9 SW encoder?

* rebase master; refine info message

* videoio: fix FFmpeg standalone plugin build

* videoio(ffmpeg): eliminate MSVC build warnings

* address review comments

* videoio(hw): update videocapture_acceleration.read test

- remove parallel decoding by SW code path
- check PSNR against the original generated image

* videoio: minor fixes

* videoio(test): disable unsupported MSMF cases (SW and HW)

* videoio(test): update PSNR thresholds for HW acceleration read

* videoio(test): update debug messages

* "hw_acceleration" whitelisting parameter

* little optimization in test

* D3D11VA supports decoders, doesn't support encoders

* videoio(test): adjust PSNR threshold in write_read_position tests

* videoio(ffmpeg): fix rejecting on acceleration device name mismatch

* videoio(ffmpeg): fix compilation USE_AV_HW_CODECS=0, add more debug logging

* videoio: rework VideoAccelerationType behavior

- enum is not a bitset
- default value is backend specific
- only '_NONE' and '_ANY' may fallback on software processing
- specific H/W acceleration doesn't fallback on software processing. It fails if there is no support for specified H/W acceleration.

* videoio(test): fix for current FFmpeg wrapper

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-03-01 15:51:04 +00:00
Maksim Shabunin
90623498a2 gstreamer: add video module 2021-02-26 12:51:03 +03:00
Giles Payne
0553543e6e
Merge pull request #19597 from komakai:android-ndk-camera
Android NDK camera support

* Add native camera video backend for Android

* In the event of a "No buffer available error" wait for the appropriate callback and retry

* Fix stale context when creating a new AndroidCameraCapture

* Add property handling
2021-02-25 19:14:11 +00:00
Alexander Alekhin
37eba84056 Merge pull request #19620 from mshabunin:static-analysis-issues 2021-02-25 16:30:17 +00:00
Maksim Shabunin
b2321576bc Fixed several issues found by static analysis 2021-02-25 15:44:15 +03:00
Maksim Shabunin
dd5976162b Fixed several issues found by static analysis 2021-02-25 15:08:39 +03:00
Alexander Alekhin
7328600a7a Merge pull request #19609 from alalek:videoio_fix_gstreamer_alignment_bug 2021-02-25 07:55:38 +00:00
Alexander Alekhin
831d48d971 videoio: dump exception's messages in plugins 2021-02-24 17:48:04 +00:00
Alexander Alekhin
9d61b1e754 videoio(gstreamer): rework retrieveFrame() to handle strides 2021-02-24 09:07:57 +00:00
Alexander Alekhin
cc73c36e32 core(parallel): plugins support 2021-02-15 17:07:36 +00:00
Alexander Alekhin
d2d6eba16a cmake: fix add_apple_compiler_options() calls and OBJCXX handling 2021-02-13 18:37:30 +00:00
Olivier Le Doeuff
4c7f56263e
Merge pull request #19370 from OlivierLDff:patch-dshow-convertrgb
VideoCapture/DSHOW : Allow to set CAP_PROP_CONVERT_RGB before FOURCC/FPS/CHANNEL/WIDTH/HEIGHT.

* 🐛 cap_dshow : Allow to set CAP_PROP_CONVERT_RGB before FOURCC/FPS/CHANNEL

* 🐛 cap_dshow : fix g_VI.setConvertRGB not being called with correct boolean value on first property set.

*  cap_dshow : Test CAP_PROP_CONVERT_RGB persistence

* 🚨 Fix cast from bool to double

* 🚨 Fix trailing whitespace
2021-01-29 10:18:09 +00:00
Alexander Alekhin
e705414bea videoio(plugins): support VideoCaptureParameters, CAPTURE_API_VERSION=1
- example: ffmpeg
2021-01-28 06:09:23 +00:00
MaximMilashchenko
467870415b
Merge pull request #19394 from MaximMilashchenko:params
add video capture parameters

* add parameters

* videoio: revert unnecessary massive changes

* videoio: support capture parameters in backends API

- add tests
- FFmpeg backend sample code
- StaticBackend API is done
- support through PluginBackend API will be added later

Co-authored-by: Milashchenko <maksim.milashchenko@intel.com>
Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-01-27 22:07:43 +00:00
Alexander Smorkalov
b4e941d431 VideoCapture test to ensure that cv::VideoCapture does not share output buffers between frames. 2021-01-22 16:42:48 +03:00
Maksim Shabunin
e4e10e54df Updated more links to forum.opencv.org 2021-01-19 22:03:22 +03:00
Maksim Shabunin
f65d75f5c8 Updated more links to forum.opencv.org 2021-01-19 21:55:45 +03:00
Alexander Alekhin
5e5f47321b
Merge pull request #19320 from alalek:videoio_plugins_api_split_capture_write
videoio(plugins): split capture and writer APIs
2021-01-18 23:14:57 +03:00
Alexander Alekhin
98889e41b0 videoio: fix API/ABI_VERSION macros before plugin_api.hpp 2021-01-14 10:36:10 +00:00
Alexander Alekhin
962cdc2d98 videoio: split capture/writer plugin APIs
- migrate GStreamer backed
- migrate FFmpeg backend (with switch on legacy API)
- cv_videoio_capture_retrieve_cb_t uses Mat type instead of number of channels
2021-01-14 06:19:23 +00:00
Alexander Alekhin
71acf078ba videoio: preserve git history in plugin_*.hpp files 2021-01-13 22:37:46 +00:00
Alexander Alekhin
b3233de1c2 videoio: mv plugin_api.hpp (preserve git history) 2021-01-13 22:36:53 +00:00
Alexander Alekhin
63982d6771 videoio: preserve git history in backend_plugin_legacy.impl.hpp 2021-01-13 22:26:18 +00:00
Alexander Alekhin
2cd540b9c4 videoio: backup backend_plugin_legacy.impl.hpp 2021-01-13 22:25:19 +00:00
Alexander Alekhin
a6f7dca685 Merge pull request #19027 from alalek:videoio_plugins_api_versioning 2020-12-24 17:08:36 +00:00
Alexander Alekhin
624d532000 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-17 21:05:34 +00:00
Alexander Alekhin
48d9031efb videoio(test): add FFmpeg backend check
- configure through OPENCV_TEST_VIDEOIO_BACKEND_REQUIRE_FFMPEG environment variable
2020-12-14 18:29:52 +00:00
Alexander Alekhin
dd1494eebf Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-11 19:27:20 +00:00
Maksim Shabunin
55a2bcbe15 videoio: turn off syncronized sink in GStreamer 2020-12-10 16:07:28 +03:00
Alexander Alekhin
de385009ae Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-09 18:09:00 +00:00
Alexander Alekhin
962f5c9b82 videoio(test): skip GStreamer in 'frame_timestamp' tests
- CAP_PROP_POS_MSEC is not reliable
2020-12-07 21:35:01 +00:00
Alexander Alekhin
9e6b7f5dc1 videoio: plugins API versioning 2020-12-06 16:19:13 +00:00
joshdoe
541a09b7ac
Merge pull request #18535 from joshdoe:gray16_gstreamer_writing
Add CV_16UC1/GRAY16_LE support to GStreamer backend for VideoWriter

* videoio(backend): add Writer_open_with_params to plugin API

This will allow arbitrary parameters to be passed to plugin backends

* videoio(gstreamer): add GRAY16_LE/CV_16UC1 writing support to GStreamer

This introduces a new property VIDEOWRITER_PROP_DEPTH, which defaults to
CV_8U, but for GStreamer can be set to CV_16U.

Also, fix another test to not fail if plugin isn't found, copying logic
from the read_write test.

* videoio(plugin): fix handling plugins with previous API level

* videoio: coding style

* fix warning
2020-12-05 21:28:07 +00:00
Alexander Alekhin
6fdb7aee84 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-12-04 18:26:58 +00:00
Jaime Rivera
2fa624aef0 Add Timestamps to MSMF Video Capture by index
Enable frame timestamp tests for MSMF

Add functional test for camera live timestamps

Remove trailing whitespace

Add timestamp test to all functional tests. Protect div by 0

Add Timestamps to MSMF Video Capture by index
2020-12-02 16:36:09 -05:00
Alexander Smorkalov
24fac5f56d Added test for VideoCapture CAP_PROP_FRAME_MSEC option.
- Suppressed FFMPEG + h264, h265 as it does not pass tests with CI configuration.
- Suppressed MediaFoundation backend as it always returns zero for now.
2020-11-30 20:08:21 +03:00
Alexander Alekhin
2155296a13 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-27 14:08:06 +00:00
Alexander Alekhin
0800f6f91b videoio: add missing getCaptureDomain() methods 2020-11-24 22:26:10 +00:00
Alexander Alekhin
b4b2a276c8 Merge pull request #18756 from andy-held:add_ueye_capture 2020-11-16 22:28:54 +00:00
Alexander Alekhin
56074c2eb3 Merge pull request #18763 from GArik:orbbec 2020-11-16 09:12:25 +00:00
Alexander Alekhin
389495f76a Merge pull request #18499 from RidgeRun:optional-gstreamer-mainloop 2020-11-13 21:07:30 +00:00
Andreas Franek
a3f3fbe05d add rudimentary support for uEye cameras
uEye are cameras from IDS, c.f. https://en.ids-imaging.com/
Supports driver version 4.94 and up currently, since the event system was overhauled there.
Supports setting/getting the properties: fps,width,height
2020-11-13 18:38:51 +01:00
Igor Murzov
011d8e80d8 videoio: Support Orbbec Astra 3D cameras using OpenNI2 API
Only depth sensor is supported. Color sensor is accessible as a
regular UVC camera.
2020-11-13 16:08:06 +03:00
Alexander Alekhin
7459613623 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-11-05 18:59:10 +00:00
Alexander Alekhin
39ecd96b09 Merge pull request #18736 from mshabunin:mfx-frame-size-34 2020-11-05 17:00:35 +00:00
Maksim Shabunin
21a8d9569d videoio: added frameSize to MFX capture 2020-11-05 17:40:48 +03:00
Jack·Boos·Yu
56d2b7137c
Merge pull request #18658 from JackBoosY:master
* Fix cmake configure error

* judge the cmake version

* Add comments
2020-10-29 13:50:25 +00:00
Nikolai
b87f7a625e
Merge pull request #18426 from Varvrar:add-HEVC-codec-iOS-Mac
* add HEVC(H.265) codec to iOS,Mac VideoWriter

* Update cap_avfoundation_mac.mm

add CV_FOURCC('h','v','c','1') for HEVC codec

* Update cap_avfoundation.mm

add CV_FOURCC('h','v','c','1') for HEVC codec

* feat: add availability check for HEVC codec on iOS and OS X

Co-authored-by: Vadim Levin <vadim.levin@xperience.ai>
2020-10-19 17:39:19 +00:00
Alexander Alekhin
39d5e14c1f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-10-07 09:09:37 +00:00
Alexander Alekhin
f2bb3d0d80 videoio(dc1394_v2): ensure variable initialization 2020-10-06 21:00:36 +00:00
Michael Gruner
e3da18121f Enable a GMainLoop when capturing using GStreamer
A running GMainLoop processes many events on the GLib/GStreamer
world. While some things may work without it, many others wont.
Examples of these are signals, timers and many other source
events. The problem becomes more concerning by the fact that
some GStreamer elements rely on signals to work.

This commit allows the user to specify an OpenCV option to
start a main loop, if needed. Since the loop blocks, this is
done in a separate thread.
2020-10-01 19:48:15 -06:00
Alexander Alekhin
f6901ab877 videoio: fix plugins build with enabled Eigen 2020-09-25 13:37:07 +00:00
Maksim Shabunin
688aea6bec videoio: naming MFX tests 2020-09-23 17:36:43 +03:00
Alexander Alekhin
f52a2cf5e1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-19 17:03:08 +00:00
Takehiro Kajihara
8c44b8306b Fix typo in videoio doc 2020-09-18 07:34:10 +09:00
extrowerk
da0fd62c23
Haiku: build fix
Haiku is POSIX compatible
2020-09-07 21:07:38 +02:00
Alexander Alekhin
f6795d75a6 videoio: repair build of FFmpeg windows wrapper 2020-09-04 15:36:10 +00:00
Maksim Shabunin
2dfb163281 videoio: reduce min libavcodec version 2020-08-27 13:25:04 +03:00
Vadim Levin
f7e524cbe6 fix: libavcodec version check for AVDISCARD_NONINTRA
- AVDISCARD_NONINTRA flag is supported only for FFMPEG libraries pack
2020-08-24 23:12:49 +03:00
Vadim Levin
e503ac508e fix: libavcodec version check for AV_CODEC_FLAG_GLOBAL_HEADER 2020-08-24 23:07:25 +03:00
Vadim Levin
458bd1652d
Merge pull request #18146 from VadimLevin:dev/vlevin/ffmpeg-remove-obsolte-versions-support
Remove obsolete FFMPEG versions support

* refactor: removed obsolete FFMPEG version support

 - Oldest available version via official FFMPEG repository mirror has tag v.0.5
 LIBAVFORMAT version for this tag is 52.31.0

* refactor: prefer std::min function to MIN macro

* refactor: use appropriate macro instead of manual version calculation

* refactor: remove macros for versions prior 0.5.15 release

* refactor: remove libavcodec macros for versions < 54.35.1 (default to Ubuntu 14.04)

* refactor: remove libavformat macro for versions < 54.20.4 (default ubuntu 14.04)

* refactor: remove libavutil macro for versions < 52.3.0 (default ubuntu 14.04)

* refactor: remove missed macros for libavcodec and libavformat

* refactor: remove unused _opencv_ffmpeg_free function

* build: add FFMPEG libraries versions checks

 - Add verbose message about what FFMPEG libraries are missing.
 - Add minimal versions check set to libav 9.20 release (default ubuntu 14.04) and FFMPEG 1.1.16 release.
   If the check is failed CMake produces user-friendly message instead of build error.

* fix: libavcodec version guard for AVDISCARD_NONINTRA

* fix: libav check of libavcodec version guard for AVDISCARD_NONINTRA

* fix: version check for AV_CODEC_FLAG_GLOBAL_HEADER

* fix: missing FFMPEG libraries output
2020-08-24 18:39:05 +00:00
Alexander Alekhin
f6c2bf21c8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-08-21 19:57:34 +00:00
Tomoaki Teshima
cc769ff19d fix build error on odroid-n2-plus 2020-08-17 21:24:54 +09:00
Peter Rekdal Sunde
760e7e8efa Add support for using new ffmpeg encoding API when writing a video. 2020-08-06 23:43:47 +02:00
Alexander Alekhin
11eff8bae0 Merge pull request #18014 from lpea:fix_build_with_aravis 2020-08-03 18:26:53 +00:00
Alexander Alekhin
1192734131 Merge pull request #17882 from komakai:objc-contrib-wrappers 2020-08-03 11:10:37 +00:00