├── .clang-format ├── .cmake-format ├── .gitattributes ├── .github ├── CODEOWNERS ├── pull_request_template.md └── workflows │ ├── acceptance.yml │ ├── bdba.yml │ ├── bdba │ ├── Dockerfile.ubuntu.bdba │ └── bdba.py │ ├── cmake.yml │ ├── coverity.yml │ ├── coverity │ ├── Dockerfile.ubuntu.coverity │ ├── cmdline.py │ ├── coverity.py │ └── packages.txt │ ├── daily-validation.yml │ ├── diff.yml │ ├── diff │ └── bom_diff.py │ ├── hadolint.yml │ ├── ipldt.yml │ ├── ipldt │ └── Dockerfile.ubuntu.ipldt │ ├── lint.yml │ ├── lint │ └── Dockerfile.ubuntu.lint │ ├── mcafee.yml │ ├── performance.yml │ ├── performance │ ├── Dockerfile │ ├── MSPerf.py │ └── performance.sh │ ├── pr-draft.yml │ ├── pr-ready.yml │ ├── scorecard.yml │ ├── scorecard │ ├── check.py │ └── config.yml │ ├── sdl.yml │ ├── sdl │ ├── Dockerfile.ubuntu.sdl │ └── evidence_upload.py │ ├── setup-variables.yml │ ├── specification.yml │ ├── sscb.yml │ ├── sscb │ ├── Dockerfile.ubuntu.sscb │ ├── config.yaml │ └── tool.py │ ├── summary.yml │ ├── summary │ ├── Dockerfile.ubuntu.summary │ ├── filter_xunit.py │ ├── summarize_testing.py │ └── tools.sh │ ├── trivy.yml │ └── trivy │ └── csv.tpl ├── .gitignore ├── .gitlint ├── .hadolint.yaml ├── .pre-commit-config.yaml ├── .pylintrc ├── .style.yapf ├── .trivyignore.yaml ├── .yamllint.yaml ├── CHANGELOG.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── CPPLINT.cfg ├── INSTALL.md ├── LICENSE ├── README.md ├── SECURITY.md ├── api ├── .clang-format ├── CMakeLists.txt ├── CPPLINT.cfg ├── strings │ ├── strings.csv │ └── strings.md ├── tests │ ├── abi │ │ ├── abi_test_gen.py │ │ ├── check_missing_structs.py │ │ ├── check_pack.py │ │ └── mfx_static_assert_structs.cpp │ ├── compile_headers │ │ ├── removed_api.h │ │ ├── sdk_headers.inc │ │ ├── test.c │ │ └── test.cpp │ ├── doc_examples │ │ ├── dummy_impl.c │ │ └── main.c │ └── docker │ │ ├── Dockerfile.clang │ │ └── Dockerfile.gcc └── vpl │ ├── mfx.h │ ├── mfxadapter.h │ ├── mfxbrc.h │ ├── mfxcamera.h │ ├── mfxcommon.h │ ├── mfxdefs.h │ ├── mfxdispatcher.h │ ├── mfxdispatcherprefixedfunctions.h │ ├── mfxencodestats.h │ ├── mfximplcaps.h │ ├── mfxjpeg.h │ ├── mfxmemory.h │ ├── mfxmvc.h │ ├── mfxpcp.h │ ├── mfxsession.h │ ├── mfxstructures.h │ ├── mfxsurfacepool.h │ ├── mfxvideo++.h │ ├── mfxvideo.h │ ├── mfxvp8.h │ └── preview │ ├── README.txt │ └── legacy │ ├── README.txt │ └── mfxvideo++.h ├── bandit.yaml ├── cmake ├── CompileOptions.cmake ├── FindVPL.cmake ├── InstallDirs.cmake └── PackageTarget.cmake ├── doc ├── images │ ├── cs_bufer_usage.jpg │ ├── cs_control_flow.jpg │ ├── cs_control_flow_enc.jpg │ ├── cs_control_flow_sync.jpg │ ├── cs_cs_pipeline.jpg │ ├── cs_e2e.jpg │ ├── cs_enc.jpg │ ├── cs_lat_chart1.jpg │ ├── cs_lat_chart2.jpg │ ├── cs_lat_chart3.jpg │ ├── cs_org_pipeline.jpg │ ├── cs_surface_pool_utilization.jpg │ ├── oneapi-logo.png │ ├── par_enc_1x2.jpg │ ├── par_enc_2x2.jpg │ ├── trace_e2e_option.jpg │ └── trace_enc_option.jpg ├── multi-adapter-guide.md ├── smt-cascade-scaling-readme.md ├── smt-parallel-encoding-readme.md ├── smt-tracer-readme.md ├── spec │ ├── Doxyfile │ ├── README.md │ ├── build-spec.py │ ├── common_conf.py │ ├── docker │ │ └── Dockerfile.build │ ├── element_conf.py │ ├── install.sh │ ├── requirements.txt │ ├── source │ │ ├── API_ref │ │ │ ├── VPL_api_ref.rst │ │ │ ├── VPL_defines.rst │ │ │ ├── VPL_disp_api.rst │ │ │ ├── VPL_disp_api_def.rst │ │ │ ├── VPL_disp_api_enum.rst │ │ │ ├── VPL_disp_api_func.rst │ │ │ ├── VPL_disp_api_struct.rst │ │ │ ├── VPL_enums.rst │ │ │ ├── VPL_func_adapters.rst │ │ │ ├── VPL_func_capabilities.rst │ │ │ ├── VPL_func_mem.rst │ │ │ ├── VPL_func_session.rst │ │ │ ├── VPL_func_vid_decode.rst │ │ │ ├── VPL_func_vid_decode_vpp.rst │ │ │ ├── VPL_func_vid_encode.rst │ │ │ ├── VPL_func_vid_vpp.rst │ │ │ ├── VPL_func_vidcore.rst │ │ │ ├── VPL_functions.rst │ │ │ ├── VPL_guids.rst │ │ │ ├── VPL_ref_types.rst │ │ │ ├── VPL_structs.rst │ │ │ ├── VPL_structs_camera.rst │ │ │ ├── VPL_structs_cross_component.rst │ │ │ ├── VPL_structs_decode.rst │ │ │ ├── VPL_structs_decode_vpp.rst │ │ │ ├── VPL_structs_encode.rst │ │ │ ├── VPL_structs_impl_manage.rst │ │ │ ├── VPL_structs_memory.rst │ │ │ ├── VPL_structs_protected.rst │ │ │ ├── VPL_structs_type.rst │ │ │ └── VPL_structs_vpp.rst │ │ ├── Experimental.rst │ │ ├── VPL_acronyms.rst │ │ ├── VPL_change_log.rst │ │ ├── VPL_deprecation.rst │ │ ├── VPL_intel_media_sdk.rst │ │ ├── VPL_summary.rst │ │ ├── Versioning.rst │ │ ├── _templates │ │ │ └── layout.html │ │ ├── appendix │ │ │ ├── VPL_apnds_a.rst │ │ │ ├── VPL_apnds_b.rst │ │ │ ├── VPL_apnds_c.rst │ │ │ ├── VPL_apnds_d.rst │ │ │ ├── VPL_apnds_e.rst │ │ │ ├── VPL_apnds_f.rst │ │ │ └── index.rst │ │ ├── architecture │ │ │ ├── VPL_decoding.rst │ │ │ ├── VPL_decoding_vpp.rst │ │ │ ├── VPL_encoding.rst │ │ │ ├── VPL_processing.rst │ │ │ └── index.rst │ │ ├── conf.py │ │ ├── images │ │ │ ├── extbrc_async.png │ │ │ ├── frame_cmplx.png │ │ │ ├── lookahead_qp_calulation_algo.png │ │ │ ├── sdk_function_naming_convention.png │ │ │ └── vpp_region_of_interest_operation.png │ │ ├── index.rst │ │ ├── programming_guide │ │ │ ├── VPL_prg_config.rst │ │ │ ├── VPL_prg_decoding.rst │ │ │ ├── VPL_prg_encoding.rst │ │ │ ├── VPL_prg_err.rst │ │ │ ├── VPL_prg_frame.rst │ │ │ ├── VPL_prg_hw.rst │ │ │ ├── VPL_prg_mem.rst │ │ │ ├── VPL_prg_session.rst │ │ │ ├── VPL_prg_stc.rst │ │ │ ├── VPL_prg_surface_sharing.rst │ │ │ ├── VPL_prg_transcoding.rst │ │ │ ├── VPL_prg_vpp.rst │ │ │ └── index.rst │ │ └── snippets │ │ │ ├── .clang-format │ │ │ ├── CPPLINT.cfg │ │ │ ├── appnd_b.c │ │ │ ├── appnd_e.c │ │ │ ├── appnd_f.c │ │ │ ├── prg_config.cpp │ │ │ ├── prg_decoding.c │ │ │ ├── prg_decoding_vpp.c │ │ │ ├── prg_disp.c │ │ │ ├── prg_encoding.c │ │ │ ├── prg_err.c │ │ │ ├── prg_hw.cpp │ │ │ ├── prg_mem.c │ │ │ ├── prg_session.cpp │ │ │ ├── prg_surface_sharing.cpp │ │ │ ├── prg_transcoding.c │ │ │ └── prg_vpp.c │ ├── spelling_wordlist.txt │ └── ubuntu-packages.txt └── surface_sharing_apis_overview.md ├── env ├── CMakeLists.txt ├── cmd │ ├── vars.bat │ └── varsxx.bat.in └── sh │ └── vars.sh.in ├── examples ├── CMakeLists.txt ├── CPPLINT.cfg ├── README.md ├── api1x_core │ ├── legacy-decode │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── README.md │ │ └── src │ │ │ ├── legacy-decode.cpp │ │ │ └── util.hpp │ ├── legacy-encode │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ │ ├── legacy-encode.cpp │ │ │ └── util.hpp │ └── legacy-vpp │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── README.md │ │ └── src │ │ ├── legacy-vpp.cpp │ │ └── util.hpp ├── api2x │ ├── hello-decode │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ │ ├── hello-decode.cpp │ │ │ └── util.hpp │ ├── hello-decvpp │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ │ ├── hello-decvpp.cpp │ │ │ └── util.hpp │ ├── hello-encode-jpeg │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ │ ├── hello-encode-jpeg.cpp │ │ │ └── util.hpp │ ├── hello-encode │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ │ ├── hello-encode.cpp │ │ │ └── util.hpp │ ├── hello-sharing-dx11 │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ ├── include │ │ │ ├── device-d3d11.h │ │ │ └── util.hpp │ │ └── src │ │ │ ├── device-d3d11.cpp │ │ │ ├── hello-sharing-dx11-export.cpp │ │ │ └── hello-sharing-dx11-import.cpp │ ├── hello-sharing-ocl │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ ├── include │ │ │ ├── device-d3d11.h │ │ │ ├── device-ocl.h │ │ │ └── util.h │ │ └── src │ │ │ ├── device-d3d11.cpp │ │ │ ├── device-ocl.cpp │ │ │ ├── hello-sharing-ocl-export.cpp │ │ │ ├── hello-sharing-ocl-import.cpp │ │ │ └── util.cpp │ ├── hello-sharing-vaapi │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ ├── include │ │ │ ├── device-vaapi.h │ │ │ ├── util.hpp │ │ │ └── vasurface_wrapper.h │ │ └── src │ │ │ ├── device-vaapi.cpp │ │ │ ├── hello-sharing-vaapi-export.cpp │ │ │ └── hello-sharing-vaapi-import.cpp │ ├── hello-transcode │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── README.md │ │ └── src │ │ │ ├── hello-transcode.cpp │ │ │ └── util.hpp │ └── hello-vpp │ │ ├── CMakeLists.txt │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ ├── hello-vpp.cpp │ │ └── util.hpp ├── content │ ├── cars_320x240.bgra │ ├── cars_320x240.h264 │ ├── cars_320x240.h265 │ ├── cars_320x240.i420 │ ├── cars_320x240.mjpeg │ ├── cars_320x240.nv12 │ └── cars_320x240.y8 ├── interop │ └── vpl-infer │ │ ├── CMakeLists.txt │ │ ├── CPPLINT.cfg │ │ ├── License.txt │ │ ├── PreLoad.cmake │ │ ├── README.md │ │ └── src │ │ ├── util.hpp │ │ └── vpl-infer.cpp └── tutorials │ └── 01_transition │ ├── License.txt │ ├── MediaSDK │ ├── CMakeLists.txt │ └── cmake │ │ └── FindMFX.cmake │ ├── README.md │ ├── VPL │ └── CMakeLists.txt │ └── src │ └── transition.cpp ├── libvpl ├── CMakeLists.txt ├── CPPLINT.cfg ├── cmake │ ├── VPLConfig.cmake.in │ └── VPLConfigVersion.cmake.in ├── pkgconfig │ └── vpl.pc.in ├── src │ ├── linux │ │ ├── device_ids.h │ │ ├── libvpl.map │ │ ├── mfxloader.cpp │ │ ├── mfxloader.h │ │ └── mfxvideo_functions.h │ ├── mfx_config_interface │ │ ├── .clang-format │ │ ├── mfx_config_interface.cpp │ │ ├── mfx_config_interface.h │ │ └── mfx_config_interface_string_api.cpp │ ├── mfx_dispatcher_vpl.cpp │ ├── mfx_dispatcher_vpl.h │ ├── mfx_dispatcher_vpl_config.cpp │ ├── mfx_dispatcher_vpl_loader.cpp │ ├── mfx_dispatcher_vpl_log.cpp │ ├── mfx_dispatcher_vpl_log.h │ ├── mfx_dispatcher_vpl_lowlatency.cpp │ ├── mfx_dispatcher_vpl_msdk.cpp │ ├── mfx_dispatcher_vpl_win.h │ └── windows │ │ ├── libmfx.def │ │ ├── main.cpp │ │ ├── mfx_critical_section.cpp │ │ ├── mfx_critical_section.h │ │ ├── mfx_dispatcher.cpp │ │ ├── mfx_dispatcher.h │ │ ├── mfx_dispatcher_defs.h │ │ ├── mfx_dispatcher_log.cpp │ │ ├── mfx_dispatcher_log.h │ │ ├── mfx_driver_store_loader.cpp │ │ ├── mfx_driver_store_loader.h │ │ ├── mfx_dxva2_device.cpp │ │ ├── mfx_dxva2_device.h │ │ ├── mfx_exposed_functions_list.h │ │ ├── mfx_function_table.cpp │ │ ├── mfx_library_iterator.cpp │ │ ├── mfx_library_iterator.h │ │ ├── mfx_load_dll.cpp │ │ ├── mfx_load_dll.h │ │ ├── mfx_vector.h │ │ ├── mfx_win_reg_key.cpp │ │ ├── mfx_win_reg_key.h │ │ ├── mfxvideo++.h │ │ └── version.rc.in └── test │ ├── CMakeLists.txt │ ├── diagnostic │ ├── CMakeLists.txt │ ├── mfxinit-test │ │ ├── CMakeLists.txt │ │ └── main.cpp │ └── vpl-timing │ │ ├── CMakeLists.txt │ │ └── src │ │ ├── vpl-timing.cpp │ │ └── vpl-timing.h │ ├── ext │ └── googletest │ │ ├── .clang-format │ │ ├── .gitignore │ │ ├── BUILD.bazel │ │ ├── CMakeLists.txt │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── WORKSPACE │ │ ├── googlemock │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── cmake │ │ │ ├── gmock.pc.in │ │ │ └── gmock_main.pc.in │ │ ├── docs │ │ │ └── README.md │ │ ├── include │ │ │ └── gmock │ │ │ │ ├── gmock-actions.h │ │ │ │ ├── gmock-cardinalities.h │ │ │ │ ├── gmock-function-mocker.h │ │ │ │ ├── gmock-matchers.h │ │ │ │ ├── gmock-more-actions.h │ │ │ │ ├── gmock-more-matchers.h │ │ │ │ ├── gmock-nice-strict.h │ │ │ │ ├── gmock-spec-builders.h │ │ │ │ ├── gmock.h │ │ │ │ └── internal │ │ │ │ ├── custom │ │ │ │ ├── README.md │ │ │ │ ├── gmock-generated-actions.h │ │ │ │ ├── gmock-matchers.h │ │ │ │ └── gmock-port.h │ │ │ │ ├── gmock-internal-utils.h │ │ │ │ ├── gmock-port.h │ │ │ │ └── gmock-pp.h │ │ ├── src │ │ │ ├── gmock-all.cc │ │ │ ├── gmock-cardinalities.cc │ │ │ ├── gmock-internal-utils.cc │ │ │ ├── gmock-matchers.cc │ │ │ ├── gmock-spec-builders.cc │ │ │ ├── gmock.cc │ │ │ └── gmock_main.cc │ │ └── test │ │ │ ├── BUILD.bazel │ │ │ ├── gmock-actions_test.cc │ │ │ ├── gmock-cardinalities_test.cc │ │ │ ├── gmock-function-mocker_test.cc │ │ │ ├── gmock-internal-utils_test.cc │ │ │ ├── gmock-matchers-arithmetic_test.cc │ │ │ ├── gmock-matchers-comparisons_test.cc │ │ │ ├── gmock-matchers-containers_test.cc │ │ │ ├── gmock-matchers-misc_test.cc │ │ │ ├── gmock-matchers_test.h │ │ │ ├── gmock-more-actions_test.cc │ │ │ ├── gmock-nice-strict_test.cc │ │ │ ├── gmock-port_test.cc │ │ │ ├── gmock-pp-string_test.cc │ │ │ ├── gmock-pp_test.cc │ │ │ ├── gmock-spec-builders_test.cc │ │ │ ├── gmock_all_test.cc │ │ │ ├── gmock_ex_test.cc │ │ │ ├── gmock_leak_test.py │ │ │ ├── gmock_leak_test_.cc │ │ │ ├── gmock_link2_test.cc │ │ │ ├── gmock_link_test.cc │ │ │ ├── gmock_link_test.h │ │ │ ├── gmock_output_test.py │ │ │ ├── gmock_output_test_.cc │ │ │ ├── gmock_output_test_golden.txt │ │ │ ├── gmock_stress_test.cc │ │ │ ├── gmock_test.cc │ │ │ └── gmock_test_utils.py │ │ └── googletest │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── cmake │ │ ├── Config.cmake.in │ │ ├── gtest.pc.in │ │ ├── gtest_main.pc.in │ │ ├── internal_utils.cmake │ │ └── libgtest.la.in │ │ ├── docs │ │ └── README.md │ │ ├── include │ │ └── gtest │ │ │ ├── gtest-assertion-result.h │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-matchers.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal │ │ │ ├── custom │ │ │ ├── README.md │ │ │ ├── gtest-port.h │ │ │ ├── gtest-printers.h │ │ │ └── gtest.h │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port-arch.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ └── gtest-type-util.h │ │ ├── samples │ │ ├── prime_tables.h │ │ ├── sample1.cc │ │ ├── sample1.h │ │ ├── sample10_unittest.cc │ │ ├── sample1_unittest.cc │ │ ├── sample2.cc │ │ ├── sample2.h │ │ ├── sample2_unittest.cc │ │ ├── sample3-inl.h │ │ ├── sample3_unittest.cc │ │ ├── sample4.cc │ │ ├── sample4.h │ │ ├── sample4_unittest.cc │ │ ├── sample5_unittest.cc │ │ ├── sample6_unittest.cc │ │ ├── sample7_unittest.cc │ │ ├── sample8_unittest.cc │ │ └── sample9_unittest.cc │ │ ├── src │ │ ├── gtest-all.cc │ │ ├── gtest-assertion-result.cc │ │ ├── gtest-death-test.cc │ │ ├── gtest-filepath.cc │ │ ├── gtest-internal-inl.h │ │ ├── gtest-matchers.cc │ │ ├── gtest-port.cc │ │ ├── gtest-printers.cc │ │ ├── gtest-test-part.cc │ │ ├── gtest-typed-test.cc │ │ ├── gtest.cc │ │ └── gtest_main.cc │ │ └── test │ │ ├── BUILD.bazel │ │ ├── googletest-break-on-failure-unittest.py │ │ ├── googletest-break-on-failure-unittest_.cc │ │ ├── googletest-catch-exceptions-test.py │ │ ├── googletest-catch-exceptions-test_.cc │ │ ├── googletest-color-test.py │ │ ├── googletest-color-test_.cc │ │ ├── googletest-death-test-test.cc │ │ ├── googletest-death-test_ex_test.cc │ │ ├── googletest-env-var-test.py │ │ ├── googletest-env-var-test_.cc │ │ ├── googletest-failfast-unittest.py │ │ ├── googletest-failfast-unittest_.cc │ │ ├── googletest-filepath-test.cc │ │ ├── googletest-filter-unittest.py │ │ ├── googletest-filter-unittest_.cc │ │ ├── googletest-global-environment-unittest.py │ │ ├── googletest-global-environment-unittest_.cc │ │ ├── googletest-json-outfiles-test.py │ │ ├── googletest-json-output-unittest.py │ │ ├── googletest-list-tests-unittest.py │ │ ├── googletest-list-tests-unittest_.cc │ │ ├── googletest-listener-test.cc │ │ ├── googletest-message-test.cc │ │ ├── googletest-options-test.cc │ │ ├── googletest-output-test-golden-lin.txt │ │ ├── googletest-output-test.py │ │ ├── googletest-output-test_.cc │ │ ├── googletest-param-test-invalid-name1-test.py │ │ ├── googletest-param-test-invalid-name1-test_.cc │ │ ├── googletest-param-test-invalid-name2-test.py │ │ ├── googletest-param-test-invalid-name2-test_.cc │ │ ├── googletest-param-test-test.cc │ │ ├── googletest-param-test-test.h │ │ ├── googletest-param-test2-test.cc │ │ ├── googletest-port-test.cc │ │ ├── googletest-printers-test.cc │ │ ├── googletest-setuptestsuite-test.py │ │ ├── googletest-setuptestsuite-test_.cc │ │ ├── googletest-shuffle-test.py │ │ ├── googletest-shuffle-test_.cc │ │ ├── googletest-test-part-test.cc │ │ ├── googletest-throw-on-failure-test.py │ │ ├── googletest-throw-on-failure-test_.cc │ │ ├── googletest-uninitialized-test.py │ │ ├── googletest-uninitialized-test_.cc │ │ ├── gtest-typed-test2_test.cc │ │ ├── gtest-typed-test_test.cc │ │ ├── gtest-typed-test_test.h │ │ ├── gtest-unittest-api_test.cc │ │ ├── gtest_all_test.cc │ │ ├── gtest_assert_by_exception_test.cc │ │ ├── gtest_environment_test.cc │ │ ├── gtest_help_test.py │ │ ├── gtest_help_test_.cc │ │ ├── gtest_json_test_utils.py │ │ ├── gtest_list_output_unittest.py │ │ ├── gtest_list_output_unittest_.cc │ │ ├── gtest_main_unittest.cc │ │ ├── gtest_no_test_unittest.cc │ │ ├── gtest_pred_impl_unittest.cc │ │ ├── gtest_premature_exit_test.cc │ │ ├── gtest_prod_test.cc │ │ ├── gtest_repeat_test.cc │ │ ├── gtest_skip_check_output_test.py │ │ ├── gtest_skip_environment_check_output_test.py │ │ ├── gtest_skip_in_environment_setup_test.cc │ │ ├── gtest_skip_test.cc │ │ ├── gtest_sole_header_test.cc │ │ ├── gtest_stress_test.cc │ │ ├── gtest_test_macro_stack_footprint_test.cc │ │ ├── gtest_test_utils.py │ │ ├── gtest_testbridge_test.py │ │ ├── gtest_testbridge_test_.cc │ │ ├── gtest_throw_on_failure_ex_test.cc │ │ ├── gtest_unittest.cc │ │ ├── gtest_xml_outfile1_test_.cc │ │ ├── gtest_xml_outfile2_test_.cc │ │ ├── gtest_xml_outfiles_test.py │ │ ├── gtest_xml_output_unittest.py │ │ ├── gtest_xml_output_unittest_.cc │ │ ├── gtest_xml_test_utils.py │ │ ├── production.cc │ │ └── production.h │ ├── runtimes │ ├── stub-nofn │ │ ├── CMakeLists.txt │ │ └── src │ │ │ └── windows │ │ │ └── libvplminrt-nofn.def │ ├── stub │ │ ├── CMakeLists.txt │ │ ├── src │ │ │ ├── caps.h │ │ │ ├── caps_dec.h │ │ │ ├── caps_dec_none.h │ │ │ ├── caps_enc.h │ │ │ ├── caps_enc_none.h │ │ │ ├── caps_surface.h │ │ │ ├── caps_vpp.h │ │ │ ├── caps_vpp_none.h │ │ │ ├── config.cpp │ │ │ ├── config.h │ │ │ ├── stubs.cpp │ │ │ └── windows │ │ │ │ └── libvplminrt.def │ │ └── version.txt │ └── stub1x │ │ └── CMakeLists.txt │ └── unit │ ├── CMakeLists.txt │ └── src │ ├── dispatcher_common.cpp │ ├── dispatcher_common.h │ ├── dispatcher_common_multiprop.cpp │ ├── dispatcher_enum_impls.cpp │ ├── dispatcher_gpu.cpp │ ├── dispatcher_gpu_stringapi.cpp │ ├── dispatcher_low_latency.cpp │ ├── dispatcher_stub.cpp │ ├── dispatcher_stub_propquery.cpp │ ├── dispatcher_stub_stringapi.cpp │ ├── dispatcher_sw.cpp │ ├── dispatcher_sw_multiprop.cpp │ ├── dispatcher_util.cpp │ ├── experimental_api.cpp │ ├── legacycpp-session-test-1x.cpp │ ├── legacycpp-session-test-2x.cpp │ ├── legacycpp-session-test.cpp │ ├── main.cpp │ ├── session-test.cpp │ └── unit_api.h ├── script ├── Dockerfile.rhel.build ├── Dockerfile.ubuntu.build ├── README.md ├── bootstrap ├── bootstrap.bat ├── build ├── build.bat ├── gitlint │ ├── custom_gitlint_rules.py │ └── verbs.txt ├── install ├── install.bat ├── lint ├── lint.bat ├── test └── test.bat ├── third-party-programs.txt └── version.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # do not rely on windows users to remember to set core.autocrlf=true 2 | * text=auto 3 | 4 | # force line endings for scripts 5 | *.sh eol=lf 6 | *.sh.in eol=lf 7 | *.py eol=lf 8 | script/* eol=lf 9 | *.bat eol=crlf 10 | 11 | # force lf endings for yaml 12 | *.yaml eol=lf 13 | *.yml eol=lf 14 | .clang-format eol=lf 15 | 16 | # force encoding for json 17 | *.json encoding=utf-8 18 | 19 | # force lf endings for CMake files 20 | CMakeLists.* eol=lf 21 | *.cmake eol=lf 22 | *.cmake.in eol=lf 23 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Each line is a file pattern followed by one or more owners. 2 | # last matching pattern takes the most precedence. 3 | 4 | * @intel-innersource/onevpl-maintainer 5 | 6 | # Specification 7 | /api/vpl/ @varistar @jonrecker @mgonchar @tletnes @intel-innersource/onevpl-maintainer 8 | /api/tests/ @varistar @jonrecker @mgonchar @tletnes @intel-innersource/onevpl-maintainer 9 | /doc/spec/ @varistar @jonrecker @mgonchar @tletnes @intel-innersource/onevpl-maintainer 10 | 11 | # Third party programs 12 | /third-party-programs.txt @akwrobel @tletnes -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Issue 2 | 3 | 6 | 7 | 8 | ## Solution 9 | 10 | 11 | 12 | ## How Tested 13 | 14 | 15 | -------------------------------------------------------------------------------- /.github/workflows/bdba/Dockerfile.ubuntu.bdba: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 8 | 9 | WORKDIR /setup 10 | 11 | ARG DEBIAN_FRONTEND=noninteractive 12 | ARG GROUP_ID 13 | ARG USER_ID 14 | 15 | RUN if [ -z "$GROUP_ID" ]; then echo \ 16 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 17 | exit 1; fi 18 | RUN if [ -z "$USER_ID" ]; then echo \ 19 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 20 | exit 1; fi 21 | 22 | RUN apt-get update && apt-get install -y --no-install-recommends \ 23 | python3 \ 24 | python3-requests \ 25 | && \ 26 | rm -rf /var/lib/apt/lists/* 27 | 28 | # Use non-root user 29 | RUN groupadd --system --gid ${GROUP_ID} appgroup \ 30 | && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 31 | USER appuser 32 | 33 | HEALTHCHECK CMD python3 --version || exit 1 34 | -------------------------------------------------------------------------------- /.github/workflows/coverity/Dockerfile.ubuntu.coverity: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | ARG DOCKER_REGISTRY 8 | 9 | FROM ${DOCKER_REGISTRY}maven:3-jdk-11 AS coverity_install 10 | 11 | SHELL ["/bin/bash", "-xo", "pipefail", "-c"] 12 | 13 | ARG COV_ANALYSIS_LINUX_URL 14 | ARG COV_REPORTS_LINUX_URL 15 | ARG COV_LICENSE_URL 16 | 17 | RUN mkdir /opt/coverity \ 18 | && curl --silent --show-error -o /tmp/cov-analysis-linux64.sh \ 19 | -k ${COV_ANALYSIS_LINUX_URL} \ 20 | && curl --silent --show-error -o /tmp/cov-reports-linux64.sh \ 21 | -k ${COV_REPORTS_LINUX_URL} \ 22 | && curl --silent --show-error -o /opt/coverity/license.dat \ 23 | -k ${COV_LICENSE_URL} \ 24 | && chmod 777 /tmp/*.sh \ 25 | && /tmp/cov-reports-linux64.sh -q \ 26 | --installation.dir=/opt/coverity/reports/ \ 27 | && /tmp/cov-analysis-linux64.sh -q \ 28 | --installation.dir=/opt/coverity/analysis/ \ 29 | --license.agreement=agree \ 30 | --license.region=0 \ 31 | --license.type.choice=0 \ 32 | --license.cov.path=/opt/coverity/license.dat \ 33 | --component.sdk=false \ 34 | --component.skip.documentation=true 35 | 36 | ARG DOCKER_REGISTRY 37 | 38 | HEALTHCHECK CMD ls /opt/coverity || exit 1 39 | 40 | FROM ${DOCKER_REGISTRY}vpl_build:ubuntu 41 | 42 | WORKDIR /setup 43 | COPY packages.txt packages.txt 44 | 45 | ARG DEBIAN_FRONTEND=noninteractive 46 | 47 | RUN apt-get update \ 48 | && xargs -a packages.txt apt-get install -y --no-install-recommends \ 49 | && rm -rf /var/lib/apt/lists/* 50 | ENV PATH="/opt/coverity/analysis/bin:/opt/coverity/reports/bin:${PATH}" 51 | COPY --from=coverity_install /opt/coverity /opt/coverity 52 | 53 | HEALTHCHECK CMD gcc --version || exit 1 54 | -------------------------------------------------------------------------------- /.github/workflows/coverity/packages.txt: -------------------------------------------------------------------------------- 1 | fontconfig 2 | -------------------------------------------------------------------------------- /.github/workflows/ipldt/Dockerfile.ubuntu.ipldt: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 8 | 9 | WORKDIR /setup 10 | 11 | ARG DEBIAN_FRONTEND=noninteractive 12 | ARG IPLDB_TOOL_URL 13 | ARG GROUP_ID 14 | ARG USER_ID 15 | 16 | RUN if [ -z "$IPLDB_TOOL_URL" ]; then echo \ 17 | "IPLDB_TOOL_URL was not provided as a build-arg for container."; \ 18 | exit 1; fi 19 | RUN if [ -z "$GROUP_ID" ]; then echo \ 20 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 21 | exit 1; fi 22 | RUN if [ -z "$USER_ID" ]; then echo \ 23 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 24 | exit 1; fi 25 | 26 | RUN apt-get update && apt-get install -y --no-install-recommends \ 27 | wget \ 28 | && \ 29 | rm -rf /var/lib/apt/lists/* \ 30 | && \ 31 | wget --quiet --no-check-certificate $IPLDB_TOOL_URL \ 32 | && \ 33 | tar -xzvf ipldt3_lin_intel64.tgz -C /opt \ 34 | && \ 35 | rm -rf ipldt3_lin_intel64.tgz 36 | 37 | # Use non-root user 38 | #RUN groupadd --system --gid ${GROUP_ID} appgroup \ 39 | # && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 40 | #USER appuser 41 | 42 | HEALTHCHECK CMD /opt/ipldt3_lin_intel64/ipldt3_lin_intel64 --v || exit 1 43 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Lint 3 | 4 | permissions: read-all 5 | 6 | on: 7 | workflow_call: 8 | inputs: 9 | docker_opts: 10 | description: 'extra options for docker build' 11 | required: false 12 | type: string 13 | workflow_dispatch: 14 | inputs: 15 | docker_opts: 16 | description: 'extra options for docker build' 17 | required: false 18 | type: string 19 | jobs: 20 | lint: 21 | name: Lint 22 | runs-on: [self-hosted, linux, docker] 23 | steps: 24 | 25 | - name: Cleanup workspace 26 | run: sudo rm -rf ..?* .[!.]* * 27 | 28 | - name: Checkout PR branch and all history 29 | uses: actions/checkout@v4 30 | with: 31 | path: source 32 | fetch-depth: 0 33 | 34 | - name: Build Docker image 35 | run: > 36 | docker build ${{ inputs.docker_opts }} 37 | -f "source/.github/workflows/lint/Dockerfile.ubuntu.lint" 38 | --build-arg USER_ID=$(id -u) 39 | --build-arg GROUP_ID=$(id -g) 40 | -t vpl_lint:ubuntu 41 | "source/.github/workflows/lint" 42 | 43 | - name: Lint source in container 44 | run: | 45 | cat <<'EOL' > lint.sh 46 | #!/bin/bash 47 | set -x 48 | set -o pipefail 49 | source/script/test lint | tee lint.log 50 | ret=$? 51 | set +o pipefail 52 | exit $ret 53 | EOL 54 | chmod +x lint.sh 55 | 56 | docker run --rm -v $(pwd):/tmp/work -w /tmp/work \ 57 | vpl_lint:ubuntu ./lint.sh 58 | 59 | - name: Report 60 | if: success() || failure() 61 | run: | 62 | echo '```' >> $GITHUB_STEP_SUMMARY 63 | cat lint.log >> $GITHUB_STEP_SUMMARY 64 | echo '```' >> $GITHUB_STEP_SUMMARY 65 | 66 | - name: Cleanup workspace 67 | run: sudo rm -rf ..?* .[!.]* * 68 | -------------------------------------------------------------------------------- /.github/workflows/lint/Dockerfile.ubuntu.lint: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 8 | 9 | WORKDIR /setup 10 | 11 | ARG DEBIAN_FRONTEND=noninteractive 12 | ARG PIPX_BIN_DIR=/usr/local/bin 13 | ARG PIPX_HOME=/usr/local/share/pipx 14 | 15 | ARG GROUP_ID 16 | ARG USER_ID 17 | RUN if [ -z "$GROUP_ID" ]; then echo \ 18 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 19 | exit 1; fi 20 | RUN if [ -z "$USER_ID" ]; then echo \ 21 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 22 | exit 1; fi 23 | 24 | RUN apt-get update && apt-get install -y --no-install-recommends \ 25 | pipx \ 26 | git \ 27 | && \ 28 | rm -rf /var/lib/apt/lists/* \ 29 | && \ 30 | git config --global safe.directory '*' \ 31 | && \ 32 | pipx install \ 33 | pre-commit 34 | 35 | # Use non-root user 36 | RUN groupadd --system --gid ${GROUP_ID} appgroup \ 37 | && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 38 | USER appuser 39 | 40 | HEALTHCHECK CMD pre-commit --version || exit 1 41 | -------------------------------------------------------------------------------- /.github/workflows/performance/Dockerfile: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | ARG BASE_IMAGE 7 | FROM ${BASE_IMAGE} 8 | 9 | USER root 10 | WORKDIR /setup 11 | COPY MSPerf.py /opt/intel/samples/bin/performance/MSPerf.py 12 | COPY performance.sh performance.sh 13 | 14 | ARG GROUP_ID 15 | ARG USER_ID 16 | 17 | RUN if [ -z "$GROUP_ID" ]; then echo \ 18 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 19 | exit 1; fi 20 | RUN if [ -z "$USER_ID" ]; then echo \ 21 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 22 | exit 1; fi 23 | 24 | # Use non-root user 25 | RUN groupadd --system --gid ${GROUP_ID} appgroup \ 26 | && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 27 | USER appuser 28 | 29 | HEALTHCHECK CMD python3 --version || exit 1 30 | -------------------------------------------------------------------------------- /.github/workflows/performance/performance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ ! -f content/hevc_1920x1080p_bits.h265 ]; then 3 | mkdir content 4 | ffmpeg -y -hide_banner \ 5 | -hwaccel_output_format qsv \ 6 | -f lavfi -i testsrc2=size=1920x1080:rate=30:duration=100.0 \ 7 | -threads 1 \ 8 | -c:v hevc_qsv -vf format=pix_fmts=nv12 \ 9 | -f hevc content/hevc_1920x1080p_bits.h265 10 | fi 11 | . /package/etc/vpl/vars.sh 12 | measure perf -e 1 content/hevc_1920x1080p_bits.h265 13 | PERF_DATA=data/artifacts/measure/perf 14 | mkdir -p /results/${PERF_DATA} 15 | cp -rv /opt/${PERF_DATA}/msperf* /results/${PERF_DATA}/ 16 | -------------------------------------------------------------------------------- /.github/workflows/scorecard.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: OSSF Scorecard 3 | permissions: read-all 4 | 5 | on: 6 | workflow_call: 7 | workflow_dispatch: 8 | 9 | jobs: 10 | scorecard: 11 | name: Scorecard 12 | runs-on: [self-hosted, linux, docker] 13 | steps: 14 | 15 | - name: Cleanup workspace 16 | run: sudo rm -rf ..?* .[!.]* * 17 | 18 | - name: Checkout PR branch 19 | uses: actions/checkout@v4 20 | with: 21 | path: source 22 | 23 | - name: Pull Docker image 24 | run: > 25 | docker pull gcr.io/openssf/scorecard:stable 26 | 27 | - name: Perform required checks 28 | run: > 29 | docker run --rm -v $(pwd):/tmp/work -w /tmp/work 30 | gcr.io/openssf/scorecard:stable 31 | --checks=Token-Permissions,Dangerous-Workflow,Binary-Artifacts 32 | --show-details 33 | --verbosity warn 34 | --local /tmp/work/source 35 | > scorecard.txt 36 | 37 | - name: Generate full report 38 | run: > 39 | docker run --rm -v $(pwd):/tmp/work -w /tmp/work 40 | gcr.io/openssf/scorecard:stable 41 | --local /tmp/work/source 42 | --format json 43 | > scorecard.json 44 | 45 | - name: Check 46 | run: > 47 | python3 source/.github/workflows/scorecard/check.py 48 | scorecard.json 49 | --config source/.github/workflows/scorecard/config.yml 50 | 51 | - name: Report 52 | if: success() || failure() 53 | run: | 54 | echo '```' >> $GITHUB_STEP_SUMMARY 55 | cat scorecard.txt >> $GITHUB_STEP_SUMMARY 56 | echo '```' >> $GITHUB_STEP_SUMMARY 57 | 58 | - name: Cleanup workspace 59 | run: sudo rm -rf ..?* .[!.]* * 60 | -------------------------------------------------------------------------------- /.github/workflows/scorecard/check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Check to see if results from scorecard exceed minimum required values.""" 3 | 4 | import argparse 5 | import json 6 | import sys 7 | import yaml 8 | 9 | 10 | def get_options(): 11 | """Parse command line.""" 12 | description = __doc__.split('\n', maxsplit=1)[0] 13 | parser = argparse.ArgumentParser(description=description) 14 | 15 | parser.add_argument('scorecard', 16 | metavar='FILE', 17 | help='JSON file containing scorecard') 18 | 19 | parser.add_argument('--config', 20 | metavar='FILE', 21 | help='YAML file with required minimum scores') 22 | 23 | return parser.parse_args() 24 | 25 | 26 | def get_scores(scorecard): 27 | """Extract checks from scorecard as key value pairs""" 28 | result = {} 29 | for check in scorecard['checks']: 30 | result[check['name']] = check['score'] 31 | return result 32 | 33 | 34 | def main(scorecard, config): 35 | """Compare scorecard scores with expectations from config. 36 | 37 | Return number of checks that fail to meet expectations. 38 | 39 | """ 40 | num_fails = 0 41 | checks = config.get('Checks') 42 | scores = get_scores(scorecard) 43 | for check, minval in checks.items(): 44 | score = scores.get(check, -1) 45 | if score < minval: 46 | num_fails += 1 47 | print(f"{check:23}: {score:2}/{minval:2}" 48 | f"{' ':6} {'Passed' if score >= minval else 'Failed'}") 49 | return num_fails 50 | 51 | 52 | if __name__ == "__main__": 53 | options = get_options() 54 | 55 | with open(options.scorecard, 'r', encoding="utf-8") as json_file: 56 | score_dict = json.load(json_file) 57 | 58 | config_dict = {'Checks': {}} 59 | if options.config: 60 | with open(options.config, 'r', encoding="utf-8") as yaml_file: 61 | config_dict = yaml.safe_load(yaml_file) 62 | 63 | sys.exit(main(score_dict, config_dict)) 64 | -------------------------------------------------------------------------------- /.github/workflows/scorecard/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: 3 | Binary-Artifacts: 10 4 | Branch-Protection: -1 5 | CI-Tests: -1 6 | CII-Best-Practices: -1 7 | Code-Review: -1 8 | Contributors: -1 9 | Dangerous-Workflow: 10 10 | Dependency-Update-Tool: -1 11 | Fuzzing: -1 12 | License: -1 13 | Maintained: -1 14 | Packaging: -1 15 | Pinned-Dependencies: -1 16 | SAST: -1 17 | Security-Policy: -1 18 | Signed-Releases: -1 19 | Token-Permissions: 10 20 | Vulnerabilities: -1 21 | Webhooks: -1 22 | -------------------------------------------------------------------------------- /.github/workflows/sdl/Dockerfile.ubuntu.sdl: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | ARG DOCKER_REGISTRY 8 | 9 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 10 | 11 | WORKDIR /setup 12 | 13 | ARG DEBIAN_FRONTEND=noninteractive 14 | 15 | ARG GROUP_ID 16 | ARG USER_ID 17 | 18 | RUN if [ -z "$GROUP_ID" ]; then echo \ 19 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 20 | exit 1; fi 21 | RUN if [ -z "$USER_ID" ]; then echo \ 22 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 23 | exit 1; fi 24 | 25 | RUN apt-get update && apt-get install -y --no-install-recommends \ 26 | python3-requests python3-urllib3 \ 27 | && \ 28 | rm -rf /var/lib/apt/lists/* 29 | 30 | # Use non-root user 31 | RUN groupadd --system --gid ${GROUP_ID} appgroup \ 32 | && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 33 | USER appuser 34 | 35 | HEALTHCHECK CMD python3 --version || exit 1 36 | -------------------------------------------------------------------------------- /.github/workflows/sscb/Dockerfile.ubuntu.sscb: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | ARG DOCKER_REGISTRY 8 | 9 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 10 | 11 | WORKDIR /setup 12 | 13 | ARG DEBIAN_FRONTEND=noninteractive 14 | ARG PIPX_BIN_DIR=/usr/local/bin 15 | ARG PIPX_HOME=/usr/local/share/pipx 16 | 17 | ARG SSCB_TOOL_URL 18 | ARG GROUP_ID 19 | ARG USER_ID 20 | 21 | RUN if [ -z "$SSCB_TOOL_URL" ]; then echo \ 22 | "SSCB_TOOL_URL was not provided as a build-arg for container."; \ 23 | exit 1; fi 24 | RUN if [ -z "$GROUP_ID" ]; then echo \ 25 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 26 | exit 1; fi 27 | RUN if [ -z "$USER_ID" ]; then echo \ 28 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 29 | exit 1; fi 30 | 31 | RUN apt-get update && apt-get install -y --no-install-recommends \ 32 | pipx \ 33 | binutils \ 34 | file \ 35 | && \ 36 | rm -rf /var/lib/apt/lists/* \ 37 | && \ 38 | pipx install \ 39 | "${SSCB_TOOL_URL}" 40 | 41 | # Use non-root user 42 | RUN groupadd --system --gid ${GROUP_ID} appgroup \ 43 | && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 44 | USER appuser 45 | 46 | HEALTHCHECK CMD sscb version || exit 1 47 | -------------------------------------------------------------------------------- /.github/workflows/sscb/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ignored_issues: 3 | - "Binary Not Signed" 4 | 5 | ignored_severity: 6 | - Info 7 | 8 | ignored_file: 9 | - concrt140.dll 10 | - msvcp140_1.dll 11 | - msvcp140_2.dll 12 | - msvcp140_atomic_wait.dll 13 | - msvcp140.dll 14 | - msvcp140_codecvt_ids.dll 15 | - msvcp140_codecvt_ids.dll 16 | - vcruntime140.dll 17 | - vcruntime140_1.dll 18 | -------------------------------------------------------------------------------- /.github/workflows/summary/Dockerfile.ubuntu.summary: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 8 | 9 | WORKDIR /setup 10 | 11 | ARG DEBIAN_FRONTEND=noninteractive 12 | ARG GROUP_ID 13 | ARG USER_ID 14 | 15 | RUN if [ -z "$GROUP_ID" ]; then echo \ 16 | "GROUP_ID is not set for container. Use --build-arg GROUP_ID=$(id -g)"; \ 17 | exit 1; fi 18 | RUN if [ -z "$USER_ID" ]; then echo \ 19 | "USER_ID is not set for container. Use --build-arg USER_ID=$(id -u)"; \ 20 | exit 1; fi 21 | 22 | RUN apt-get update && apt-get install -y --no-install-recommends \ 23 | python3 \ 24 | python3-xlsxwriter \ 25 | python3-defusedxml \ 26 | && \ 27 | rm -rf /var/lib/apt/lists/* 28 | 29 | # Use non-root user 30 | RUN groupadd --system --gid ${GROUP_ID} appgroup \ 31 | && useradd --system --create-home --uid ${USER_ID} --gid ${GROUP_ID} appuser 32 | USER appuser 33 | 34 | HEALTHCHECK CMD python3 --version || exit 1 35 | -------------------------------------------------------------------------------- /.github/workflows/summary/tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # Copyright (C) Intel Corporation 4 | # 5 | # SPDX-License-Identifier: MIT 6 | ############################################################################### 7 | # Utility functions for artifact handling 8 | 9 | function copy_artifact() { 10 | source_dir="$source_root/$1" 11 | source_file="$2" 12 | dest_dir="$dest_root/$3" 13 | dest_file="${4:-$source_file}" 14 | if [ -f "$source_dir/$source_file" ]; then 15 | if [ ! -d "$dest_dir" ]; then 16 | mkdir -p "$dest_dir" 17 | fi 18 | cp "$source_dir/$source_file" "$dest_dir/$dest_file" 19 | fi 20 | } 21 | 22 | function copy_all_artifacts() { 23 | source_dir="$source_root/$1" 24 | dest_dir="$dest_root/$2" 25 | if [ -d "$source_dir" ]; then 26 | if [ ! -d "$dest_dir" ]; then 27 | mkdir -p "$dest_dir" 28 | fi 29 | cp -r "$source_dir/." "$dest_dir/" 30 | fi 31 | } 32 | 33 | function copy_glob_artifact() { 34 | local prev_shopt=$(shopt -p nullglob) 35 | shopt -s nullglob 36 | source_glob="$source_root/$1" 37 | dest_dir="$2" 38 | dest_file="$3" 39 | saved_IFS="$IFS" 40 | IFS= 41 | for f in $source_glob 42 | do 43 | f_rel="$(realpath -s --relative-to="$source_root" "$f")" 44 | f_dir="$(dirname "$f_rel")" 45 | f_name="$(basename "$f_rel")" 46 | copy_artifact "$f_rel" "$f_name" "$dest_dir" "$dest_file" 47 | done 48 | IFS="$saved_IFS" 49 | ${prev_shopt} 50 | } -------------------------------------------------------------------------------- /.github/workflows/trivy/csv.tpl: -------------------------------------------------------------------------------- 1 | {{ range . }} 2 | Trivy Vulnerability Scan Results ({{- .Target -}}) 3 | VulnerabilityID,Severity,CVSS Score,Title,Library,Vulnerable Version,Fixed Version,Information URL,Triage Information 4 | {{ range .Vulnerabilities }} 5 | {{- .VulnerabilityID }}, 6 | {{- .Severity }}, 7 | {{- range $key, $value := .CVSS }} 8 | {{- if (eq $key "nvd") }} 9 | {{- .V3Score -}} 10 | {{- end }} 11 | {{- end }}, 12 | {{- quote .Title }}, 13 | {{- quote .PkgName }}, 14 | {{- quote .InstalledVersion }}, 15 | {{- quote .FixedVersion }}, 16 | {{- .PrimaryURL }} 17 | {{ else -}} 18 | No vulnerabilities found at this time. 19 | {{ end }} 20 | Trivy Dependency Scan Results ({{ .Target }}) 21 | ID,Name,Version,Notes 22 | {{ range .Packages -}} 23 | {{- quote .ID }}, 24 | {{- quote .Name }}, 25 | {{- quote .Version }} 26 | {{ else -}} 27 | No dependencies found at this time. 28 | {{ end }} 29 | {{ end }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build dirs 2 | _*/ 3 | ~*/ 4 | /build 5 | 6 | # auto-generated files 7 | *.pyc 8 | *.pyo 9 | *.pyd 10 | 11 | # ignore Editor files 12 | *.code-workspace 13 | 14 | # sample output files 15 | out.* -------------------------------------------------------------------------------- /.hadolint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ignored: 3 | - DL3006 4 | - DL3008 5 | - DL3013 6 | - DL3016 7 | - DL3018 8 | - DL3028 9 | 10 | trustedRegistries: 11 | - docker.io 12 | - gcr.io 13 | - "*.redhat.com" 14 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # pre-commit configuration file 2 | # You may automatically run pre-commit when committing 3 | # by installing hooks as follows: 4 | # pre-commit install 5 | # pre-commit install --hook-type commit-msg 6 | --- 7 | fail_fast: false 8 | default_language_version: 9 | python: python3 10 | exclude: '/ext/' 11 | repos: 12 | - repo: https://github.com/pre-commit/pre-commit-hooks 13 | rev: v5.0.0 14 | hooks: 15 | - id: check-yaml 16 | - repo: https://github.com/google/yapf 17 | rev: v0.40.2 18 | hooks: 19 | - id: yapf 20 | - repo: https://github.com/PyCQA/pylint 21 | rev: v3.3.1 22 | hooks: 23 | - id: pylint 24 | args: 25 | [ 26 | "--disable=import-error,no-name-in-module,duplicate-code", 27 | ] 28 | - repo: https://github.com/iconmaster5326/cmake-format-pre-commit-hook 29 | rev: v0.6.9 30 | hooks: 31 | - id: cmake-format 32 | - repo: https://github.com/pre-commit/mirrors-clang-format 33 | rev: v14.0.6 34 | hooks: 35 | - id: clang-format 36 | types_or: [c++, c] 37 | - repo: https://github.com/cpplint/cpplint 38 | rev: 1.5.5 39 | hooks: 40 | - id: cpplint 41 | files: \.(h|hh|hpp|hxx|h|c|cc|cpp|cxx|c)$ 42 | - repo: https://github.com/jorisroovers/gitlint 43 | rev: v0.19.1 44 | hooks: 45 | - id: gitlint 46 | - id: gitlint-ci # hook for CI environments 47 | args: [--commits, "origin/main..HEAD"] 48 | - repo: https://github.com/PyCQA/bandit 49 | rev: 1.7.7 50 | hooks: 51 | - id: bandit 52 | args: ["-c", "bandit.yaml"] 53 | - repo: https://github.com/python-jsonschema/check-jsonschema 54 | rev: 0.23.2 55 | hooks: 56 | - id: check-github-actions 57 | - id: check-github-workflows 58 | - repo: https://github.com/adrienverge/yamllint.git 59 | rev: v1.33.0 60 | hooks: 61 | - id: yamllint 62 | args: [--strict] 63 | -------------------------------------------------------------------------------- /.trivyignore.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | vulnerabilities: 3 | 4 | misconfigurations: 5 | 6 | secrets: 7 | 8 | licenses: 9 | -------------------------------------------------------------------------------- /.yamllint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | extends: default 3 | 4 | rules: 5 | comments-indentation: disable 6 | truthy: {check-keys: false} 7 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/CONTRIBUTING.md -------------------------------------------------------------------------------- /CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | set noparent 2 | 3 | # Let .clang-format determine rules that conflict with cpplint 4 | filter=-whitespace 5 | filter=-readability/braces 6 | 7 | # Ignore googles non-approved headers and functions 8 | filter=-build/c++11 9 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | # Build/Install Intel® Video Processing Library (Intel® VPL) from Source 2 | 3 | This document describes how to build from the source code in this repo. Please 4 | note: this repo contains only headers, dispatcher, examples. In most cases an 5 | implementation must also be installed. 6 | 7 | ## Basic build and install with CMake 8 | 9 | The following commands will build the project and install it locally in 10 | `_vplinstall`. Note that the bootstrap script will install dependencies needed 11 | to build the project. 12 | 13 | Linux: 14 | 15 | ``` 16 | git clone https://github.com/intel/libvpl 17 | cd libvpl 18 | export VPL_INSTALL_DIR=`pwd`/../_vplinstall 19 | sudo script/bootstrap 20 | cmake -B _build -DCMAKE_INSTALL_PREFIX=$VPL_INSTALL_DIR 21 | cmake --build _build 22 | cmake --install _build 23 | ``` 24 | 25 | 26 | Windows cmd prompt: 27 | ``` 28 | git clone https://github.com/intel/libvpl 29 | cd libvpl 30 | set VPL_INSTALL_DIR=%cd%\..\_vplinstall 31 | script\bootstrap.bat 32 | cmake -B _build -DCMAKE_INSTALL_PREFIX=%VPL_INSTALL_DIR% 33 | cmake --build _build --config Release 34 | cmake --install _build --config Release 35 | ``` 36 | > **Note:** bootstrap.bat requires [WinGet](https://github.com/microsoft/winget-cli) 37 | 38 | 39 | ## Getting an Implementation 40 | 41 | The base package is limited to the dispatcher and samples. To use Intel® VPL for 42 | video processing you need to install at least one implementation. Current 43 | implementations: 44 | 45 | - [oneVPL-intel-gpu](https://github.com/intel/vpl-gpu-rt) for use on 46 | Intel Xe graphics and newer 47 | - [Intel® Media SDK](https://github.com/Intel-Media-SDK/MediaSDK) for use on legacy 48 | Intel graphics 49 | 50 | Follow the instructions on the respective repos to install the desired 51 | implementation 52 | 53 | Remember, applications link to dispatcher and dispatcher forwards function calls 54 | to the selected implementation. 55 | 56 | ```mermaid 57 | graph TD; 58 | dispatcher["Intel® VPL Dispatcher"]-->oneVPL-intel-gpu; 59 | dispatcher-->msdk["Intel® Media SDK"]; 60 | ``` 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Intel Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | Intel is committed to rapidly addressing security vulnerabilities affecting our 3 | customers and providing clear guidance on the solution, impact, severity and 4 | mitigation. 5 | 6 | ## Reporting a Vulnerability 7 | Please report any security vulnerabilities in this project [utilizing the 8 | guidelines 9 | here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html). 10 | -------------------------------------------------------------------------------- /api/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | DisableFormat: true 3 | SortIncludes: false 4 | ... 5 | -------------------------------------------------------------------------------- /api/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | 7 | cmake_minimum_required(VERSION 3.13.0) 8 | 9 | set(VPL_API_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 10 | 11 | if(DEFINED ENV{ONEVPL_API_HEADER_DIRECTORY}) 12 | set(VPL_API_INCLUDE_DIR $ENV{ONEVPL_API_HEADER_DIRECTORY}) 13 | message(STATUS "Using custom API header directory: ${VPL_API_INCLUDE_DIR}") 14 | endif() 15 | 16 | # get API version 17 | file(READ ${VPL_API_INCLUDE_DIR}/vpl/mfxdefs.h mfxdefs) 18 | 19 | string(REGEX MATCH "MFX_VERSION_MAJOR ([0-9]*)" _ ${mfxdefs}) 20 | set(API_VERSION_MAJOR ${CMAKE_MATCH_1}) 21 | set(API_VERSION_MAJOR 22 | ${API_VERSION_MAJOR} 23 | PARENT_SCOPE) 24 | 25 | string(REGEX MATCH "MFX_VERSION_MINOR ([0-9]*)" _ ${mfxdefs}) 26 | set(API_VERSION_MINOR ${CMAKE_MATCH_1}) 27 | set(API_VERSION_MINOR 28 | ${API_VERSION_MINOR} 29 | PARENT_SCOPE) 30 | 31 | message(STATUS "API version: ${API_VERSION_MAJOR}.${API_VERSION_MINOR}") 32 | add_library(vpl-api INTERFACE) 33 | 34 | target_include_directories(vpl-api INTERFACE ${VPL_API_INCLUDE_DIR}) 35 | 36 | if(INSTALL_DEV) 37 | install( 38 | DIRECTORY ${VPL_API_INCLUDE_DIR}/vpl 39 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 40 | COMPONENT ${VPL_COMPONENT_DEV}) 41 | endif() 42 | -------------------------------------------------------------------------------- /api/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | exclude_files=vpl -------------------------------------------------------------------------------- /api/tests/compile_headers/removed_api.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | /* This file contains API definitions which are deprected or removed. Add 8 | * removed enum values, functions or structure definitions to this file. If 9 | * APIs located here reappear, header compilation tests will fail. For each 10 | * removed API entry - please keep original name of the header file. 11 | */ 12 | 13 | #ifndef API_TESTS_COMPILE_HEADERS_REMOVED_API_H_ 14 | #define API_TESTS_COMPILE_HEADERS_REMOVED_API_H_ 15 | 16 | #include "./mfxstructures.h" 17 | 18 | /* Don't expose this file publically without special approval. */ 19 | 20 | /* Enums */ 21 | enum { 22 | /*! 23 | This extended buffer allow to specify multi-frame submission parameters. 24 | */ 25 | MFX_EXTBUFF_MULTI_FRAME_PARAM = MFX_MAKEFOURCC('M', 'F', 'R', 'P'), 26 | /*! 27 | This extended buffer allow to manage multi-frame submission in runtime. 28 | */ 29 | MFX_EXTBUFF_MULTI_FRAME_CONTROL = MFX_MAKEFOURCC('M', 'F', 'R', 'C'), 30 | }; 31 | 32 | 33 | /*`Unions */ 34 | 35 | /* Structs */ 36 | 37 | /* Functions*/ 38 | 39 | #endif /* API_TESTS_COMPILE_HEADERS_REMOVED_API_H_ */ 40 | -------------------------------------------------------------------------------- /api/tests/compile_headers/sdk_headers.inc: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #pragma message ("Add headers to test begin") 8 | 9 | #include "mfx.h" 10 | #include "mfxdispatcherprefixedfunctions.h" 11 | 12 | #pragma message ("Add headers to test end") 13 | -------------------------------------------------------------------------------- /api/tests/compile_headers/test.c: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #if defined(_WIN32) || defined(_WIN64) 8 | #include 9 | #endif 10 | 11 | #include 12 | 13 | #include "./removed_api.h" 14 | 15 | #include "sdk_headers.inc" 16 | 17 | /* Stubs */ 18 | 19 | #define UNUSED_PARAM(x) (void)(x) 20 | 21 | mfxLoader MFX_CDECL MFXLoad() 22 | { 23 | return (mfxLoader)1; 24 | } 25 | 26 | mfxConfig MFX_CDECL MFXCreateConfig(mfxLoader loader) 27 | { 28 | UNUSED_PARAM(loader); 29 | return (mfxConfig)2; 30 | } 31 | 32 | mfxStatus MFX_CDECL MFXSetConfigFilterProperty(mfxConfig config, const mfxU8* name, mfxVariant value) 33 | { 34 | UNUSED_PARAM(config); 35 | UNUSED_PARAM(name); 36 | UNUSED_PARAM(value); 37 | return MFX_ERR_NONE; 38 | } 39 | 40 | int main() 41 | { 42 | /* Checkout dispatcher's macroses*/ 43 | mfxLoader loader = NULL; 44 | 45 | MFX_ADD_PROPERTY_U32(loader, "mfxImplDescription.mfxVPPDescription.filter.FilterFourCC", (mfxU32)MFX_EXTBUFF_VPP_SCALING) 46 | MFX_ADD_PROPERTY_PTR(loader, "mfxImplDescription.mfxVPPDescription.filter.FilterFourCC", "something_amazing") 47 | MFX_ADD_PROPERTY_U16(loader, "mfxImplDescription.Impl", MFX_IMPL_TYPE_SOFTWARE) 48 | 49 | { 50 | mfxConfig cfg = NULL; 51 | 52 | MFX_UPDATE_PROPERTY_U16(loader, cfg, "mfxImplDescription.Impl", MFX_IMPL_TYPE_SOFTWARE) 53 | MFX_UPDATE_PROPERTY_U32(loader, cfg, "mfxImplDescription.Impl", MFX_IMPL_TYPE_SOFTWARE) 54 | MFX_UPDATE_PROPERTY_PTR(loader, cfg, "mfxImplDescription.Impl", "just a string") 55 | } 56 | 57 | #ifdef ONEVPL_EXPERIMENTAL 58 | { 59 | mfxExtendedDeviceId *devinfo = NULL; 60 | mfxU8* uuid = NULL; 61 | mfxU8 sub_device_id = 0; 62 | MFX_UUID_COMPUTE_DEVICE_ID(devinfo, sub_device_id, uuid) 63 | } 64 | #endif 65 | 66 | return 0; 67 | } 68 | 69 | #pragma message ("end of C test") 70 | -------------------------------------------------------------------------------- /api/tests/doc_examples/main.c: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #define UNUSED_PARAM(x) (void)(x) 8 | 9 | #include 10 | int main(int argc, char* argv[]) 11 | { 12 | UNUSED_PARAM(argc); 13 | UNUSED_PARAM(argv); 14 | 15 | printf("I don't supposed to be executed!\n"); 16 | return 0; 17 | } -------------------------------------------------------------------------------- /api/tests/docker/Dockerfile.clang: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | FROM ubuntu:20.04 8 | 9 | ARG CLANG_VER=12 10 | 11 | RUN apt-get update \ 12 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 13 | clang-${CLANG_VER} \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* \ 16 | && clang-${CLANG_VER} -v \ 17 | && apt-get update \ 18 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 19 | python3-pip \ 20 | && apt-get clean \ 21 | && rm -rf /var/lib/apt/lists/* \ 22 | && pip3 install --no-cache-dir clang libclang 23 | 24 | WORKDIR /data 25 | VOLUME ["/data"] 26 | 27 | # Use non-root user 28 | ARG GROUP_ID=10000 29 | ARG USER_ID=10001 30 | RUN addgroup --gid ${GROUP_ID} --system appgroup \ 31 | && adduser --uid ${USER_ID} --system --gid ${GROUP_ID} appuser 32 | USER appuser 33 | 34 | HEALTHCHECK CMD clang --version || exit 1 35 | -------------------------------------------------------------------------------- /api/tests/docker/Dockerfile.gcc: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | FROM ubuntu:20.04 8 | 9 | RUN apt-get update \ 10 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 11 | build-essential \ 12 | && apt-get clean \ 13 | && rm -rf /var/lib/apt/lists/* \ 14 | && apt-get update \ 15 | && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 16 | libva-dev \ 17 | && apt-get clean \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | WORKDIR /data 21 | VOLUME ["/data"] 22 | 23 | # Use non-root user 24 | ARG GROUP_ID=10000 25 | ARG USER_ID=10001 26 | RUN addgroup --gid ${GROUP_ID} --system appgroup \ 27 | && adduser --uid ${USER_ID} --system --gid ${GROUP_ID} appuser 28 | USER appuser 29 | 30 | HEALTHCHECK CMD gcc --version || exit 1 31 | -------------------------------------------------------------------------------- /api/vpl/mfx.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef __MFX_H__ 8 | #define __MFX_H__ 9 | 10 | #include "mfxdefs.h" 11 | #include "mfxcommon.h" 12 | #include "mfxstructures.h" 13 | #include "mfxdispatcher.h" 14 | #include "mfximplcaps.h" 15 | #include "mfxsession.h" 16 | #include "mfxvideo.h" 17 | #include "mfxadapter.h" 18 | 19 | #include "mfxbrc.h" 20 | #include "mfxmvc.h" 21 | #include "mfxpcp.h" 22 | #include "mfxvp8.h" 23 | #include "mfxjpeg.h" 24 | 25 | #include "mfxsurfacepool.h" 26 | 27 | #ifdef ONEVPL_EXPERIMENTAL 28 | #include "mfxencodestats.h" 29 | #endif 30 | 31 | #endif /* __MFXDEFS_H__ */ 32 | -------------------------------------------------------------------------------- /api/vpl/mfxpcp.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef __MFXPCP_H__ 8 | #define __MFXPCP_H__ 9 | #include "mfxstructures.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif /* __cplusplus */ 15 | 16 | /*! The Protected enumerator describes the protection schemes. */ 17 | enum { 18 | MFX_PROTECTION_CENC_WV_CLASSIC = 0x0004, /*!< The protection scheme is based on the Widevine* DRM from Google*. */ 19 | MFX_PROTECTION_CENC_WV_GOOGLE_DASH = 0x0005, /*!< The protection scheme is based on the Widevine* Modular DRM* from Google*. */ 20 | }; 21 | 22 | /* Extended Buffer Ids */ 23 | enum { 24 | MFX_EXTBUFF_CENC_PARAM = MFX_MAKEFOURCC('C','E','N','P') /*!< This structure is used to pass decryption status report index for Common 25 | Encryption usage model. See the mfxExtCencParam structure for more details. */ 26 | }; 27 | 28 | MFX_PACK_BEGIN_USUAL_STRUCT() 29 | /*! 30 | Used to pass the decryption status report index for the Common Encryption usage model. The application can 31 | attach this extended buffer to the mfxBitstream structure at runtime. 32 | */ 33 | typedef struct _mfxExtCencParam{ 34 | mfxExtBuffer Header; /*!< Extension buffer header. Header.BufferId must be equal to MFX_EXTBUFF_CENC_PARAM. */ 35 | 36 | mfxU32 StatusReportIndex; /*!< Decryption status report index. */ 37 | mfxU32 reserved[15]; 38 | } mfxExtCencParam; 39 | MFX_PACK_END() 40 | 41 | #ifdef __cplusplus 42 | } // extern "C" 43 | #endif /* __cplusplus */ 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /api/vpl/preview/README.txt: -------------------------------------------------------------------------------- 1 | The files in this preview folder are provided as a preview of upcoming features. 2 | The content of this folder may be changed or removed without respect for backward compatibility. -------------------------------------------------------------------------------- /api/vpl/preview/legacy/README.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/api/vpl/preview/legacy/README.txt -------------------------------------------------------------------------------- /cmake/FindVPL.cmake: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | 7 | # Find project local libraries, only for use within project 8 | # 9 | # This module defines 10 | # 11 | # VPL__FOUND VPL_IMPORTED_TARGETS 12 | 13 | if(NOT API_VERSION_MAJOR) 14 | set(VPL_api_FOUND 0) 15 | set(VPL_dispatcher_FOUND 0) 16 | set(VPL_FOUND FALSE) 17 | return() 18 | endif() 19 | 20 | set(VPL_INTERFACE_VERSION ${API_VERSION_MAJOR}) 21 | 22 | # VPL::dispatcher 23 | add_library(VPL::dispatcher ALIAS VPL) 24 | list(APPEND VPL_IMPORTED_TARGETS VPL::dispatcher) 25 | set(VPL_dispatcher_FOUND 1) 26 | 27 | add_library(VPL::api ALIAS vpl-api) 28 | list(APPEND VPL_IMPORTED_TARGETS VPL::api) 29 | set(VPL_api_FOUND 1) 30 | 31 | set(VPL_FOUND 1) 32 | -------------------------------------------------------------------------------- /cmake/PackageTarget.cmake: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | 7 | # 8 | # Packaging 9 | # 10 | 11 | set(CPACK_GENERATOR "ZIP") 12 | set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) 13 | 14 | set(CPACK_PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}) 15 | set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) 16 | set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) 17 | set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) 18 | 19 | set(VPL_COMPONENT_DEV dev) 20 | set(VPL_COMPONENT_LIB lib) 21 | set(VPL_COMPONENT_TOOLS tools) 22 | 23 | set(CPACK_COMPONENTS_ALL all ${VPL_COMPONENT_DEV} ${VPL_COMPONENT_LIB} 24 | ${VPL_COMPONENT_TOOLS}) 25 | set(CPACK_COMPONENTS_GROUPING IGNORE) 26 | 27 | include(CPack) 28 | cpack_add_component(${VPL_COMPONENT_LIB}) 29 | cpack_add_component(${VPL_COMPONENT_DEV} DEPENDS ${VPL_COMPONENT_LIB}) 30 | cpack_add_component(${VPL_COMPONENT_TOOLS} DEPENDS ${VPL_COMPONENT_LIB}) 31 | -------------------------------------------------------------------------------- /doc/images/cs_bufer_usage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_bufer_usage.jpg -------------------------------------------------------------------------------- /doc/images/cs_control_flow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_control_flow.jpg -------------------------------------------------------------------------------- /doc/images/cs_control_flow_enc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_control_flow_enc.jpg -------------------------------------------------------------------------------- /doc/images/cs_control_flow_sync.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_control_flow_sync.jpg -------------------------------------------------------------------------------- /doc/images/cs_cs_pipeline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_cs_pipeline.jpg -------------------------------------------------------------------------------- /doc/images/cs_e2e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_e2e.jpg -------------------------------------------------------------------------------- /doc/images/cs_enc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_enc.jpg -------------------------------------------------------------------------------- /doc/images/cs_lat_chart1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_lat_chart1.jpg -------------------------------------------------------------------------------- /doc/images/cs_lat_chart2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_lat_chart2.jpg -------------------------------------------------------------------------------- /doc/images/cs_lat_chart3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_lat_chart3.jpg -------------------------------------------------------------------------------- /doc/images/cs_org_pipeline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_org_pipeline.jpg -------------------------------------------------------------------------------- /doc/images/cs_surface_pool_utilization.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/cs_surface_pool_utilization.jpg -------------------------------------------------------------------------------- /doc/images/oneapi-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/oneapi-logo.png -------------------------------------------------------------------------------- /doc/images/par_enc_1x2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/par_enc_1x2.jpg -------------------------------------------------------------------------------- /doc/images/par_enc_2x2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/par_enc_2x2.jpg -------------------------------------------------------------------------------- /doc/images/trace_e2e_option.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/trace_e2e_option.jpg -------------------------------------------------------------------------------- /doc/images/trace_enc_option.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/images/trace_enc_option.jpg -------------------------------------------------------------------------------- /doc/multi-adapter-guide.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/multi-adapter-guide.md -------------------------------------------------------------------------------- /doc/smt-tracer-readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/smt-tracer-readme.md -------------------------------------------------------------------------------- /doc/spec/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/spec/README.md -------------------------------------------------------------------------------- /doc/spec/docker/Dockerfile.build: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | FROM ubuntu:20.04 6 | COPY ubuntu-packages.txt install.sh requirements.txt /tmp/ 7 | WORKDIR /tmp 8 | RUN ./install.sh 9 | 10 | # Use non-root user 11 | ARG GROUP_ID=10000 12 | ARG USER_ID=10001 13 | RUN addgroup --gid ${GROUP_ID} --system appgroup \ 14 | && adduser --uid ${USER_ID} --system --gid ${GROUP_ID} appuser 15 | USER appuser 16 | 17 | HEALTHCHECK CMD python3 --version || exit 1 18 | -------------------------------------------------------------------------------- /doc/spec/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (c) 2020, Intel Corporation 4 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 5 | # 6 | # SPDX-License-Identifier: MIT 7 | 8 | set -e 9 | set -x 10 | 11 | apt-get update -qq 12 | DEBIAN_FRONTEND=noninteractive xargs -a ubuntu-packages.txt apt-get install -qq 13 | 14 | pip3 install --upgrade pip wheel 15 | pip3 install --upgrade --quiet -r requirements.txt 16 | -------------------------------------------------------------------------------- /doc/spec/requirements.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # This is the minimal set of components required and using the latest 6 | # versions 7 | 8 | breathe 9 | pre-commit 10 | sphinx==6.2.0 11 | # waiting for pypi release for fix for parallel read 12 | git+https://github.com/readthedocs/sphinx-notfound-page.git 13 | # Waiting for release of: https://github.com/executablebooks/sphinx-book-theme/commit/0bdacc0a5e0a01ca5b4476651d1a80821b9b5d67 14 | git+https://github.com/executablebooks/sphinx-book-theme.git@v1.0.1 15 | docutils 16 | sphinx-prompt 17 | sphinx_substitution_extensions 18 | sphinx_tabs 19 | sphinxcontrib-spelling 20 | sphinxcontrib-svg2pdfconverter 21 | sphinxmark 22 | graphviz 23 | lxml==4.9.4 24 | sphinxcontrib.plantuml 25 | 26 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_api_ref.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _VPL_api_ref: 6 | 7 | ============================== 8 | |vpl_short_name| API Reference 9 | ============================== 10 | 11 | .. toctree:: 12 | :titlesonly: 13 | :maxdepth: 1 14 | 15 | VPL_functions 16 | VPL_structs 17 | VPL_enums 18 | VPL_defines 19 | VPL_ref_types 20 | VPL_disp_api 21 | VPL_guids 22 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_defines.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. 6 | Intel(r) Video Processing Library (Intel(r) VPL) 7 | 8 | ================ 9 | Define Reference 10 | ================ 11 | 12 | --- 13 | API 14 | --- 15 | 16 | .. contents:: 17 | :local: 18 | :depth: 1 19 | 20 | .. doxygendefine:: MFX_DECODERDESCRIPTION_VERSION 21 | :project: DEF_BREATHE_PROJECT 22 | 23 | .. doxygendefine:: MFX_DEVICEDESCRIPTION_VERSION 24 | :project: DEF_BREATHE_PROJECT 25 | 26 | .. doxygendefine:: MFX_ENCODERDESCRIPTION_VERSION 27 | :project: DEF_BREATHE_PROJECT 28 | 29 | .. doxygendefine:: MFX_FRAMESURFACE1_VERSION 30 | :project: DEF_BREATHE_PROJECT 31 | 32 | .. doxygendefine:: MFX_FRAMESURFACEINTERFACE_VERSION 33 | :project: DEF_BREATHE_PROJECT 34 | 35 | .. doxygendefine:: MFX_IMPLDESCRIPTION_VERSION 36 | :project: DEF_BREATHE_PROJECT 37 | 38 | .. doxygendefine:: MFX_LEGACY_VERSION 39 | :project: DEF_BREATHE_PROJECT 40 | 41 | .. doxygendefine:: MFX_STRUCT_VERSION 42 | :project: DEF_BREATHE_PROJECT 43 | 44 | .. doxygendefine:: MFX_VARIANT_VERSION 45 | :project: DEF_BREATHE_PROJECT 46 | 47 | .. doxygendefine:: MFX_VERSION 48 | :project: DEF_BREATHE_PROJECT 49 | 50 | .. doxygendefine:: MFX_VERSION_MAJOR 51 | :project: DEF_BREATHE_PROJECT 52 | 53 | .. doxygendefine:: MFX_VERSION_MINOR 54 | :project: DEF_BREATHE_PROJECT 55 | 56 | .. doxygendefine:: MFX_VPPDESCRIPTION_VERSION 57 | :project: DEF_BREATHE_PROJECT 58 | 59 | .. doxygendefine:: MFX_SURFACEARRAY_VERSION 60 | :project: DEF_BREATHE_PROJECT 61 | 62 | .. doxygendefine::MFX_ACCELERATIONMODESCRIPTION_VERSION 63 | :project: DEF_BREATHE_PROJECT 64 | 65 | .. doxygendefine::MFX_POOLPOLICYDESCRIPTION_VERSION 66 | :project: DEF_BREATHE_PROJECT 67 | 68 | .. doxygendefine::MFX_EXTENDEDDEVICEID_VERSION 69 | :project: DEF_BREATHE_PROJECT 70 | 71 | .. doxygendefine::MFX_ENCODESTATSCONTAINER_VERSION 72 | :project: DEF_BREATHE_PROJECT 73 | 74 | .. doxygendefine::MFX_REFINTERFACE_VERSION 75 | :project: DEF_BREATHE_PROJECT 76 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_disp_api.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============== 6 | Dispatcher API 7 | ============== 8 | 9 | Use the Dispatcher API to load and execute the appropriate library implementation 10 | and get capabilities for the implementations available on the platform. 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | VPL_disp_api_func 16 | VPL_disp_api_struct 17 | VPL_disp_api_enum 18 | VPL_disp_api_def 19 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_disp_api_def.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _disp_api_def: 8 | 9 | =============================== 10 | Dispatcher API Define Reference 11 | =============================== 12 | 13 | --- 14 | API 15 | --- 16 | 17 | .. contents:: 18 | :local: 19 | :depth: 1 20 | 21 | MFX_IMPL_NAME_LEN 22 | ----------------- 23 | 24 | .. doxygendefine:: MFX_IMPL_NAME_LEN 25 | :project: DEF_BREATHE_PROJECT 26 | 27 | MFX_STRFIELD_LEN 28 | ---------------- 29 | .. doxygendefine:: MFX_STRFIELD_LEN 30 | :project: DEF_BREATHE_PROJECT 31 | 32 | Helper macro definitions to add property with single value. 33 | 34 | MFX_ADD_PROPERTY_U32 35 | -------------------- 36 | .. doxygendefine:: MFX_ADD_PROPERTY_U32 37 | :project: DEF_BREATHE_PROJECT 38 | 39 | MFX_ADD_PROPERTY_U16 40 | -------------------- 41 | .. doxygendefine:: MFX_ADD_PROPERTY_U16 42 | :project: DEF_BREATHE_PROJECT 43 | 44 | MFX_ADD_PROPERTY_PTR 45 | -------------------- 46 | .. doxygendefine:: MFX_ADD_PROPERTY_PTR 47 | :project: DEF_BREATHE_PROJECT 48 | 49 | Helper macro definitions to update existing property. 50 | 51 | MFX_UPDATE_PROPERTY_U32 52 | ----------------------- 53 | .. doxygendefine:: MFX_UPDATE_PROPERTY_U32 54 | :project: DEF_BREATHE_PROJECT 55 | 56 | MFX_UPDATE_PROPERTY_U16 57 | ----------------------- 58 | .. doxygendefine:: MFX_UPDATE_PROPERTY_U16 59 | :project: DEF_BREATHE_PROJECT 60 | 61 | MFX_UPDATE_PROPERTY_PTR 62 | ----------------------- 63 | .. doxygendefine:: MFX_UPDATE_PROPERTY_PTR 64 | :project: DEF_BREATHE_PROJECT 65 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_disp_api_enum.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _disp_api_enum: 8 | 9 | ==================================== 10 | Dispatcher API Enumeration Reference 11 | ==================================== 12 | 13 | --- 14 | API 15 | --- 16 | 17 | .. contents:: 18 | :local: 19 | :depth: 1 20 | 21 | mfxAccelerationMode 22 | ------------------- 23 | 24 | .. doxygenenum:: mfxAccelerationMode 25 | :project: DEF_BREATHE_PROJECT 26 | 27 | mfxImplType 28 | ----------- 29 | 30 | .. doxygenenum:: mfxImplType 31 | :project: DEF_BREATHE_PROJECT 32 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_disp_api_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _disp_api_func: 8 | 9 | ================================= 10 | Dispatcher API Function Reference 11 | ================================= 12 | 13 | --- 14 | API 15 | --- 16 | 17 | .. contents:: 18 | :local: 19 | :depth: 1 20 | 21 | MFXCreateConfig 22 | --------------- 23 | 24 | .. doxygenfunction:: MFXCreateConfig 25 | :project: DEF_BREATHE_PROJECT 26 | 27 | MFXCreateSession 28 | ---------------- 29 | 30 | .. doxygenfunction:: MFXCreateSession 31 | :project: DEF_BREATHE_PROJECT 32 | 33 | MFXDispReleaseImplDescription 34 | ----------------------------- 35 | 36 | .. doxygenfunction:: MFXDispReleaseImplDescription 37 | :project: DEF_BREATHE_PROJECT 38 | 39 | MFXEnumImplementations 40 | ---------------------- 41 | 42 | .. doxygenfunction:: MFXEnumImplementations 43 | :project: DEF_BREATHE_PROJECT 44 | 45 | MFXLoad 46 | ------- 47 | 48 | .. doxygenfunction:: MFXLoad 49 | :project: DEF_BREATHE_PROJECT 50 | 51 | MFXSetConfigFilterProperty 52 | -------------------------- 53 | 54 | .. doxygenfunction:: MFXSetConfigFilterProperty 55 | :project: DEF_BREATHE_PROJECT 56 | 57 | MFXUnload 58 | --------- 59 | 60 | .. doxygenfunction:: MFXUnload 61 | :project: DEF_BREATHE_PROJECT 62 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_func_adapters.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _func_adapters: 8 | 9 | ======== 10 | Adapters 11 | ======== 12 | 13 | .. _func_adapters_begin: 14 | 15 | Functions that identify graphics adapters for Microsoft\* DirectX\* video 16 | processing, encoding, and decoding. 17 | 18 | .. _func_adapters_end: 19 | 20 | --- 21 | API 22 | --- 23 | 24 | .. contents:: 25 | :local: 26 | :depth: 1 27 | 28 | MFXQueryAdapters 29 | ---------------- 30 | 31 | .. doxygenfunction:: MFXQueryAdapters 32 | :project: DEF_BREATHE_PROJECT 33 | 34 | MFXQueryAdaptersDecode 35 | ---------------------- 36 | 37 | .. doxygenfunction:: MFXQueryAdaptersDecode 38 | :project: DEF_BREATHE_PROJECT 39 | 40 | MFXQueryAdaptersNumber 41 | ---------------------- 42 | 43 | .. doxygenfunction:: MFXQueryAdaptersNumber 44 | :project: DEF_BREATHE_PROJECT 45 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_func_capabilities.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _func_impl_capabilities: 8 | 9 | =========================== 10 | Implementation Capabilities 11 | =========================== 12 | 13 | .. _func_impl_cap_begin: 14 | 15 | Functions to report capabilities of available implementations and create 16 | user-requested library implementations. 17 | 18 | .. _func_impl_cap_end: 19 | 20 | --- 21 | API 22 | --- 23 | 24 | .. contents:: 25 | :local: 26 | :depth: 1 27 | 28 | MFXQueryImplsDescription 29 | ------------------------ 30 | 31 | .. doxygenfunction:: MFXQueryImplsDescription 32 | :project: DEF_BREATHE_PROJECT 33 | 34 | .. important:: The :cpp:func:`MFXQueryImplsDescription` function is mandatory for any implementation. 35 | 36 | MFXQueryImplsProperties 37 | ------------------------ 38 | 39 | .. doxygenfunction:: MFXQueryImplsProperties 40 | :project: DEF_BREATHE_PROJECT 41 | 42 | MFXReleaseImplDescription 43 | ------------------------- 44 | 45 | .. doxygenfunction:: MFXReleaseImplDescription 46 | :project: DEF_BREATHE_PROJECT 47 | 48 | .. important:: The :cpp:func:`MFXReleaseImplDescription` function is mandatory for any implementation. 49 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_func_mem.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _func_memory: 8 | 9 | ====== 10 | Memory 11 | ====== 12 | 13 | .. _func_mem_begin: 14 | 15 | Functions for internal memory allocation and management. 16 | 17 | .. _func_mem_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | MFXMemory_GetSurfaceForVPP 28 | -------------------------- 29 | 30 | .. doxygenfunction:: MFXMemory_GetSurfaceForVPP 31 | :project: DEF_BREATHE_PROJECT 32 | 33 | Alias below, can be used as well: 34 | 35 | .. doxygendefine:: MFXMemory_GetSurfaceForVPPIn 36 | :project: DEF_BREATHE_PROJECT 37 | 38 | MFXMemory_GetSurfaceForVPPOut 39 | ----------------------------- 40 | 41 | .. doxygenfunction:: MFXMemory_GetSurfaceForVPPOut 42 | :project: DEF_BREATHE_PROJECT 43 | 44 | MFXMemory_GetSurfaceForEncode 45 | ----------------------------- 46 | 47 | .. doxygenfunction:: MFXMemory_GetSurfaceForEncode 48 | :project: DEF_BREATHE_PROJECT 49 | 50 | MFXMemory_GetSurfaceForDecode 51 | ----------------------------- 52 | 53 | .. doxygenfunction:: MFXMemory_GetSurfaceForDecode 54 | :project: DEF_BREATHE_PROJECT 55 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_func_session.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _func_session_mgmt: 8 | 9 | ================== 10 | Session Management 11 | ================== 12 | 13 | .. _func_session_begin: 14 | 15 | Functions to manage sessions. 16 | 17 | .. _func_session_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | MFXInit 28 | ------- 29 | 30 | .. doxygenfunction:: MFXInit 31 | :project: DEF_BREATHE_PROJECT 32 | 33 | MFXInitEx 34 | --------- 35 | 36 | .. doxygenfunction:: MFXInitEx 37 | :project: DEF_BREATHE_PROJECT 38 | 39 | MFXInitialize 40 | ------------- 41 | 42 | .. doxygenfunction:: MFXInitialize 43 | :project: DEF_BREATHE_PROJECT 44 | 45 | .. important:: The :cpp:func:`MFXInitialize` function is mandatory for any implementation. 46 | 47 | MFXClose 48 | -------- 49 | 50 | .. doxygenfunction:: MFXClose 51 | :project: DEF_BREATHE_PROJECT 52 | 53 | .. important:: The :cpp:func:`MFXClose` function is mandatory for any implementation. 54 | 55 | MFXQueryIMPL 56 | ------------ 57 | .. doxygenfunction:: MFXQueryIMPL 58 | :project: DEF_BREATHE_PROJECT 59 | 60 | MFXQueryVersion 61 | --------------- 62 | 63 | .. doxygenfunction:: MFXQueryVersion 64 | :project: DEF_BREATHE_PROJECT 65 | 66 | MFXJoinSession 67 | -------------- 68 | 69 | .. doxygenfunction:: MFXJoinSession 70 | :project: DEF_BREATHE_PROJECT 71 | 72 | MFXDisjoinSession 73 | ----------------- 74 | 75 | .. doxygenfunction:: MFXDisjoinSession 76 | :project: DEF_BREATHE_PROJECT 77 | 78 | MFXCloneSession 79 | --------------- 80 | 81 | .. doxygenfunction:: MFXCloneSession 82 | :project: DEF_BREATHE_PROJECT 83 | 84 | MFXSetPriority 85 | -------------- 86 | 87 | .. doxygenfunction:: MFXSetPriority 88 | :project: DEF_BREATHE_PROJECT 89 | 90 | MFXGetPriority 91 | -------------- 92 | 93 | .. doxygenfunction:: MFXGetPriority 94 | :project: DEF_BREATHE_PROJECT 95 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_func_vid_decode_vpp.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _func_video_decode_vpp: 8 | 9 | =============== 10 | VideoDECODE_VPP 11 | =============== 12 | 13 | .. _func_vid_decode_vpp_begin: 14 | 15 | Functions that implement combined operation of decoding and video processing 16 | with multiple output frame surfaces. 17 | 18 | .. _func_vid_decode_vpp_end: 19 | 20 | --- 21 | API 22 | --- 23 | 24 | .. contents:: 25 | :local: 26 | :depth: 1 27 | 28 | MFXVideoDECODE_VPP_Init 29 | ----------------------- 30 | 31 | .. doxygenfunction:: MFXVideoDECODE_VPP_Init 32 | :project: DEF_BREATHE_PROJECT 33 | 34 | .. important:: The :cpp:func:`MFXVideoDECODE_VPP_Init` is mandatory when implementing a combined decode plus vpp. 35 | 36 | MFXVideoDECODE_VPP_Reset 37 | ------------------------ 38 | 39 | .. doxygenfunction:: MFXVideoDECODE_VPP_Reset 40 | :project: DEF_BREATHE_PROJECT 41 | 42 | MFXVideoDECODE_VPP_GetChannelParam 43 | ---------------------------------- 44 | 45 | .. doxygenfunction:: MFXVideoDECODE_VPP_GetChannelParam 46 | :project: DEF_BREATHE_PROJECT 47 | 48 | MFXVideoDECODE_VPP_DecodeFrameAsync 49 | ----------------------------------- 50 | 51 | .. doxygenfunction:: MFXVideoDECODE_VPP_DecodeFrameAsync 52 | :project: DEF_BREATHE_PROJECT 53 | 54 | .. important:: The :cpp:func:`MFXVideoDECODE_VPP_DecodeFrameAsync` is mandatory when implementing a combined decode plus vpp. 55 | 56 | MFXVideoDECODE_VPP_Close 57 | ------------------------ 58 | 59 | .. doxygenfunction:: MFXVideoDECODE_VPP_Close 60 | :project: DEF_BREATHE_PROJECT 61 | 62 | .. important:: The :cpp:func:`MFXVideoDECODE_VPP_Close` is mandatory when implementing a combined decode plus vpp. 63 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_func_vidcore.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _func_video_core: 8 | 9 | ========= 10 | VideoCORE 11 | ========= 12 | 13 | .. _func_vidcore_begin: 14 | 15 | Functions to perform external device and memory management and synchronization. 16 | 17 | .. _func_vidcore_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | MFXVideoCORE_SetFrameAllocator 28 | ------------------------------ 29 | 30 | .. doxygenfunction:: MFXVideoCORE_SetFrameAllocator 31 | :project: DEF_BREATHE_PROJECT 32 | 33 | MFXVideoCORE_SetHandle 34 | ---------------------- 35 | 36 | .. doxygenfunction:: MFXVideoCORE_SetHandle 37 | :project: DEF_BREATHE_PROJECT 38 | 39 | MFXVideoCORE_GetHandle 40 | ---------------------- 41 | 42 | .. doxygenfunction:: MFXVideoCORE_GetHandle 43 | :project: DEF_BREATHE_PROJECT 44 | 45 | MFXVideoCORE_QueryPlatform 46 | -------------------------- 47 | 48 | .. doxygenfunction:: MFXVideoCORE_QueryPlatform 49 | :project: DEF_BREATHE_PROJECT 50 | 51 | MFXVideoCORE_SyncOperation 52 | -------------------------- 53 | 54 | .. doxygenfunction:: MFXVideoCORE_SyncOperation 55 | :project: DEF_BREATHE_PROJECT 56 | 57 | .. important:: The :cpp:func:`MFXVideoCORE_SyncOperation` function is mandatory for 58 | any implementation. 59 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_functions.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | ================== 8 | Function Reference 9 | ================== 10 | 11 | :ref:`func_video_decode` 12 | .. include:: VPL_func_vid_decode.rst 13 | :start-after: func_vid_decode_begin: 14 | :end-before: func_vid_decode_end: 15 | 16 | :ref:`func_video_encode` 17 | .. include:: VPL_func_vid_encode.rst 18 | :start-after: func_vid_encode_begin: 19 | :end-before: func_vid_encode_end: 20 | 21 | :ref:`func_video_vpp` 22 | .. include:: VPL_func_vid_vpp.rst 23 | :start-after: func_vid_vpp_begin: 24 | :end-before: func_vid_vpp_end: 25 | 26 | :ref:`func_video_core` 27 | .. include:: VPL_func_vidcore.rst 28 | :start-after: func_vidcore_begin: 29 | :end-before: func_vidcore_end: 30 | 31 | :ref:`func_session_mgmt` 32 | .. include:: VPL_func_session.rst 33 | :start-after: func_session_begin: 34 | :end-before: func_session_end: 35 | 36 | :ref:`func_memory` 37 | .. include:: VPL_func_mem.rst 38 | :start-after: func_mem_begin: 39 | :end-before: func_mem_end: 40 | 41 | :ref:`func_impl_capabilities` 42 | .. include:: VPL_func_capabilities.rst 43 | :start-after: func_impl_cap_begin: 44 | :end-before: func_impl_cap_end: 45 | 46 | :ref:`func_adapters` 47 | .. include:: VPL_func_adapters.rst 48 | :start-after: func_adapters_begin: 49 | :end-before: func_adapters_end: 50 | 51 | :ref:`func_video_decode_vpp` 52 | .. include:: VPL_func_vid_decode_vpp.rst 53 | :start-after: func_vid_decode_vpp_begin: 54 | :end-before: func_vid_decode_vpp_end: 55 | 56 | 57 | .. toctree:: 58 | :maxdepth: 1 59 | :hidden: 60 | 61 | VPL_func_vid_decode 62 | VPL_func_vid_encode 63 | VPL_func_vid_vpp 64 | VPL_func_vidcore 65 | VPL_func_session 66 | VPL_func_mem 67 | VPL_func_capabilities 68 | VPL_func_adapters 69 | VPL_func_vid_decode_vpp 70 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_guids.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | ================ 8 | GUIDs Reference 9 | ================ 10 | 11 | --- 12 | API 13 | --- 14 | 15 | .. contents:: 16 | :local: 17 | :depth: 1 18 | 19 | .. doxygenvariable:: MFX_GUID_SURFACE_POOL 20 | :project: DEF_BREATHE_PROJECT 21 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_ref_types.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | ============== 8 | Type Reference 9 | ============== 10 | 11 | .. contents:: 12 | :local: 13 | :depth: 1 14 | 15 | ----------- 16 | Basic Types 17 | ----------- 18 | 19 | .. doxygentypedef:: mfxChar 20 | :project: DEF_BREATHE_PROJECT 21 | 22 | .. doxygentypedef:: mfxF32 23 | :project: DEF_BREATHE_PROJECT 24 | 25 | .. doxygentypedef:: mfxF64 26 | :project: DEF_BREATHE_PROJECT 27 | 28 | .. doxygentypedef:: mfxHDL 29 | :project: DEF_BREATHE_PROJECT 30 | 31 | .. doxygentypedef:: mfxI8 32 | :project: DEF_BREATHE_PROJECT 33 | 34 | .. doxygentypedef:: mfxI16 35 | :project: DEF_BREATHE_PROJECT 36 | 37 | .. doxygentypedef:: mfxI32 38 | :project: DEF_BREATHE_PROJECT 39 | 40 | .. doxygentypedef:: mfxI64 41 | :project: DEF_BREATHE_PROJECT 42 | 43 | .. doxygentypedef:: mfxL32 44 | :project: DEF_BREATHE_PROJECT 45 | 46 | .. doxygentypedef:: mfxMemId 47 | :project: DEF_BREATHE_PROJECT 48 | 49 | .. doxygentypedef:: mfxThreadTask 50 | :project: DEF_BREATHE_PROJECT 51 | 52 | .. doxygentypedef:: mfxU8 53 | :project: DEF_BREATHE_PROJECT 54 | 55 | .. doxygentypedef:: mfxU16 56 | :project: DEF_BREATHE_PROJECT 57 | 58 | .. doxygentypedef:: mfxU32 59 | :project: DEF_BREATHE_PROJECT 60 | 61 | .. doxygentypedef:: mfxU64 62 | :project: DEF_BREATHE_PROJECT 63 | 64 | .. doxygentypedef:: mfxUL32 65 | :project: DEF_BREATHE_PROJECT 66 | 67 | -------- 68 | Typedefs 69 | -------- 70 | 71 | .. doxygentypedef:: mfxConfig 72 | :project: DEF_BREATHE_PROJECT 73 | 74 | .. doxygentypedef:: mfxLoader 75 | :project: DEF_BREATHE_PROJECT 76 | 77 | .. doxygentypedef:: mfxSession 78 | :project: DEF_BREATHE_PROJECT 79 | 80 | .. doxygentypedef:: mfxSyncPoint 81 | :project: DEF_BREATHE_PROJECT 82 | 83 | .. doxygentypedef:: mfxExtRefListCtrl 84 | :project: DEF_BREATHE_PROJECT 85 | 86 | .. doxygentypedef:: mfxExtEncodedFrameInfo 87 | :project: DEF_BREATHE_PROJECT 88 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_structs_decode.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _struct_decode: 8 | 9 | ================= 10 | Decode Structures 11 | ================= 12 | 13 | .. _struct_decode_begin: 14 | 15 | Structures used by Decode only. 16 | 17 | .. _struct_decode_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | 28 | mfxDecodeStat 29 | ------------- 30 | 31 | .. doxygenstruct:: mfxDecodeStat 32 | :project: DEF_BREATHE_PROJECT 33 | :members: 34 | :protected-members: 35 | 36 | mfxExtDecodeErrorReport 37 | ----------------------- 38 | 39 | .. doxygenstruct:: mfxExtDecodeErrorReport 40 | :project: DEF_BREATHE_PROJECT 41 | :members: 42 | :protected-members: 43 | 44 | mfxExtDecodedFrameInfo 45 | ---------------------- 46 | 47 | .. doxygenstruct:: mfxExtDecodedFrameInfo 48 | :project: DEF_BREATHE_PROJECT 49 | :members: 50 | :protected-members: 51 | 52 | mfxExtTimeCode 53 | -------------- 54 | 55 | .. doxygenstruct:: mfxExtTimeCode 56 | :project: DEF_BREATHE_PROJECT 57 | :members: 58 | :protected-members: 59 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_structs_decode_vpp.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _struct_decode_vpp: 8 | 9 | ====================== 10 | DECODE_VPP Structures 11 | ====================== 12 | 13 | .. _struct_decode_vpp_begin: 14 | 15 | Structures used by :term:`DECODE_VPP` only. 16 | 17 | .. _struct_decode_vpp_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | 28 | mfxSurfaceArray 29 | --------------- 30 | 31 | .. doxygenstruct:: mfxSurfaceArray 32 | :project: DEF_BREATHE_PROJECT 33 | :members: 34 | :protected-members: 35 | 36 | mfxVideoChannelParam 37 | -------------------- 38 | 39 | .. doxygenstruct:: mfxVideoChannelParam 40 | :project: DEF_BREATHE_PROJECT 41 | :members: 42 | :protected-members: 43 | 44 | mfxExtInCrops 45 | ------------- 46 | 47 | .. doxygenstruct:: mfxExtInCrops 48 | :project: DEF_BREATHE_PROJECT 49 | :members: 50 | :protected-members: 51 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_structs_impl_manage.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _struct_impl_manage: 8 | 9 | ========================= 10 | Implementation Management 11 | ========================= 12 | 13 | .. _struct_impl_man_begin: 14 | 15 | Structures used for implementation management. 16 | 17 | .. _struct_impl_man_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | mfxAdapterInfo 28 | -------------- 29 | 30 | .. doxygenstruct:: mfxAdapterInfo 31 | :project: DEF_BREATHE_PROJECT 32 | :members: 33 | :protected-members: 34 | 35 | mfxAdaptersInfo 36 | --------------- 37 | 38 | .. doxygenstruct:: mfxAdaptersInfo 39 | :project: DEF_BREATHE_PROJECT 40 | :members: 41 | :protected-members: 42 | 43 | mfxExtThreadsParam 44 | ------------------ 45 | 46 | .. doxygenstruct:: mfxExtThreadsParam 47 | :project: DEF_BREATHE_PROJECT 48 | :members: 49 | :protected-members: 50 | :undoc-members: 51 | 52 | mfxInitParam 53 | ------------ 54 | 55 | .. doxygenstruct:: mfxInitParam 56 | :project: DEF_BREATHE_PROJECT 57 | :members: 58 | :protected-members: 59 | 60 | mfxPlatform 61 | ----------- 62 | 63 | .. doxygenstruct:: mfxPlatform 64 | :project: DEF_BREATHE_PROJECT 65 | :members: 66 | :protected-members: 67 | 68 | mfxVersion 69 | ---------- 70 | 71 | .. doxygenunion:: mfxVersion 72 | :project: DEF_BREATHE_PROJECT 73 | 74 | mfxExtDeviceAffinityMask 75 | ------------------------ 76 | 77 | .. doxygenstruct:: mfxExtDeviceAffinityMask 78 | :project: DEF_BREATHE_PROJECT 79 | :members: 80 | :protected-members: 81 | 82 | mfxInitializationParam 83 | ---------------------- 84 | 85 | .. doxygenstruct:: mfxInitializationParam 86 | :project: DEF_BREATHE_PROJECT 87 | :members: 88 | :protected-members: 89 | 90 | mfxQueryProperty 91 | ---------------------- 92 | 93 | .. doxygenstruct:: mfxQueryProperty 94 | :project: DEF_BREATHE_PROJECT 95 | :members: 96 | :protected-members: 97 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_structs_protected.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _struct_protected: 8 | 9 | ==================== 10 | Protected Structures 11 | ==================== 12 | 13 | .. _struct_protected_begin: 14 | 15 | Protected structures. 16 | 17 | .. _struct_protected_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | mfxExtCencParam 28 | ---------------- 29 | 30 | .. doxygenstruct:: _mfxExtCencParam 31 | :project: DEF_BREATHE_PROJECT 32 | :members: 33 | :protected-members: 34 | -------------------------------------------------------------------------------- /doc/spec/source/API_ref/VPL_structs_type.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | .. _struct_type: 8 | 9 | ================= 10 | Type Definitions 11 | ================= 12 | 13 | .. _struct_type_begin: 14 | 15 | Structures used for type definitions. 16 | 17 | .. _struct_type_end: 18 | 19 | --- 20 | API 21 | --- 22 | 23 | .. contents:: 24 | :local: 25 | :depth: 1 26 | 27 | 28 | mfxExtBuffer 29 | ------------ 30 | 31 | .. doxygenstruct:: mfxExtBuffer 32 | :project: DEF_BREATHE_PROJECT 33 | :members: 34 | :protected-members: 35 | :undoc-members: 36 | 37 | mfxHDLPair 38 | ---------- 39 | 40 | .. doxygenstruct:: mfxHDLPair 41 | :project: DEF_BREATHE_PROJECT 42 | :members: 43 | :protected-members: 44 | 45 | mfxI16Pair 46 | ---------- 47 | 48 | .. doxygenstruct:: mfxI16Pair 49 | :project: DEF_BREATHE_PROJECT 50 | :members: 51 | :protected-members: 52 | 53 | mfxRange32U 54 | ----------- 55 | 56 | .. doxygenstruct:: mfxRange32U 57 | :project: DEF_BREATHE_PROJECT 58 | :members: 59 | :protected-members: 60 | 61 | mfxStructVersion 62 | ---------------- 63 | 64 | .. doxygenunion:: mfxStructVersion 65 | :project: DEF_BREATHE_PROJECT 66 | -------------------------------------------------------------------------------- /doc/spec/source/Versioning.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============================== 6 | |vpl_short_name| API Versioning 7 | =============================== 8 | 9 | |vpl_short_name| is the successor to |msdk_full_name|. |vpl_short_name| API versioning starts from 10 | 2.0. There is a correspondent version of |msdk_full_name| API which is used as a 11 | basis for |vpl_short_name| and defined as the ``MFX_LEGACY_VERSION`` macro. 12 | 13 | -------------------------------------------------------------------------------- /doc/spec/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {% extends "!layout.html" %} 8 | 9 | {% block sidebartitle %} 10 | 11 | {% if theme_display_version %} 12 | {%- set nav_version = version %} 13 | {% if READTHEDOCS and current_version %} 14 | {%- set nav_version = current_version %} 15 | {% endif %} 16 | {% if nav_version %} 17 |
18 | {{ nav_version }} 19 |
20 | {% endif %} 21 | {% endif %} 22 | 23 | {% include "searchbox.html" %} 24 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /doc/spec/source/appendix/VPL_apnds_f.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ===================== 6 | CQP HRD Mode Encoding 7 | ===================== 8 | 9 | The application can configure an AVC encoder to work in CQP rate control mode with 10 | HRD model parameters. |vpl_short_name| will place HRD information to SPS/VUI and choose the 11 | appropriate profile/level. It’s the responsibility of the application to provide 12 | per-frame QP, track HRD conformance, and insert required SEI messages to the 13 | bitstream. 14 | 15 | The following example shows how to enable CQP HRD mode. The application should 16 | set :ref:`RateControlMethod` to CQP, 17 | :cpp:member:`mfxExtCodingOption::VuiNalHrdParameters` to ON, 18 | :cpp:member:`mfxExtCodingOption::NalHrdConformance` to OFF, and 19 | set rate control parameters similar to CBR or VBR modes (instead of QPI, QPP, 20 | and QPB). |vpl_short_name| will choose CBR or VBR HRD mode based on the ``MaxKbps`` 21 | parameter. If ``MaxKbps`` is set to zero, |vpl_short_name| will use CBR HRD model 22 | (write cbr_flag = 1 to VUI), otherwise the VBR model will be used 23 | (and cbr_flag = 0 is written to VUI). 24 | 25 | .. note:: For CQP, if implementation does not support individual QPI, QPP and QPB 26 | parameters, then QPI parameter should be used as a QP parameter across all frames. 27 | 28 | .. literalinclude:: ../snippets/appnd_f.c 29 | :language: c++ 30 | :start-after: /*beg1*/ 31 | :end-before: /*end1*/ 32 | :lineno-start: 1 33 | 34 | 35 | -------------------------------------------------------------------------------- /doc/spec/source/appendix/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | Appendices 7 | ========== 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | :maxdepth: 1 12 | 13 | VPL_apnds_a 14 | VPL_apnds_b 15 | VPL_apnds_c 16 | VPL_apnds_d 17 | VPL_apnds_e 18 | VPL_apnds_f 19 | -------------------------------------------------------------------------------- /doc/spec/source/architecture/VPL_decoding_vpp.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================================= 6 | Video Decoding with multiple video processing 7 | ============================================= 8 | 9 | The :term:`DECODE_VPP` class of functions take a compressed bitstream as input, 10 | converts it to raw frames and applies video processing filters to raw frames. 11 | Users can set several output channels where each channel represents a list 12 | of video processing filters applied for decoded frames. 13 | 14 | The :term:`DECODE_VPP` supports only internal allocation. 15 | -------------------------------------------------------------------------------- /doc/spec/source/conf.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | """ 5 | Main configuration file for specification build. 6 | """ 7 | # pylint: disable=invalid-name,exec-used 8 | 9 | # For Intel® Video Processing Library (Intel® VPL) 10 | 11 | # -*- coding: utf-8 -*- 12 | # 13 | # Configuration file for the Sphinx documentation builder. 14 | # 15 | # This file does only contain a selection of the most common options. For a 16 | # full list see the documentation: 17 | # http://www.sphinx-doc.org/en/master/config 18 | 19 | # -- Path setup -------------------------------------------------------------- 20 | 21 | # If extensions (or modules to document with autodoc) are in another directory, 22 | # add these directories to sys.path here. If the directory is relative to the 23 | # documentation root, use os.path.abspath to make it absolute, like shown here. 24 | # 25 | import sys 26 | from os.path import join 27 | 28 | project = 'Intel\u00AE VPL' 29 | 30 | repo_root = '..' 31 | sys.path.append(repo_root) 32 | exec(open(join(repo_root, 'common_conf.py'), encoding="utf-8").read()) # nosec # pylint: disable=R1732 33 | exec(open(join(repo_root, 'element_conf.py'), encoding="utf-8").read()) # nosec # pylint: disable=R1732 34 | 35 | cpp_id_attributes = ['MFX_CDECL', 'MFX_DEPRECATED'] 36 | 37 | c_id_attributes = ['MFX_CDECL', 'MFX_DEPRECATED'] 38 | 39 | spelling_word_list_filename = ['../spelling_wordlist.txt'] 40 | -------------------------------------------------------------------------------- /doc/spec/source/images/extbrc_async.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/spec/source/images/extbrc_async.png -------------------------------------------------------------------------------- /doc/spec/source/images/frame_cmplx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/spec/source/images/frame_cmplx.png -------------------------------------------------------------------------------- /doc/spec/source/images/lookahead_qp_calulation_algo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/spec/source/images/lookahead_qp_calulation_algo.png -------------------------------------------------------------------------------- /doc/spec/source/images/sdk_function_naming_convention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/spec/source/images/sdk_function_naming_convention.png -------------------------------------------------------------------------------- /doc/spec/source/images/vpp_region_of_interest_operation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/doc/spec/source/images/vpp_region_of_interest_operation.png -------------------------------------------------------------------------------- /doc/spec/source/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _VPL-section: 6 | 7 | ================ 8 | |vpl_short_name| 9 | ================ 10 | 11 | The |vpl_full_name| (|vpl_short_name|) is a programming interface for video decoding, 12 | encoding, and processing to build portable media pipelines on CPUs, 13 | GPUs, and other accelerators. It provides device discovery and selection in 14 | media centric and video analytics workloads as well as API primitives for zero-copy 15 | buffer sharing. |vpl_short_name| is backwards and cross-architecture compatible to ensure 16 | optimal execution on current and next generation hardware without source code 17 | changes. 18 | 19 | .. rubric:: Specification Version 20 | 21 | This document contains |vpl_short_name| specification version |vpl_version|. 22 | 23 | Latest published version of |vpl_short_name| specification: ``__. 24 | 25 | .. toctree:: 26 | :titlesonly: 27 | 28 | VPL_intel_media_sdk 29 | architecture/index 30 | programming_guide/index 31 | VPL_summary 32 | API_ref/VPL_api_ref 33 | Versioning 34 | Experimental 35 | appendix/index 36 | VPL_acronyms 37 | VPL_deprecation 38 | VPL_change_log 39 | -------------------------------------------------------------------------------- /doc/spec/source/programming_guide/VPL_prg_surface_sharing.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _surface-sharing: 6 | 7 | ======================================= 8 | Importing and Exporting Shared Surfaces 9 | ======================================= 10 | 11 | |vpl_short_name| API 2.10 introduces new interfaces for sharing surfaces between 12 | |vpl_short_name| runtime and other applications, frameworks, and graphics 13 | APIs. This functionality is only supported when using the :ref:`internal memory 14 | management` model. 15 | 16 | **Importing** a surface enables |vpl_short_name| to access raw video data as input to encode or VPP 17 | operations without first mapping the data to system memory and then copying it to 18 | a surface allocated by |vpl_short_name| runtime using :cpp:member:`mfxFrameSurfaceInterface::Map`. 19 | 20 | **Exporting** a surface similarly enables the application to access raw video 21 | data which is the output of decode or VPP operations and which was allocated by 22 | |vpl_short_name| runtime, without first mapping to system memory using 23 | :cpp:member:`mfxFrameSurfaceInterface::Map`. 24 | 25 | -------------- 26 | Import Example 27 | -------------- 28 | 29 | The following code snippet shows an example of importing a shared surface. 30 | 31 | .. literalinclude:: ../snippets/prg_surface_sharing.cpp 32 | :language: c++ 33 | :start-after: /*beg1*/ 34 | :end-before: /*end1*/ 35 | :lineno-start: 1 36 | 37 | -------------- 38 | Export Example 39 | -------------- 40 | 41 | The following code snippet shows an example of exporting a shared surface. 42 | 43 | .. literalinclude:: ../snippets/prg_surface_sharing.cpp 44 | :language: c++ 45 | :start-after: /*beg2*/ 46 | :end-before: /*end2*/ 47 | :lineno-start: 1 48 | 49 | -------------------------------------------------------------------------------- /doc/spec/source/programming_guide/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | .. 5 | Intel(r) Video Processing Library (Intel(r) VPL) 6 | 7 | ================= 8 | Programming Guide 9 | ================= 10 | 11 | This chapter describes the concepts used in programming with |vpl_short_name|. 12 | 13 | The application must use the include file :file:`mfx.h` for C/C++ programming 14 | and link the |vpl_short_name| dispatcher library :file:`libvpl.so`. 15 | 16 | Include these files: 17 | 18 | .. code-block:: c++ 19 | 20 | #include "mfx.h" /* Intel® VPL include file */ 21 | 22 | Link this library: 23 | 24 | .. code-block:: c++ 25 | 26 | libvpl.so /* Intel® VPL dynamic dispatcher library (Linux\*) */ 27 | 28 | .. toctree:: 29 | :hidden: 30 | 31 | VPL_prg_stc 32 | VPL_prg_session 33 | VPL_prg_frame 34 | VPL_prg_decoding 35 | VPL_prg_encoding 36 | VPL_prg_vpp 37 | VPL_prg_transcoding 38 | VPL_prg_config 39 | VPL_prg_hw 40 | VPL_prg_mem 41 | VPL_prg_surface_sharing 42 | VPL_prg_err 43 | -------------------------------------------------------------------------------- /doc/spec/source/snippets/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | DisableFormat: true 3 | SortIncludes: false 4 | ... 5 | -------------------------------------------------------------------------------- /doc/spec/source/snippets/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | exclude_files=. -------------------------------------------------------------------------------- /doc/spec/source/snippets/appnd_b.c: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #include "mfxdefs.h" 8 | #include "mfxvideo.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | /* These macro required for code compilation. */ 15 | #define sps_buffer NULL 16 | #define sps_buffer_length 0 17 | #define pps_buffer NULL 18 | #define pps_buffer_length 0 19 | mfxSession session; 20 | /* end of internal stuff */ 21 | 22 | /*beg*/ 23 | mfxStatus init_encoder() { 24 | mfxExtCodingOptionSPSPPS option, *option_array; 25 | 26 | /* configure mfxExtCodingOptionSPSPPS */ 27 | memset(&option,0,sizeof(option)); 28 | option.Header.BufferId=MFX_EXTBUFF_CODING_OPTION_SPSPPS; 29 | option.Header.BufferSz=sizeof(option); 30 | option.SPSBuffer=sps_buffer; 31 | option.SPSBufSize=sps_buffer_length; 32 | option.PPSBuffer=pps_buffer; 33 | option.PPSBufSize=pps_buffer_length; 34 | 35 | /* configure mfxVideoParam */ 36 | mfxVideoParam param; 37 | //... 38 | param.NumExtParam=1; 39 | option_array=&option; 40 | param.ExtParam=(mfxExtBuffer**)&option_array; 41 | 42 | /* encoder initialization */ 43 | mfxStatus status; 44 | status=MFXVideoENCODE_Init(session, ¶m); 45 | if (status==MFX_ERR_INCOMPATIBLE_VIDEO_PARAM) { 46 | printf("Initialization failed.\n"); 47 | } else { 48 | printf("Initialized.\n"); 49 | } 50 | return status; 51 | } 52 | /*end*/ 53 | -------------------------------------------------------------------------------- /doc/spec/source/snippets/appnd_f.c: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #include 8 | 9 | #include "mfxdefs.h" 10 | #include "mfxvideo.h" 11 | 12 | /* These macro required for code compilation. */ 13 | mfxSession session; 14 | #define valid_non_zero_value 1 15 | #define frame_qp 4 16 | int write_cbr_flag; 17 | mfxFrameSurface1 *surface2; 18 | mfxBitstream *bits; 19 | mfxSyncPoint syncp; 20 | /* end of internal stuff */ 21 | 22 | static void appnd_f1() 23 | { 24 | /*beg1*/ 25 | mfxExtCodingOption option, *option_array; 26 | 27 | /* configure mfxExtCodingOption */ 28 | memset(&option,0,sizeof(option)); 29 | option.Header.BufferId = MFX_EXTBUFF_CODING_OPTION; 30 | option.Header.BufferSz = sizeof(option); 31 | option.VuiNalHrdParameters = MFX_CODINGOPTION_ON; 32 | option.NalHrdConformance = MFX_CODINGOPTION_OFF; 33 | 34 | /* configure mfxVideoParam */ 35 | mfxVideoParam param; 36 | 37 | // ... 38 | 39 | param.mfx.RateControlMethod = MFX_RATECONTROL_CQP; 40 | param.mfx.FrameInfo.FrameRateExtN = valid_non_zero_value; 41 | param.mfx.FrameInfo.FrameRateExtD = valid_non_zero_value; 42 | param.mfx.BufferSizeInKB = valid_non_zero_value; 43 | param.mfx.InitialDelayInKB = valid_non_zero_value; 44 | param.mfx.TargetKbps = valid_non_zero_value; 45 | 46 | if (write_cbr_flag == 1) 47 | param.mfx.MaxKbps = 0; 48 | else /* write_cbr_flag = 0 */ 49 | param.mfx.MaxKbps = valid_non_zero_value; 50 | 51 | param.NumExtParam = 1; 52 | option_array = &option; 53 | param.ExtParam = (mfxExtBuffer **)&option_array; 54 | 55 | /* encoder initialization */ 56 | mfxStatus sts; 57 | sts = MFXVideoENCODE_Init(session, ¶m); 58 | 59 | // ... 60 | 61 | /* encoding */ 62 | mfxEncodeCtrl ctrl; 63 | memset(&ctrl,0,sizeof(ctrl)); 64 | ctrl.QP = frame_qp; 65 | 66 | sts=MFXVideoENCODE_EncodeFrameAsync(session,&ctrl,surface2,bits,&syncp); 67 | /*end1*/ 68 | } 69 | -------------------------------------------------------------------------------- /doc/spec/source/snippets/prg_err.c: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "mfxdefs.h" 12 | #include "mfxvideo.h" 13 | 14 | /* These macro required for code compilation. */ 15 | #define INFINITE 0 16 | 17 | mfxSession session; 18 | mfxBitstream *bitstream; 19 | mfxFrameSurface1 *surface_work, *surface_disp; 20 | mfxSyncPoint buffered_syncp, syncp; 21 | /* end of internal stuff */ 22 | 23 | static void prg_handle_device_busy (mfxSession session, mfxSyncPoint sp) { 24 | if (sp) { 25 | MFXVideoCORE_SyncOperation(session, sp, INFINITE); 26 | } else { 27 | sleep(5); 28 | } 29 | } 30 | 31 | 32 | 33 | static void prg_err () { 34 | /*beg1*/ 35 | mfxStatus sts=MFX_ERR_NONE; 36 | for (;;) { 37 | // do something 38 | sts=MFXVideoDECODE_DecodeFrameAsync(session, bitstream, surface_work, &surface_disp, &syncp); 39 | if (sts == MFX_ERR_NONE) buffered_syncp = syncp; 40 | else if (sts == MFX_WRN_DEVICE_BUSY) prg_handle_device_busy(session, syncp ? syncp : buffered_syncp); 41 | 42 | } 43 | /*end1*/ 44 | } 45 | -------------------------------------------------------------------------------- /doc/spec/source/snippets/prg_transcoding.c: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) 2020 Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #include 8 | 9 | #include "mfxdefs.h" 10 | #include "mfxstructures.h" 11 | #include "mfxsession.h" 12 | #include "mfxvideo.h" 13 | 14 | /* These macro required for code compilation. */ 15 | #define INFINITE 0 16 | #define UNUSED_PARAM(x) (void)(x) 17 | 18 | mfxSession session; 19 | mfxBitstream *bs, *bits2; 20 | mfxFrameSurface1 *work, *vin, *vout; 21 | int going_through_vpp=1; 22 | 23 | static void allocate_surfaces(mfxU32 num_surfaces) { 24 | UNUSED_PARAM(num_surfaces); 25 | } 26 | 27 | /* end of internal stuff */ 28 | 29 | static void prg_transcoding1 () { 30 | /*beg1*/ 31 | mfxSyncPoint sp_d, sp_e; 32 | MFXVideoDECODE_DecodeFrameAsync(session,bs,work,&vin, &sp_d); 33 | if (going_through_vpp) { 34 | MFXVideoVPP_RunFrameVPPAsync(session,vin,vout, NULL, &sp_d); 35 | MFXVideoENCODE_EncodeFrameAsync(session,NULL,vout,bits2,&sp_e); 36 | } else { 37 | MFXVideoENCODE_EncodeFrameAsync(session,NULL,vin,bits2,&sp_e); 38 | } 39 | MFXVideoCORE_SyncOperation(session,sp_e,INFINITE); 40 | /*end1*/ 41 | } 42 | 43 | static void prg_transcoding2 () { 44 | /*beg2*/ 45 | mfxVideoParam init_param_v, init_param_e; 46 | mfxFrameAllocRequest response_v[2], response_e; 47 | 48 | // Desired depth 49 | mfxU16 async_depth=4; 50 | 51 | init_param_v.AsyncDepth=async_depth; 52 | MFXVideoVPP_QueryIOSurf(session, &init_param_v, response_v); 53 | init_param_e.AsyncDepth=async_depth; 54 | MFXVideoENCODE_QueryIOSurf(session, &init_param_e, &response_e); 55 | mfxU32 num_surfaces = response_v[1].NumFrameSuggested 56 | + response_e.NumFrameSuggested 57 | - async_depth; /* double counted in ENCODE & VPP */ 58 | 59 | allocate_surfaces(num_surfaces); 60 | /*end2*/ 61 | } 62 | -------------------------------------------------------------------------------- /doc/spec/ubuntu-packages.txt: -------------------------------------------------------------------------------- 1 | doxygen 2 | enchant 3 | git 4 | graphviz 5 | inkscape 6 | latexmk 7 | python3 8 | python3-pip 9 | python3-venv 10 | plantuml 11 | texlive-fonts-extra 12 | texlive-fonts-recommended 13 | texlive-latex-base 14 | texlive-latex-extra 15 | wget 16 | -------------------------------------------------------------------------------- /env/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | cmake_minimum_required(VERSION 3.13.0) 7 | 8 | file(RELATIVE_PATH env_rel_prefix "${VPL_INSTALL_FULL_ENVDIR}" 9 | "${CMAKE_INSTALL_PREFIX}") 10 | # remove trailing slash 11 | string(REGEX REPLACE "\/$" "" env_rel_prefix "${env_rel_prefix}") 12 | 13 | # convert to native path 14 | file(TO_NATIVE_PATH "${env_rel_prefix}" env_rel_prefix) 15 | file(TO_NATIVE_PATH "${CMAKE_INSTALL_INCLUDEDIR}" _install_includedir) 16 | file(TO_NATIVE_PATH "${CMAKE_INSTALL_LIBDIR}" _install_libdir) 17 | file(TO_NATIVE_PATH "${CMAKE_INSTALL_BINDIR}" _install_bindir) 18 | file(TO_NATIVE_PATH "${VPL_INSTALL_EXAMPLEDIR}" _install_exampledir) 19 | 20 | if(WIN32) 21 | install( 22 | PROGRAMS "cmd/vars.bat" 23 | DESTINATION "${VPL_INSTALL_ENVDIR}" 24 | COMPONENT ${VPL_COMPONENT_DEV}) 25 | 26 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 27 | set(ENV_SCRIPT_NAME "vars64.bat") 28 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) 29 | set(ENV_SCRIPT_NAME "vars32.bat") 30 | endif() 31 | configure_file("cmd/varsxx.bat.in" "${ENV_SCRIPT_NAME}" @ONLY) 32 | 33 | install( 34 | PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${ENV_SCRIPT_NAME}" 35 | DESTINATION "${VPL_INSTALL_ENVDIR}" 36 | COMPONENT ${VPL_COMPONENT_DEV}) 37 | else() 38 | file(TO_CMAKE_PATH "${env_rel_prefix}" env_rel_prefix) 39 | file(TO_CMAKE_PATH "${CMAKE_INSTALL_INCLUDEDIR}" _install_includedir) 40 | file(TO_CMAKE_PATH "${CMAKE_INSTALL_LIBDIR}" _install_libdir) 41 | file(TO_CMAKE_PATH "${CMAKE_INSTALL_BINDIR}" _install_bindir) 42 | file(TO_CMAKE_PATH "${VPL_INSTALL_PKGCONFIGDIR}" _install_pkgconfigdir) 43 | set(ENV_SCRIPT_NAME "vars.sh") 44 | configure_file("sh/vars.sh.in" "${ENV_SCRIPT_NAME}" @ONLY) 45 | install( 46 | PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${ENV_SCRIPT_NAME}" 47 | DESTINATION "${VPL_INSTALL_ENVDIR}" 48 | COMPONENT ${VPL_COMPONENT_DEV}) 49 | endif() 50 | -------------------------------------------------------------------------------- /env/cmd/vars.bat: -------------------------------------------------------------------------------- 1 | ::------------------------------------------------------------------------------ 2 | :: Copyright (C) Intel Corporation 3 | :: 4 | :: SPDX-License-Identifier: MIT 5 | ::------------------------------------------------------------------------------ 6 | :: Configure environment variables 7 | @echo off 8 | setlocal 9 | set VPL_TARGET_ARCH=intel64 10 | for %%Q in ("%~dp0\.") DO set "script_dir=%%~fQ" 11 | 12 | :ParseArgs 13 | if /i "%1"=="" goto EndParseArgs 14 | if /i "%1"=="ia32" (set VPL_TARGET_ARCH=ia32) & shift & goto ParseArgs 15 | if /i "%1"=="intel64" (set VPL_TARGET_ARCH=intel64) & shift & goto ParseArgs 16 | shift & goto ParseArgs 17 | :EndParseArgs 18 | 19 | IF "%VPL_TARGET_ARCH%"=="ia32" ( 20 | endlocal 21 | call "%script_dir%\vars32.bat" %* 22 | setlocal 23 | set vpl_vars_errorlevel=%errorlevel% 24 | ) ELSE ( 25 | endlocal 26 | call "%script_dir%\vars64.bat" %* 27 | setlocal 28 | set vpl_vars_errorlevel=%errorlevel% 29 | ) 30 | exit /B %vpl_vars_errorlevel% 31 | -------------------------------------------------------------------------------- /env/cmd/varsxx.bat.in: -------------------------------------------------------------------------------- 1 | ::------------------------------------------------------------------------------ 2 | :: Copyright (C) Intel Corporation 3 | :: 4 | :: SPDX-License-Identifier: MIT 5 | ::------------------------------------------------------------------------------ 6 | :: Configure environment variables 7 | @echo off 8 | FOR /D %%i IN ("%~dp0\@env_rel_prefix@") DO ( 9 | set VPL_PREFIX=%%~fi 10 | ) 11 | 12 | IF DEFINED INCLUDE ( 13 | set "INCLUDE=%VPL_PREFIX%\@_install_includedir@;%INCLUDE%" 14 | ) ELSE ( 15 | set "INCLUDE=%VPL_PREFIX%\@_install_includedir@" 16 | ) 17 | 18 | IF DEFINED LIB ( 19 | set "LIB=%VPL_PREFIX%\@_install_libdir@;%LIB%" 20 | ) ELSE ( 21 | set "LIB=%VPL_PREFIX%\@_install_libdir@" 22 | ) 23 | 24 | IF DEFINED PATH ( 25 | set "PATH=%VPL_PREFIX%\@_install_bindir@;%PATH%" 26 | ) ELSE ( 27 | set "PATH=%VPL_PREFIX%\@_install_bindir@" 28 | ) 29 | 30 | IF DEFINED CMAKE_PREFIX_PATH ( 31 | set "CMAKE_PREFIX_PATH=%VPL_PREFIX%;%CMAKE_PREFIX_PATH%" 32 | ) ELSE ( 33 | set "CMAKE_PREFIX_PATH=%VPL_PREFIX%" 34 | ) 35 | 36 | IF DEFINED PKG_CONFIG_PATH ( 37 | set "PKG_CONFIG_PATH=%VPL_PREFIX%\@_install_pkgconfigdir@;%PKG_CONFIG_PATH%" 38 | ) ELSE ( 39 | set "PKG_CONFIG_PATH=%VPL_PREFIX%\@_install_pkgconfigdir@" 40 | ) 41 | set "VPL_EXAMPLES_PATH=%VPL_PREFIX%\@_install_exampledir@" 42 | set VPL_PREFIX= 43 | -------------------------------------------------------------------------------- /examples/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | filter=-readability/casting 2 | filter=-build/include_subdir 3 | filter=-build/header_guard 4 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | This directory contains Intel® Video Processing Library (Intel® VPL) example code. 2 | 3 | Please note: this code is provided to illustrate API concepts only. It is not intended for use in production code or for performance benchmarks. 4 | 5 | # api1x_core: 6 | These examples demonstrate use of the legacy 1.x core API subset which remains portable across hardware enabled by both 7 | Intel® Media SDK and Intel® VPL GPU runtimes. (The core API subset is Media SDK 1.x API - features removed in Intel® VPL.) 8 | This style of coding can use Intel® VPL implementation capability queries but applications must manage surface allocation. 9 | Use this approach for maximum portability when legacy hardware support is required. 10 | For more information see our [Transition Guide](https://www.intel.com/content/www/us/en/develop/documentation/upgrading-from-msdk-to-onevpl/top.html) 11 | 12 | # api2x: 13 | This group of examples demonstrates use of 2.x API capabilities including internal allocation. This means that applications 14 | do not need to manage surface allocation lifecycles. 15 | Use of these examples requires a runtime implementation compatible with the 16 | VPL 2.x API, such as the [Intel® VPL GPU Runtime](https://github.com/intel/vpl-gpu-rt). 17 | Please note: the [Intel® Media SDK runtime](https://github.com/Intel-Media-SDK/MediaSDK) only provides API 1.35, and is not 18 | compatible with these examples. 19 | 20 | # interop: 21 | The examples in this group showcase pipelines combining Intel® VPL media capabilities with other APIs such as the OpenVINO™ Toolkit Interface. 22 | -------------------------------------------------------------------------------- /examples/api1x_core/legacy-decode/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api1x_core/legacy-decode/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api1x_core/legacy-decode/README.md -------------------------------------------------------------------------------- /examples/api1x_core/legacy-encode/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api1x_core/legacy-encode/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api1x_core/legacy-encode/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api1x_core/legacy-encode/README.md -------------------------------------------------------------------------------- /examples/api1x_core/legacy-vpp/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api1x_core/legacy-vpp/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api1x_core/legacy-vpp/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-decode/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-decode/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-decode/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-decode/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-decvpp/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-decvpp/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-decvpp/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-decvpp/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-encode-jpeg/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-encode-jpeg/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-encode-jpeg/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-encode-jpeg/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-encode/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-encode/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-encode/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-encode/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-dx11/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-dx11/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-dx11/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-sharing-dx11/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-dx11/include/device-d3d11.h: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // Copyright Intel Corporation 3 | // 4 | // SPDX-License-Identifier: MIT 5 | //============================================================================== 6 | 7 | #ifndef DISPATCHER_TEST_HELLO_SHARING_IMPORT_SRC_HW_DEVICE_H_ 8 | #define DISPATCHER_TEST_HELLO_SHARING_IMPORT_SRC_HW_DEVICE_H_ 9 | 10 | #if defined(_WIN32) || defined(_WIN64) 11 | 12 | #include 13 | #include 14 | #include 15 | #include "vpl/mfx.h" 16 | 17 | struct DevCtxD3D11 { 18 | public: 19 | DevCtxD3D11() : pDXGIFactory(), pAdapter(), pD3D11Device(), pD3D11Ctx() {} 20 | ~DevCtxD3D11() {} 21 | 22 | mfxStatus InitDevice(mfxU32 nAdapterNum, mfxHandleType *pHandleType, mfxHDL *pHandle); 23 | CComPtr GetVideoTexture(mfxU16 width, mfxU16 height, mfxU8 *data); 24 | 25 | __inline ID3D11Device *GetDeviceHandle(void) { 26 | return pD3D11Device; 27 | } 28 | 29 | private: 30 | CComPtr pDXGIFactory; 31 | CComQIPtr pAdapter; 32 | CComPtr pD3D11Device; 33 | CComPtr pD3D11Ctx; 34 | }; 35 | 36 | struct DevCtx : DevCtxD3D11 37 | 38 | { 39 | public: 40 | DevCtx() {} 41 | ~DevCtx() {} 42 | }; 43 | #endif // Windows 44 | 45 | #endif // DISPATCHER_TEST_HELLO_SHARING_IMPORT_SRC_HW_DEVICE_H_ 46 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-ocl/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-ocl/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-ocl/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-sharing-ocl/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-ocl/include/device-d3d11.h: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // Copyright Intel Corporation 3 | // 4 | // SPDX-License-Identifier: MIT 5 | //============================================================================== 6 | 7 | #ifndef DISPATCHER_TEST_HELLO_SHARING_IMPORT_SRC_HW_DEVICE_H_ 8 | #define DISPATCHER_TEST_HELLO_SHARING_IMPORT_SRC_HW_DEVICE_H_ 9 | 10 | #if defined(_WIN32) || defined(_WIN64) 11 | 12 | #include 13 | #include 14 | #include 15 | #include "vpl/mfx.h" 16 | 17 | struct DevCtxD3D11 { 18 | public: 19 | DevCtxD3D11() : pDXGIFactory(), pAdapter(), pD3D11Device(), pD3D11Ctx() {} 20 | ~DevCtxD3D11() {} 21 | 22 | mfxStatus InitDevice(mfxU32 nAdapterNum, mfxHandleType *pHandleType, mfxHDL *pHandle); 23 | CComPtr GetVideoTexture(mfxU16 width, mfxU16 height, mfxU8 *data); 24 | 25 | __inline ID3D11Device *GetDeviceHandle(void) { 26 | return pD3D11Device; 27 | } 28 | 29 | private: 30 | CComPtr pDXGIFactory; 31 | CComQIPtr pAdapter; 32 | CComPtr pD3D11Device; 33 | CComPtr pD3D11Ctx; 34 | }; 35 | 36 | struct DevCtx : DevCtxD3D11 37 | 38 | { 39 | public: 40 | DevCtx() {} 41 | ~DevCtx() {} 42 | }; 43 | #endif // Windows 44 | 45 | #endif // DISPATCHER_TEST_HELLO_SHARING_IMPORT_SRC_HW_DEVICE_H_ 46 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-vaapi/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-vaapi/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-vaapi/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-sharing-vaapi/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-sharing-vaapi/include/device-vaapi.h: -------------------------------------------------------------------------------- 1 | //============================================================================== 2 | // Copyright Intel Corporation 3 | // 4 | // SPDX-License-Identifier: MIT 5 | //============================================================================== 6 | 7 | #ifndef DISPATCHER_HELLO_VAAPI_SHARING_IMPORT_SRC_HW_DEVICE_H_ 8 | #define DISPATCHER_HELLO_VAAPI_SHARING_IMPORT_SRC_HW_DEVICE_H_ 9 | #ifdef __linux__ 10 | #include 11 | #include 12 | #include "va/va.h" 13 | #include "va/va_drm.h" 14 | #include "va/va_drmcommon.h" 15 | 16 | #include "vpl/mfx.h" 17 | struct DevCtxVAAPI { 18 | public: 19 | DevCtxVAAPI() : m_vaDRMfd(-1), m_vaDisplay() {} 20 | 21 | ~DevCtxVAAPI() { 22 | if (m_vaDisplay) { 23 | vaTerminate(m_vaDisplay); 24 | m_vaDisplay = nullptr; 25 | } 26 | 27 | if (m_vaDRMfd >= 0) { 28 | close(m_vaDRMfd); 29 | m_vaDRMfd = -1; 30 | } 31 | } 32 | 33 | mfxStatus InitDevice(mfxU32 nAdapterNum, mfxHandleType *pHandleType, mfxHDL *pHandle); 34 | 35 | VADisplay GetVADisplay(void) { 36 | return m_vaDisplay; 37 | } 38 | 39 | VASurfaceID CreateSurfaceToShare(mfxU16 width, 40 | mfxU16 height, 41 | mfxU8 *data, 42 | bool brender = false); 43 | 44 | private: 45 | int m_vaDRMfd; 46 | VADisplay m_vaDisplay; 47 | }; 48 | 49 | #endif //Linux 50 | 51 | #endif // DISPATCHER__HELLO_VAAPI_SHARING_IMPORT_SRC_HW_DEVICE_H_ 52 | -------------------------------------------------------------------------------- /examples/api2x/hello-transcode/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-transcode/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-transcode/README.md -------------------------------------------------------------------------------- /examples/api2x/hello-vpp/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/api2x/hello-vpp/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/api2x/hello-vpp/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/api2x/hello-vpp/README.md -------------------------------------------------------------------------------- /examples/content/cars_320x240.bgra: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.bgra -------------------------------------------------------------------------------- /examples/content/cars_320x240.h264: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.h264 -------------------------------------------------------------------------------- /examples/content/cars_320x240.h265: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.h265 -------------------------------------------------------------------------------- /examples/content/cars_320x240.i420: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.i420 -------------------------------------------------------------------------------- /examples/content/cars_320x240.mjpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.mjpeg -------------------------------------------------------------------------------- /examples/content/cars_320x240.nv12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.nv12 -------------------------------------------------------------------------------- /examples/content/cars_320x240.y8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/content/cars_320x240.y8 -------------------------------------------------------------------------------- /examples/interop/vpl-infer/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | filter=-build/namespaces 2 | -------------------------------------------------------------------------------- /examples/interop/vpl-infer/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/interop/vpl-infer/PreLoad.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | set(CMAKE_GENERATOR_PLATFORM 3 | x64 4 | CACHE STRING "") 5 | message(STATUS "Generator Platform set to ${CMAKE_GENERATOR_PLATFORM}") 6 | endif() 7 | -------------------------------------------------------------------------------- /examples/tutorials/01_transition/License.txt: -------------------------------------------------------------------------------- 1 | Copyright Intel Corporation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /examples/tutorials/01_transition/MediaSDK/cmake/FindMFX.cmake: -------------------------------------------------------------------------------- 1 | include(FindPackageHandleStandardArgs) 2 | 3 | # INTELMEDIASDKROOT is the Media SDK install location it can be set either by 4 | # environment variable (default for Media SDK install) or with 5 | # -DINTELMEDIASDKROOT 6 | 7 | if(DEFINED ENV{INTELMEDIASDKROOT}) 8 | set(INTELMEDIASDKROOT $ENV{INTELMEDIASDKROOT}) 9 | endif() 10 | 11 | find_path(MFX_INCLUDE_DIR mfxvideo.h PATHS ${INTELMEDIASDKROOT}/include) 12 | find_library(MFX_LIBRARY libmfx PATHS ${INTELMEDIASDKROOT}/lib/x64) 13 | 14 | if(NOT MFX_LIBRARY) 15 | message( 16 | FATAL_ERROR 17 | "libmfx not found. Set INTELMEDIASDKROOT to root of Media SDK install directory" 18 | ) 19 | endif() 20 | 21 | find_package_handle_standard_args(MFX DEFAULT_MSG MFX_INCLUDE_DIR MFX_LIBRARY) 22 | 23 | mark_as_advanced(MFX_LIBRARY MFX_INCLUDE_DIR) 24 | 25 | if(MFX_FOUND) 26 | set(MFX_LIBRARIES ${MFX_LIBRARY}) 27 | set(MFX_INCLUDE_DIRS ${MFX_INCLUDE_DIR}) 28 | endif() 29 | -------------------------------------------------------------------------------- /examples/tutorials/01_transition/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/examples/tutorials/01_transition/README.md -------------------------------------------------------------------------------- /libvpl/CPPLINT.cfg: -------------------------------------------------------------------------------- 1 | root=.. 2 | filter=-runtime/references 3 | filter=-readability/casting 4 | filter=-build/namespaces 5 | -------------------------------------------------------------------------------- /libvpl/cmake/VPLConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | 7 | set(PACKAGE_VERSION "@API_VERSION_MAJOR@.@API_VERSION_MINOR@") 8 | 9 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 10 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 11 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 12 | else() 13 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 14 | if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 15 | set(PACKAGE_VERSION_EXACT TRUE) 16 | endif() 17 | endif() 18 | -------------------------------------------------------------------------------- /libvpl/pkgconfig/vpl.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@pc_rel_prefix@ 2 | libdir=@pc_rel_libdir@ 3 | includedir=@pc_rel_incdir@ 4 | 5 | Name: Intel(R) Video Processing Library 6 | Description: Accelerated video decode, encode, and frame processing capabilities on Intel(R) GPUs 7 | Version: @API_VERSION_MAJOR@.@API_VERSION_MINOR@ 8 | URL: https://github.com/intel/libvpl 9 | 10 | Libs: -L${libdir} -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@ 11 | Libs.private: @VPL_PKGCONFIG_PRIVATE_LIBS@ 12 | Cflags: -I${includedir} -I${includedir}/vpl 13 | -------------------------------------------------------------------------------- /libvpl/src/linux/libvpl.map: -------------------------------------------------------------------------------- 1 | LIBVPL_2.0 { 2 | global: 3 | MFXInit; 4 | MFXClose; 5 | MFXQueryIMPL; 6 | MFXQueryVersion; 7 | 8 | MFXJoinSession; 9 | MFXDisjoinSession; 10 | MFXCloneSession; 11 | MFXSetPriority; 12 | MFXGetPriority; 13 | 14 | MFXVideoCORE_SetFrameAllocator; 15 | MFXVideoCORE_SetHandle; 16 | MFXVideoCORE_GetHandle; 17 | MFXVideoCORE_QueryPlatform; 18 | MFXVideoCORE_SyncOperation; 19 | 20 | MFXVideoENCODE_Query; 21 | MFXVideoENCODE_QueryIOSurf; 22 | MFXVideoENCODE_Init; 23 | MFXVideoENCODE_Reset; 24 | MFXVideoENCODE_Close; 25 | MFXVideoENCODE_GetVideoParam; 26 | MFXVideoENCODE_GetEncodeStat; 27 | MFXVideoENCODE_EncodeFrameAsync; 28 | 29 | MFXVideoDECODE_Query; 30 | MFXVideoDECODE_DecodeHeader; 31 | MFXVideoDECODE_QueryIOSurf; 32 | MFXVideoDECODE_Init; 33 | MFXVideoDECODE_Reset; 34 | MFXVideoDECODE_Close; 35 | MFXVideoDECODE_GetVideoParam; 36 | MFXVideoDECODE_GetDecodeStat; 37 | MFXVideoDECODE_SetSkipMode; 38 | MFXVideoDECODE_GetPayload; 39 | MFXVideoDECODE_DecodeFrameAsync; 40 | 41 | MFXVideoVPP_Query; 42 | MFXVideoVPP_QueryIOSurf; 43 | MFXVideoVPP_Init; 44 | MFXVideoVPP_Reset; 45 | MFXVideoVPP_Close; 46 | 47 | MFXVideoVPP_GetVideoParam; 48 | MFXVideoVPP_GetVPPStat; 49 | MFXVideoVPP_RunFrameVPPAsync; 50 | 51 | MFXInitEx; 52 | 53 | MFXLoad; 54 | MFXUnload; 55 | MFXCreateConfig; 56 | MFXSetConfigFilterProperty; 57 | MFXEnumImplementations; 58 | MFXCreateSession; 59 | MFXDispReleaseImplDescription; 60 | 61 | MFXMemory_GetSurfaceForVPP; 62 | MFXMemory_GetSurfaceForEncode; 63 | MFXMemory_GetSurfaceForDecode; 64 | 65 | local: 66 | *; 67 | }; 68 | 69 | LIBVPL_2.1 { 70 | global: 71 | MFXMemory_GetSurfaceForVPPOut; 72 | MFXVideoDECODE_VPP_Init; 73 | MFXVideoDECODE_VPP_DecodeFrameAsync; 74 | MFXVideoDECODE_VPP_Reset; 75 | MFXVideoDECODE_VPP_GetChannelParam; 76 | MFXVideoDECODE_VPP_Close; 77 | MFXVideoVPP_ProcessFrameAsync; 78 | 79 | local: 80 | *; 81 | } LIBVPL_2.0; 82 | -------------------------------------------------------------------------------- /libvpl/src/linux/mfxloader.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef LIBVPL_SRC_LINUX_MFXLOADER_H_ 8 | #define LIBVPL_SRC_LINUX_MFXLOADER_H_ 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #include "vpl/mfxvideo.h" 17 | 18 | inline bool operator<(const mfxVersion &lhs, const mfxVersion &rhs) { 19 | return (lhs.Major < rhs.Major || (lhs.Major == rhs.Major && lhs.Minor < rhs.Minor)); 20 | } 21 | 22 | inline bool operator<=(const mfxVersion &lhs, const mfxVersion &rhs) { 23 | return (lhs < rhs || (lhs.Major == rhs.Major && lhs.Minor == rhs.Minor)); 24 | } 25 | 26 | inline bool operator==(mfxGUID const &l, mfxGUID const &r) { 27 | return std::equal(l.Data, l.Data + 16, r.Data); 28 | } 29 | 30 | #endif // LIBVPL_SRC_LINUX_MFXLOADER_H_ 31 | -------------------------------------------------------------------------------- /libvpl/src/mfx_dispatcher_vpl_win.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef LIBVPL_SRC_MFX_DISPATCHER_VPL_WIN_H_ 8 | #define LIBVPL_SRC_MFX_DISPATCHER_VPL_WIN_H_ 9 | 10 | // headers for Windows legacy dispatcher 11 | #if defined(_WIN32) || defined(_WIN64) 12 | #include "windows/mfx_dispatcher.h" 13 | #include "windows/mfx_dispatcher_defs.h" 14 | #include "windows/mfx_dxva2_device.h" 15 | #include "windows/mfx_library_iterator.h" 16 | #include "windows/mfx_load_dll.h" 17 | #endif 18 | 19 | #endif // LIBVPL_SRC_MFX_DISPATCHER_VPL_WIN_H_ 20 | -------------------------------------------------------------------------------- /libvpl/src/windows/libmfx.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | MFXInit 3 | MFXClose 4 | MFXQueryIMPL 5 | MFXQueryVersion 6 | 7 | MFXJoinSession 8 | MFXDisjoinSession 9 | MFXCloneSession 10 | MFXSetPriority 11 | MFXGetPriority 12 | 13 | MFXVideoCORE_SetFrameAllocator 14 | MFXVideoCORE_SetHandle 15 | MFXVideoCORE_GetHandle 16 | MFXVideoCORE_QueryPlatform 17 | MFXVideoCORE_SyncOperation 18 | 19 | MFXVideoENCODE_Query 20 | MFXVideoENCODE_QueryIOSurf 21 | MFXVideoENCODE_Init 22 | MFXVideoENCODE_Reset 23 | MFXVideoENCODE_Close 24 | MFXVideoENCODE_GetVideoParam 25 | MFXVideoENCODE_GetEncodeStat 26 | MFXVideoENCODE_EncodeFrameAsync 27 | 28 | MFXVideoDECODE_Query 29 | MFXVideoDECODE_DecodeHeader 30 | MFXVideoDECODE_QueryIOSurf 31 | MFXVideoDECODE_Init 32 | MFXVideoDECODE_Reset 33 | MFXVideoDECODE_Close 34 | MFXVideoDECODE_GetVideoParam 35 | MFXVideoDECODE_GetDecodeStat 36 | MFXVideoDECODE_SetSkipMode 37 | MFXVideoDECODE_GetPayload 38 | MFXVideoDECODE_DecodeFrameAsync 39 | 40 | MFXVideoVPP_Query 41 | MFXVideoVPP_QueryIOSurf 42 | MFXVideoVPP_Init 43 | MFXVideoVPP_Reset 44 | MFXVideoVPP_Close 45 | 46 | MFXVideoVPP_GetVideoParam 47 | MFXVideoVPP_GetVPPStat 48 | MFXVideoVPP_RunFrameVPPAsync 49 | 50 | MFXInitEx 51 | 52 | MFXQueryAdapters 53 | MFXQueryAdaptersNumber 54 | MFXQueryAdaptersDecode 55 | 56 | MFXLoad 57 | MFXUnload 58 | MFXCreateConfig 59 | MFXSetConfigFilterProperty 60 | MFXEnumImplementations 61 | MFXCreateSession 62 | MFXDispReleaseImplDescription 63 | 64 | MFXMemory_GetSurfaceForVPP 65 | MFXMemory_GetSurfaceForEncode 66 | MFXMemory_GetSurfaceForDecode 67 | 68 | MFXMemory_GetSurfaceForVPPOut 69 | MFXVideoDECODE_VPP_Init 70 | MFXVideoDECODE_VPP_DecodeFrameAsync 71 | MFXVideoDECODE_VPP_Reset 72 | MFXVideoDECODE_VPP_GetChannelParam 73 | MFXVideoDECODE_VPP_Close 74 | MFXVideoVPP_ProcessFrameAsync 75 | 76 | 77 | -------------------------------------------------------------------------------- /libvpl/src/windows/mfx_critical_section.cpp: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #include "src/windows/mfx_critical_section.h" 8 | 9 | #include 10 | // SDK re-declares the following functions with different call declarator. 11 | // We don't need them. Just redefine them to nothing. 12 | #define _interlockedbittestandset fake_set 13 | #define _interlockedbittestandreset fake_reset 14 | #define _interlockedbittestandset64 fake_set64 15 | #define _interlockedbittestandreset64 fake_reset64 16 | #include 17 | 18 | #define MFX_WAIT() SwitchToThread() 19 | 20 | // static section of the file 21 | namespace { 22 | 23 | enum { MFX_SC_IS_FREE = 0, MFX_SC_IS_TAKEN = 1 }; 24 | 25 | } // namespace 26 | 27 | namespace MFX { 28 | 29 | mfxU32 mfxInterlockedCas32(mfxCriticalSection *pCSection, 30 | mfxU32 value_to_exchange, 31 | mfxU32 value_to_compare) { 32 | return _InterlockedCompareExchange(pCSection, value_to_exchange, value_to_compare); 33 | } 34 | 35 | mfxU32 mfxInterlockedXchg32(mfxCriticalSection *pCSection, mfxU32 value) { 36 | return _InterlockedExchange(pCSection, value); 37 | } 38 | 39 | void mfxEnterCriticalSection(mfxCriticalSection *pCSection) { 40 | while (MFX_SC_IS_TAKEN == mfxInterlockedCas32(pCSection, MFX_SC_IS_TAKEN, MFX_SC_IS_FREE)) { 41 | MFX_WAIT(); 42 | } 43 | } // void mfxEnterCriticalSection(mfxCriticalSection *pCSection) 44 | 45 | void mfxLeaveCriticalSection(mfxCriticalSection *pCSection) { 46 | mfxInterlockedXchg32(pCSection, MFX_SC_IS_FREE); 47 | } // void mfxLeaveCriticalSection(mfxCriticalSection *pCSection) 48 | 49 | } // namespace MFX 50 | -------------------------------------------------------------------------------- /libvpl/src/windows/mfx_critical_section.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef LIBVPL_SRC_WINDOWS_MFX_CRITICAL_SECTION_H_ 8 | #define LIBVPL_SRC_WINDOWS_MFX_CRITICAL_SECTION_H_ 9 | 10 | #include "vpl/mfxdefs.h" 11 | 12 | namespace MFX { 13 | 14 | // Just set "critical section" instance to zero for initialization. 15 | typedef volatile mfxL32 mfxCriticalSection; 16 | 17 | // Enter the global critical section. 18 | void mfxEnterCriticalSection(mfxCriticalSection *pCSection); 19 | 20 | // Leave the global critical section. 21 | void mfxLeaveCriticalSection(mfxCriticalSection *pCSection); 22 | 23 | class MFXAutomaticCriticalSection { 24 | public: 25 | // Constructor 26 | explicit MFXAutomaticCriticalSection(mfxCriticalSection *pCSection) { 27 | m_pCSection = pCSection; 28 | mfxEnterCriticalSection(m_pCSection); 29 | } 30 | 31 | // Destructor 32 | ~MFXAutomaticCriticalSection() { 33 | mfxLeaveCriticalSection(m_pCSection); 34 | } 35 | 36 | protected: 37 | // Pointer to a critical section 38 | mfxCriticalSection *m_pCSection; 39 | 40 | private: 41 | // unimplemented by intent to make this class non-copyable 42 | MFXAutomaticCriticalSection(const MFXAutomaticCriticalSection &); 43 | void operator=(const MFXAutomaticCriticalSection &); 44 | }; 45 | 46 | } // namespace MFX 47 | 48 | #endif // LIBVPL_SRC_WINDOWS_MFX_CRITICAL_SECTION_H_ 49 | -------------------------------------------------------------------------------- /libvpl/src/windows/mfx_dispatcher_defs.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #pragma once 8 | #include 9 | #include 10 | #include "vpl/mfxdefs.h" 11 | 12 | #if defined(MFX_DISPATCHER_LOG) 13 | #include 14 | #include 15 | #endif 16 | 17 | #define MAX_PLUGIN_PATH 4096 18 | #define MAX_PLUGIN_NAME 4096 19 | 20 | #if _MSC_VER < 1400 21 | #define wcscpy_s(to, to_size, from) \ 22 | (void)(to_size); \ 23 | wcscpy(to, from) 24 | #define wcscat_s(to, to_size, from) \ 25 | (void)(to_size); \ 26 | wcscat(to, from) 27 | #endif 28 | 29 | // declare library module's handle 30 | typedef void *mfxModuleHandle; 31 | 32 | typedef void(MFX_CDECL *mfxFunctionPointer)(void); 33 | 34 | // Tracer uses lib loading from Program Files logic (via Dispatch reg key) to make dispatcher load tracer dll. 35 | // With DriverStore loading put at 1st place, dispatcher loads real lib before it finds tracer dll. 36 | // This workaround explicitly checks tracer presence in Dispatch reg key and loads tracer dll before the search for lib in all other places. 37 | #define MFX_TRACER_WA_FOR_DS 1 38 | -------------------------------------------------------------------------------- /libvpl/src/windows/mfx_load_dll.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef LIBVPL_SRC_WINDOWS_MFX_LOAD_DLL_H_ 8 | #define LIBVPL_SRC_WINDOWS_MFX_LOAD_DLL_H_ 9 | 10 | #include "src/windows/mfx_dispatcher.h" 11 | 12 | namespace MFX { 13 | 14 | // 15 | // declare DLL loading routines 16 | // 17 | 18 | mfxStatus mfx_get_rt_dll_name(wchar_t *pPath, size_t pathSize); 19 | mfxStatus mfx_get_default_dll_name(wchar_t *pPath, size_t pathSize, eMfxImplType implType); 20 | mfxStatus mfx_get_default_vpl_dll_name(wchar_t *pPath, size_t pathSize); 21 | mfxStatus mfx_get_default_plugin_name(wchar_t *pPath, size_t pathSize, eMfxImplType implType); 22 | #if defined(MEDIASDK_UWP_DISPATCHER) 23 | mfxStatus mfx_get_default_intel_gfx_api_dll_name(wchar_t *pPath, size_t pathSize); 24 | #endif 25 | 26 | mfxStatus mfx_get_default_audio_dll_name(wchar_t *pPath, size_t pathSize, eMfxImplType implType); 27 | 28 | mfxModuleHandle mfx_dll_load(const wchar_t *file_name); 29 | //increments reference counter 30 | mfxModuleHandle mfx_get_dll_handle(const wchar_t *file_name); 31 | mfxFunctionPointer mfx_dll_get_addr(mfxModuleHandle handle, const char *func_name); 32 | bool mfx_dll_free(mfxModuleHandle handle); 33 | 34 | } // namespace MFX 35 | 36 | #endif // LIBVPL_SRC_WINDOWS_MFX_LOAD_DLL_H_ 37 | -------------------------------------------------------------------------------- /libvpl/src/windows/version.rc.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/intel/libvpl/c45b5d786bf7cdabbe49ff1bab78693ad78feb78/libvpl/src/windows/version.rc.in -------------------------------------------------------------------------------- /libvpl/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | cmake_minimum_required(VERSION 3.13.0) 7 | 8 | add_subdirectory(runtimes/stub) 9 | add_subdirectory(runtimes/stub1x) 10 | add_subdirectory(runtimes/stub-nofn) 11 | 12 | # Build googletest 13 | set(BUILD_SHARED_LIBS OFF) 14 | 15 | set(BUILD_GMOCK 16 | OFF 17 | CACHE BOOL "" FORCE) 18 | set(INSTALL_GTEST 19 | OFF 20 | CACHE BOOL "" FORCE) 21 | set(gtest_disable_pthreads 22 | OFF 23 | CACHE BOOL "" FORCE) 24 | set(gtest_force_shared_crt 25 | ON 26 | CACHE BOOL "" FORCE) 27 | set(gtest_hide_internal_symbols 28 | OFF 29 | CACHE BOOL "" FORCE) 30 | 31 | # 32 | add_subdirectory(ext/googletest) 33 | add_library(GTest::gtest ALIAS gtest) 34 | add_library(GTest::gtest_main ALIAS gtest_main) 35 | 36 | add_subdirectory(diagnostic) 37 | add_subdirectory(unit) 38 | -------------------------------------------------------------------------------- /libvpl/test/diagnostic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | 7 | add_subdirectory(mfxinit-test) 8 | add_subdirectory(vpl-timing) 9 | -------------------------------------------------------------------------------- /libvpl/test/diagnostic/mfxinit-test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | cmake_minimum_required(VERSION 3.13.0) 7 | 8 | if(MSVC) 9 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 10 | endif() 11 | 12 | add_executable(mfxinit-test main.cpp) 13 | target_link_libraries(mfxinit-test VPL) 14 | target_include_directories(mfxinit-test PRIVATE ${ONEVPL_API_HEADER_DIRECTORY}) 15 | target_compile_definitions(${TARGET} PUBLIC -DMFX_DEPRECATED_OFF) 16 | -------------------------------------------------------------------------------- /libvpl/test/diagnostic/vpl-timing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | cmake_minimum_required(VERSION 3.13.0) 7 | 8 | if(MSVC) 9 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 10 | set(LIBS version) 11 | endif() 12 | 13 | add_executable(vpl-timing src/vpl-timing.cpp) 14 | target_link_libraries(vpl-timing VPL ${LIBS}) 15 | target_include_directories(vpl-timing PRIVATE ${ONEVPL_API_HEADER_DIRECTORY}) 16 | -------------------------------------------------------------------------------- /libvpl/test/diagnostic/vpl-timing/src/vpl-timing.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef LIBVPL_TEST_DIAGNOSTIC_VPL_TIMING_SRC_VPL_TIMING_H_ 8 | #define LIBVPL_TEST_DIAGNOSTIC_VPL_TIMING_SRC_VPL_TIMING_H_ 9 | 10 | #include 11 | #include 12 | 13 | #define ENABLE_VPL_LOG_TIME 14 | 15 | #ifdef ENABLE_VPL_LOG_TIME 16 | 17 | class VPLLogTiming { 18 | public: 19 | explicit VPLLogTiming(const char *logStr) : m_logString(), m_startTime() { 20 | m_logString = logStr; 21 | m_startTime = std::chrono::high_resolution_clock::now(); 22 | } 23 | 24 | ~VPLLogTiming() {} 25 | 26 | void PrintElapsedTime() { 27 | std::chrono::high_resolution_clock::time_point endTime = 28 | std::chrono::high_resolution_clock::now(); 29 | 30 | std::chrono::microseconds diff = 31 | std::chrono::duration_cast(endTime - m_startTime); 32 | fprintf(stdout, 33 | "vpl-timing -- %-48s = % 8.2f msec\n", 34 | m_logString.c_str(), 35 | diff.count() / 1000.0f); 36 | } 37 | 38 | private: 39 | std::string m_logString; 40 | std::chrono::high_resolution_clock::time_point m_startTime; 41 | }; 42 | 43 | #define VPL_LOG_TIME_START(t, str) VPLLogTiming unique_prefix_log_time_##t(str); 44 | #define VPL_LOG_TIME_END(t) unique_prefix_log_time_##t.PrintElapsedTime(); 45 | 46 | #else 47 | 48 | #define VPL_LOG_TIME_START(t, str) 49 | #define VPL_LOG_TIME_END(t) 50 | 51 | #endif 52 | 53 | #endif // LIBVPL_TEST_DIAGNOSTIC_VPL_TIMING_SRC_VPL_TIMING_H_ 54 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | Language: Cpp 4 | BasedOnStyle: Google 5 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore CI build directory 2 | build/ 3 | xcuserdata 4 | cmake-build-debug/ 5 | .idea/ 6 | bazel-bin 7 | bazel-genfiles 8 | bazel-googletest 9 | bazel-out 10 | bazel-testlogs 11 | # python 12 | *.pyc 13 | 14 | # Visual Studio files 15 | .vs 16 | *.sdf 17 | *.opensdf 18 | *.VC.opendb 19 | *.suo 20 | *.user 21 | _ReSharper.Caches/ 22 | Win32-Debug/ 23 | Win32-Release/ 24 | x64-Debug/ 25 | x64-Release/ 26 | 27 | # Ignore autoconf / automake files 28 | Makefile.in 29 | aclocal.m4 30 | configure 31 | build-aux/ 32 | autom4te.cache/ 33 | googletest/m4/libtool.m4 34 | googletest/m4/ltoptions.m4 35 | googletest/m4/ltsugar.m4 36 | googletest/m4/ltversion.m4 37 | googletest/m4/lt~obsolete.m4 38 | googlemock/m4 39 | 40 | # Ignore generated directories. 41 | googlemock/fused-src/ 42 | googletest/fused-src/ 43 | 44 | # macOS files 45 | .DS_Store 46 | googletest/.DS_Store 47 | googletest/xcode/.DS_Store 48 | 49 | # Ignore cmake generated directories and files. 50 | CMakeFiles 51 | CTestTestfile.cmake 52 | Makefile 53 | cmake_install.cmake 54 | googlemock/CMakeFiles 55 | googlemock/CTestTestfile.cmake 56 | googlemock/Makefile 57 | googlemock/cmake_install.cmake 58 | googlemock/gtest 59 | /bin 60 | /googlemock/gmock.dir 61 | /googlemock/gmock_main.dir 62 | /googlemock/RUN_TESTS.vcxproj.filters 63 | /googlemock/RUN_TESTS.vcxproj 64 | /googlemock/INSTALL.vcxproj.filters 65 | /googlemock/INSTALL.vcxproj 66 | /googlemock/gmock_main.vcxproj.filters 67 | /googlemock/gmock_main.vcxproj 68 | /googlemock/gmock.vcxproj.filters 69 | /googlemock/gmock.vcxproj 70 | /googlemock/gmock.sln 71 | /googlemock/ALL_BUILD.vcxproj.filters 72 | /googlemock/ALL_BUILD.vcxproj 73 | /lib 74 | /Win32 75 | /ZERO_CHECK.vcxproj.filters 76 | /ZERO_CHECK.vcxproj 77 | /RUN_TESTS.vcxproj.filters 78 | /RUN_TESTS.vcxproj 79 | /INSTALL.vcxproj.filters 80 | /INSTALL.vcxproj 81 | /googletest-distribution.sln 82 | /CMakeCache.txt 83 | /ALL_BUILD.vcxproj.filters 84 | /ALL_BUILD.vcxproj 85 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Note: CMake support is community-based. The maintainers do not use CMake 2 | # internally. 3 | 4 | cmake_minimum_required(VERSION 3.5) 5 | 6 | if (POLICY CMP0048) 7 | cmake_policy(SET CMP0048 NEW) 8 | endif (POLICY CMP0048) 9 | 10 | if (POLICY CMP0077) 11 | cmake_policy(SET CMP0077 NEW) 12 | endif (POLICY CMP0077) 13 | 14 | project(googletest-distribution) 15 | set(GOOGLETEST_VERSION 1.12.1) 16 | 17 | if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) 18 | set(CMAKE_CXX_EXTENSIONS OFF) 19 | endif() 20 | 21 | enable_testing() 22 | 23 | include(CMakeDependentOption) 24 | include(GNUInstallDirs) 25 | 26 | #Note that googlemock target already builds googletest 27 | option(BUILD_GMOCK "Builds the googlemock subproject" ON) 28 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) 29 | 30 | if(BUILD_GMOCK) 31 | add_subdirectory( googlemock ) 32 | else() 33 | add_subdirectory( googletest ) 34 | endif() 35 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "com_google_googletest") 2 | 3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 4 | 5 | http_archive( 6 | name = "com_google_absl", 7 | sha256 = "1a1745b5ee81392f5ea4371a4ca41e55d446eeaee122903b2eaffbd8a3b67a2b", 8 | strip_prefix = "abseil-cpp-01cc6567cff77738e416a7ddc17de2d435a780ce", 9 | urls = ["https://github.com/abseil/abseil-cpp/archive/01cc6567cff77738e416a7ddc17de2d435a780ce.zip"], # 2022-06-21T19:28:27Z 10 | ) 11 | 12 | # Note this must use a commit from the `abseil` branch of the RE2 project. 13 | # https://github.com/google/re2/tree/abseil 14 | http_archive( 15 | name = "com_googlesource_code_re2", 16 | sha256 = "0a890c2aa0bb05b2ce906a15efb520d0f5ad4c7d37b8db959c43772802991887", 17 | strip_prefix = "re2-a427f10b9fb4622dd6d8643032600aa1b50fbd12", 18 | urls = ["https://github.com/google/re2/archive/a427f10b9fb4622dd6d8643032600aa1b50fbd12.zip"], # 2022-06-09 19 | ) 20 | 21 | http_archive( 22 | name = "rules_python", 23 | sha256 = "0b460f17771258341528753b1679335b629d1d25e3af28eda47d009c103a6e15", 24 | strip_prefix = "rules_python-aef17ad72919d184e5edb7abf61509eb78e57eda", 25 | urls = ["https://github.com/bazelbuild/rules_python/archive/aef17ad72919d184e5edb7abf61509eb78e57eda.zip"], # 2022-06-21T23:44:47Z 26 | ) 27 | 28 | http_archive( 29 | name = "bazel_skylib", 30 | urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz"], 31 | sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728", 32 | ) 33 | 34 | http_archive( 35 | name = "platforms", 36 | sha256 = "a879ea428c6d56ab0ec18224f976515948822451473a80d06c2e50af0bbe5121", 37 | strip_prefix = "platforms-da5541f26b7de1dc8e04c075c99df5351742a4a2", 38 | urls = ["https://github.com/bazelbuild/platforms/archive/da5541f26b7de1dc8e04c075c99df5351742a4a2.zip"], # 2022-05-27 39 | ) 40 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/README.md: -------------------------------------------------------------------------------- 1 | # Googletest Mocking (gMock) Framework 2 | 3 | ### Overview 4 | 5 | Google's framework for writing and using C++ mock classes. It can help you 6 | derive better designs of your system and write better tests. 7 | 8 | It is inspired by: 9 | 10 | * [jMock](http://www.jmock.org/) 11 | * [EasyMock](http://www.easymock.org/) 12 | * [Hamcrest](http://code.google.com/p/hamcrest/) 13 | 14 | It is designed with C++'s specifics in mind. 15 | 16 | gMock: 17 | 18 | - Provides a declarative syntax for defining mocks. 19 | - Can define partial (hybrid) mocks, which are a cross of real and mock 20 | objects. 21 | - Handles functions of arbitrary types and overloaded functions. 22 | - Comes with a rich set of matchers for validating function arguments. 23 | - Uses an intuitive syntax for controlling the behavior of a mock. 24 | - Does automatic verification of expectations (no record-and-replay needed). 25 | - Allows arbitrary (partial) ordering constraints on function calls to be 26 | expressed. 27 | - Lets a user extend it by defining new matchers and actions. 28 | - Does not use exceptions. 29 | - Is easy to learn and use. 30 | 31 | Details and examples can be found here: 32 | 33 | * [gMock for Dummies](https://google.github.io/googletest/gmock_for_dummies.html) 34 | * [Legacy gMock FAQ](https://google.github.io/googletest/gmock_faq.html) 35 | * [gMock Cookbook](https://google.github.io/googletest/gmock_cook_book.html) 36 | * [gMock Cheat Sheet](https://google.github.io/googletest/gmock_cheat_sheet.html) 37 | 38 | GoogleMock is a part of 39 | [GoogleTest C++ testing framework](http://github.com/google/googletest/) and a 40 | subject to the same requirements. 41 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/cmake/gmock.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gmock 5 | Description: GoogleMock (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gtest = @PROJECT_VERSION@ 9 | Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 11 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/cmake/gmock_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gmock_main 5 | Description: GoogleMock (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gmock = @PROJECT_VERSION@ 9 | Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 11 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/docs/README.md: -------------------------------------------------------------------------------- 1 | # Content Moved 2 | 3 | We are working on updates to the GoogleTest documentation, which has moved to 4 | the top-level [docs](../../docs) directory. 5 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/include/gmock/internal/custom/README.md: -------------------------------------------------------------------------------- 1 | # Customization Points 2 | 3 | The custom directory is an injection point for custom user configurations. 4 | 5 | ## Header `gmock-port.h` 6 | 7 | The following macros can be defined: 8 | 9 | ### Flag related macros: 10 | 11 | * `GMOCK_DECLARE_bool_(name)` 12 | * `GMOCK_DECLARE_int32_(name)` 13 | * `GMOCK_DECLARE_string_(name)` 14 | * `GMOCK_DEFINE_bool_(name, default_val, doc)` 15 | * `GMOCK_DEFINE_int32_(name, default_val, doc)` 16 | * `GMOCK_DEFINE_string_(name, default_val, doc)` 17 | * `GMOCK_FLAG_GET(flag_name)` 18 | * `GMOCK_FLAG_SET(flag_name, value)` 19 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h: -------------------------------------------------------------------------------- 1 | // IWYU pragma: private, include "gmock/gmock.h" 2 | // IWYU pragma: friend gmock/.* 3 | 4 | #ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 5 | #define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 6 | 7 | #endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 8 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Injection point for custom user configurations. See README for details 31 | 32 | // IWYU pragma: private, include "gmock/gmock.h" 33 | // IWYU pragma: friend gmock/.* 34 | 35 | #ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 36 | #define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 37 | #endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 38 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/test/gmock_link2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Google Mock - a framework for writing C++ mock classes. 31 | // 32 | // This file is for verifying that various Google Mock constructs do not 33 | // produce linker errors when instantiated in different translation units. 34 | // Please see gmock_link_test.h for details. 35 | 36 | #define LinkTest LinkTest2 37 | 38 | #include "test/gmock_link_test.h" 39 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googlemock/test/gmock_link_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Google Mock - a framework for writing C++ mock classes. 31 | // 32 | // This file is for verifying that various Google Mock constructs do not 33 | // produce linker errors when instantiated in different translation units. 34 | // Please see gmock_link_test.h for details. 35 | 36 | #define LinkTest LinkTest1 37 | 38 | #include "test/gmock_link_test.h" 39 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | include(CMakeFindDependencyMacro) 3 | if (@GTEST_HAS_PTHREAD@) 4 | set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) 5 | find_dependency(Threads) 6 | endif() 7 | 8 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") 9 | check_required_components("@project_name@") 10 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/cmake/gtest.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest 5 | Description: GoogleTest (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@ 9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 10 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/cmake/gtest_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest_main 5 | Description: GoogleTest (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gtest = @PROJECT_VERSION@ 9 | Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 11 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/cmake/libgtest.la.in: -------------------------------------------------------------------------------- 1 | # libgtest.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.6 3 | 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Names of this library. 8 | library_names='libgtest.so' 9 | 10 | # Is this an already installed library? 11 | installed=yes 12 | 13 | # Should we warn about portability when linking against -modules? 14 | shouldnotlink=no 15 | 16 | # Files to dlopen/dlpreopen 17 | dlopen='' 18 | dlpreopen='' 19 | 20 | # Directory that this library needs to be installed in: 21 | libdir='@CMAKE_INSTALL_FULL_LIBDIR@' 22 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/docs/README.md: -------------------------------------------------------------------------------- 1 | # Content Moved 2 | 3 | We are working on updates to the GoogleTest documentation, which has moved to 4 | the top-level [docs](../../docs) directory. 5 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/include/gtest/internal/custom/README.md: -------------------------------------------------------------------------------- 1 | # Customization Points 2 | 3 | The custom directory is an injection point for custom user configurations. 4 | 5 | ## Header `gtest.h` 6 | 7 | ### The following macros can be defined: 8 | 9 | * `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of 10 | `OsStackTraceGetterInterface`. 11 | * `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for `testing::TempDir()`. See 12 | `testing::TempDir` for semantics and signature. 13 | 14 | ## Header `gtest-port.h` 15 | 16 | The following macros can be defined: 17 | 18 | ### Logging: 19 | 20 | * `GTEST_LOG_(severity)` 21 | * `GTEST_CHECK_(condition)` 22 | * Functions `LogToStderr()` and `FlushInfoLog()` have to be provided too. 23 | 24 | ### Threading: 25 | 26 | * `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. 27 | * `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if `Mutex` and `ThreadLocal` 28 | are already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` 29 | and `GTEST_DEFINE_STATIC_MUTEX_(mutex)` 30 | * `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` 31 | * `GTEST_LOCK_EXCLUDED_(locks)` 32 | 33 | ### Underlying library support features 34 | 35 | * `GTEST_HAS_CXXABI_H_` 36 | 37 | ### Exporting API symbols: 38 | 39 | * `GTEST_API_` - Specifier for exported symbols. 40 | 41 | ## Header `gtest-printers.h` 42 | 43 | * See documentation at `gtest/gtest-printers.h` for details on how to define a 44 | custom printer. 45 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/include/gtest/internal/custom/gtest-port.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 35 | #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 36 | 37 | #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 38 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/include/gtest/internal/custom/gtest.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 35 | #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 36 | 37 | #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 38 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/samples/sample1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | 32 | #ifndef GOOGLETEST_SAMPLES_SAMPLE1_H_ 33 | #define GOOGLETEST_SAMPLES_SAMPLE1_H_ 34 | 35 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1. 36 | int Factorial(int n); 37 | 38 | // Returns true if and only if n is a prime number. 39 | bool IsPrime(int n); 40 | 41 | #endif // GOOGLETEST_SAMPLES_SAMPLE1_H_ 42 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/test/googletest-uninitialized-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | TEST(DummyTest, Dummy) { 33 | // This test doesn't verify anything. We just need it to create a 34 | // realistic stage for testing the behavior of Google Test when 35 | // RUN_ALL_TESTS() is called without 36 | // testing::InitGoogleTest() being called first. 37 | } 38 | 39 | int main() { return RUN_ALL_TESTS(); } 40 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/test/gtest_main_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | // Tests that we don't have to define main() when we link to 33 | // gtest_main instead of gtest. 34 | 35 | namespace { 36 | 37 | TEST(GTestMainTest, ShouldSucceed) {} 38 | 39 | } // namespace 40 | 41 | // We are using the main() function defined in gtest_main.cc, so we 42 | // don't define it here. 43 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/test/gtest_testbridge_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2018, Google LLC. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // This program is meant to be run by gtest_test_filter_test.py. Do not run 31 | // it directly. 32 | 33 | #include "gtest/gtest.h" 34 | 35 | // These tests are used to detect if filtering is working. Only 36 | // 'TestThatSucceeds' should ever run. 37 | 38 | TEST(TestFilterTest, TestThatSucceeds) {} 39 | 40 | TEST(TestFilterTest, TestThatFails) { 41 | ASSERT_TRUE(false) << "This test should never be run."; 42 | } 43 | -------------------------------------------------------------------------------- /libvpl/test/ext/googletest/googletest/test/production.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // This is part of the unit test for gtest_prod.h. 32 | 33 | #include "production.h" 34 | 35 | PrivateCode::PrivateCode() : x_(0) {} 36 | -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub-nofn/src/windows/libvplminrt-nofn.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | MFXInit 3 | MFXClose 4 | MFXQueryIMPL 5 | MFXQueryVersion 6 | 7 | MFXJoinSession 8 | MFXDisjoinSession 9 | MFXCloneSession 10 | MFXSetPriority 11 | MFXGetPriority 12 | 13 | MFXVideoCORE_SetFrameAllocator 14 | MFXVideoCORE_SetHandle 15 | MFXVideoCORE_GetHandle 16 | MFXVideoCORE_QueryPlatform 17 | MFXVideoCORE_SyncOperation 18 | 19 | MFXVideoENCODE_Query 20 | MFXVideoENCODE_QueryIOSurf 21 | MFXVideoENCODE_Init 22 | MFXVideoENCODE_Reset 23 | MFXVideoENCODE_Close 24 | MFXVideoENCODE_GetVideoParam 25 | MFXVideoENCODE_GetEncodeStat 26 | MFXVideoENCODE_EncodeFrameAsync 27 | 28 | MFXVideoDECODE_Query 29 | MFXVideoDECODE_DecodeHeader 30 | MFXVideoDECODE_QueryIOSurf 31 | MFXVideoDECODE_Init 32 | MFXVideoDECODE_Reset 33 | MFXVideoDECODE_Close 34 | MFXVideoDECODE_GetVideoParam 35 | MFXVideoDECODE_GetDecodeStat 36 | MFXVideoDECODE_SetSkipMode 37 | MFXVideoDECODE_GetPayload 38 | MFXVideoDECODE_DecodeFrameAsync 39 | 40 | MFXVideoVPP_Query 41 | MFXVideoVPP_QueryIOSurf 42 | MFXVideoVPP_Init 43 | MFXVideoVPP_Reset 44 | MFXVideoVPP_Close 45 | 46 | MFXVideoVPP_GetVideoParam 47 | MFXVideoVPP_GetVPPStat 48 | MFXVideoVPP_RunFrameVPPAsync 49 | 50 | MFXInitEx 51 | 52 | MFXQueryImplsDescription 53 | MFXReleaseImplDescription 54 | 55 | MFXMemory_GetSurfaceForVPP 56 | MFXMemory_GetSurfaceForEncode 57 | MFXMemory_GetSurfaceForDecode 58 | 59 | MFXInitialize 60 | 61 | MFXMemory_GetSurfaceForVPPOut 62 | MFXVideoDECODE_VPP_Init 63 | MFXVideoDECODE_VPP_DecodeFrameAsync 64 | MFXVideoDECODE_VPP_Reset 65 | MFXVideoDECODE_VPP_GetChannelParam 66 | MFXVideoDECODE_VPP_Close 67 | MFXVideoVPP_ProcessFrameAsync -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub/src/caps_dec_none.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | //NOLINT(build/header_guard) 8 | 9 | #include "src/caps.h" 10 | 11 | const mfxDecoderDescription decoderDesc = { 12 | { { 0, 1 } }, 13 | {}, 14 | 0, 15 | (DecCodec *)nullptr, 16 | }; 17 | -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub/src/caps_enc_none.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | //NOLINT(build/header_guard) 8 | 9 | #include "src/caps.h" 10 | 11 | const mfxEncoderDescription encoderDesc = { 12 | { { 0, 1 } }, 13 | {}, 14 | 0, 15 | (EncCodec *)nullptr, 16 | }; 17 | -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub/src/caps_vpp_none.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | //NOLINT(build/header_guard) 8 | 9 | #include "src/caps.h" 10 | 11 | const mfxVPPDescription vppDesc = { 12 | { { 0, 1 } }, 13 | {}, 14 | 0, 15 | (VPPFilter *)nullptr, 16 | }; 17 | -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub/src/config.h: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifndef LIBVPL_TEST_RUNTIMES_STUB_SRC_CONFIG_H_ 8 | #define LIBVPL_TEST_RUNTIMES_STUB_SRC_CONFIG_H_ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "vpl/mfx.h" 15 | 16 | #if defined(__linux__) 17 | #define vsprintf_s(s, l, m, a) vsprintf(s, m, a) 18 | #endif 19 | 20 | struct _mfxSession { 21 | mfxU32 handleType; 22 | 23 | _mfxSession() { 24 | handleType = 0; 25 | } 26 | }; 27 | 28 | #endif // LIBVPL_TEST_RUNTIMES_STUB_SRC_CONFIG_H_ 29 | -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub/src/windows/libvplminrt.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | MFXInit 3 | MFXClose 4 | MFXQueryIMPL 5 | MFXQueryVersion 6 | 7 | MFXJoinSession 8 | MFXDisjoinSession 9 | MFXCloneSession 10 | MFXSetPriority 11 | MFXGetPriority 12 | 13 | MFXVideoCORE_SetFrameAllocator 14 | MFXVideoCORE_SetHandle 15 | MFXVideoCORE_GetHandle 16 | MFXVideoCORE_QueryPlatform 17 | MFXVideoCORE_SyncOperation 18 | 19 | MFXVideoENCODE_Query 20 | MFXVideoENCODE_QueryIOSurf 21 | MFXVideoENCODE_Init 22 | MFXVideoENCODE_Reset 23 | MFXVideoENCODE_Close 24 | MFXVideoENCODE_GetVideoParam 25 | MFXVideoENCODE_GetEncodeStat 26 | MFXVideoENCODE_EncodeFrameAsync 27 | 28 | MFXVideoDECODE_Query 29 | MFXVideoDECODE_DecodeHeader 30 | MFXVideoDECODE_QueryIOSurf 31 | MFXVideoDECODE_Init 32 | MFXVideoDECODE_Reset 33 | MFXVideoDECODE_Close 34 | MFXVideoDECODE_GetVideoParam 35 | MFXVideoDECODE_GetDecodeStat 36 | MFXVideoDECODE_SetSkipMode 37 | MFXVideoDECODE_GetPayload 38 | MFXVideoDECODE_DecodeFrameAsync 39 | 40 | MFXVideoVPP_Query 41 | MFXVideoVPP_QueryIOSurf 42 | MFXVideoVPP_Init 43 | MFXVideoVPP_Reset 44 | MFXVideoVPP_Close 45 | 46 | MFXVideoVPP_GetVideoParam 47 | MFXVideoVPP_GetVPPStat 48 | MFXVideoVPP_RunFrameVPPAsync 49 | 50 | MFXInitEx 51 | 52 | MFXQueryImplsDescription 53 | MFXReleaseImplDescription 54 | 55 | MFXMemory_GetSurfaceForVPP 56 | MFXMemory_GetSurfaceForEncode 57 | MFXMemory_GetSurfaceForDecode 58 | 59 | MFXInitialize 60 | 61 | MFXMemory_GetSurfaceForVPPOut 62 | MFXVideoDECODE_VPP_Init 63 | MFXVideoDECODE_VPP_DecodeFrameAsync 64 | MFXVideoDECODE_VPP_Reset 65 | MFXVideoDECODE_VPP_GetChannelParam 66 | MFXVideoDECODE_VPP_Close 67 | MFXVideoVPP_ProcessFrameAsync 68 | 69 | MFXQueryImplsProperties -------------------------------------------------------------------------------- /libvpl/test/runtimes/stub/version.txt: -------------------------------------------------------------------------------- 1 | 0.0.1 2 | -------------------------------------------------------------------------------- /libvpl/test/unit/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ############################################################################## 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ############################################################################## 6 | cmake_minimum_required(VERSION 3.13.0) 7 | 8 | set(TARGET vpl-tests) 9 | set(test_sources 10 | src/session-test.cpp 11 | src/legacycpp-session-test-1x.cpp 12 | src/legacycpp-session-test-2x.cpp 13 | src/main.cpp 14 | src/dispatcher_common.cpp 15 | src/dispatcher_common_multiprop.cpp 16 | src/dispatcher_enum_impls.cpp 17 | src/dispatcher_gpu.cpp 18 | src/dispatcher_low_latency.cpp 19 | src/dispatcher_stub.cpp 20 | src/dispatcher_sw.cpp 21 | src/dispatcher_sw_multiprop.cpp 22 | src/dispatcher_util.cpp 23 | src/dispatcher_gpu_stringapi.cpp 24 | src/dispatcher_stub_stringapi.cpp 25 | src/dispatcher_stub_propquery.cpp 26 | src/experimental_api.cpp) 27 | add_executable(${TARGET} ${test_sources}) 28 | 29 | find_package(VPL REQUIRED) 30 | target_link_libraries(${TARGET} PUBLIC GTest::gtest VPL::dispatcher) 31 | 32 | # Include the stub runtime src dir so we can load the stub RT capabilities to 33 | # check test results. Because of how relative paths are used in the caps*.h 34 | # files, we can't just hardcode this path in the test code. 35 | target_include_directories( 36 | ${TARGET} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} 37 | ${CMAKE_CURRENT_SOURCE_DIR}/../runtimes/stub) 38 | 39 | if(WIN32) 40 | target_link_libraries(${TARGET} PUBLIC shlwapi.lib) 41 | endif() 42 | 43 | include(GoogleTest) 44 | # note that RESOURCE_LOCK prevents running any discoveded tests in parallel 45 | gtest_discover_tests( 46 | ${TARGET} PROPERTIES ENVIRONMENT 47 | ONEVPL_SEARCH_PATH=$ RESOURCE_LOCK 48 | DISPATCHER_LOG_FILE) 49 | -------------------------------------------------------------------------------- /libvpl/test/unit/src/legacycpp-session-test-1x.cpp: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #define MFXVIDEO_CPP_USE_DEPRECATED 8 | 9 | #ifndef MFX_DEPRECATED_OFF 10 | #define MFX_DEPRECATED_OFF // disable compile warnings for use of MFXInit, MFXInitEx 11 | #endif 12 | 13 | #define LEGACY_TEST_VER 1 14 | 15 | #include "./legacycpp-session-test.cpp" // NOLINT(build/include) 16 | -------------------------------------------------------------------------------- /libvpl/test/unit/src/legacycpp-session-test-2x.cpp: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | #ifdef MFXVIDEO_CPP_USE_DEPRECATED 8 | #undef MFXVIDEO_CPP_USE_DEPRECATED 9 | #endif 10 | 11 | #define LEGACY_TEST_VER 2 12 | 13 | #include "./legacycpp-session-test.cpp" // NOLINT(build/include) 14 | -------------------------------------------------------------------------------- /libvpl/test/unit/src/session-test.cpp: -------------------------------------------------------------------------------- 1 | /*############################################################################ 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | ############################################################################*/ 6 | 7 | /// 8 | /// Example of a minimal Intel® Video Processing Library (Intel® VPL) application. 9 | /// 10 | /// @file 11 | 12 | #include 13 | 14 | #include "vpl/mfxdispatcher.h" 15 | 16 | TEST(CreateSession, SucceedsWithStubImpl) { 17 | mfxLoader loader = MFXLoad(); 18 | ASSERT_NE(loader, nullptr) << "MFXLoad() returned null - no libraries found "; 19 | mfxConfig cfg = MFXCreateConfig(loader); 20 | 21 | mfxVariant vendor_id; 22 | vendor_id.Type = MFX_VARIANT_TYPE_U32; 23 | vendor_id.Data.U32 = 0x8086; 24 | mfxVariant vendor_impl_id; 25 | vendor_impl_id.Type = MFX_VARIANT_TYPE_U32; 26 | vendor_impl_id.Data.U32 = 0xFFFF; 27 | mfxStatus sts = MFX_ERR_NONE; 28 | sts = MFXSetConfigFilterProperty(cfg, (const mfxU8 *)"mfxImplDescription.VendorID", vendor_id); 29 | ASSERT_EQ(sts, MFX_ERR_NONE) << "MFXSetConfigFilterProperty failed with code " << sts; 30 | sts = MFXSetConfigFilterProperty(cfg, 31 | (const mfxU8 *)"mfxImplDescription.VendorImplID", 32 | vendor_impl_id); 33 | ASSERT_EQ(sts, MFX_ERR_NONE) << "MFXSetConfigFilterProperty failed with code " << sts; 34 | 35 | mfxSession session = NULL; 36 | sts = MFXCreateSession(loader, 0, &session); 37 | EXPECT_EQ(sts, MFX_ERR_NONE) << "MFXCreateSession failed with code " << sts; 38 | 39 | sts = MFXClose(session); 40 | EXPECT_EQ(sts, MFX_ERR_NONE) << "MFXClose failed with code " << sts; 41 | 42 | MFXUnload(loader); 43 | } 44 | -------------------------------------------------------------------------------- /script/Dockerfile.rhel.build: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi:8.6 2 | 3 | WORKDIR /setup 4 | COPY bootstrap bootstrap 5 | 6 | ENV PIP_ROOT_USER_ACTION=ignore 7 | 8 | RUN dnf install -y git-2.43.5 && \ 9 | ./bootstrap && \ 10 | yum clean all && \ 11 | rm -rf /var/cache/yum 12 | 13 | RUN git config --global safe.directory '*' 14 | 15 | ENV LC_ALL C.UTF-8 16 | ENV LANG en_US.utf8 17 | 18 | HEALTHCHECK CMD gcc --version || exit 1 19 | -------------------------------------------------------------------------------- /script/Dockerfile.ubuntu.build: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | # Copyright (C) Intel Corporation 3 | # 4 | # SPDX-License-Identifier: MIT 5 | # ============================================================================== 6 | 7 | ARG DOCKER_REGISTRY 8 | 9 | FROM ${DOCKER_REGISTRY}ubuntu:24.04 10 | 11 | WORKDIR /setup 12 | COPY bootstrap bootstrap 13 | 14 | ARG DEBIAN_FRONTEND=noninteractive 15 | ENV PIP_ROOT_USER_ACTION=ignore 16 | 17 | RUN ./bootstrap && rm -rf /var/lib/apt/lists/* \ 18 | && git config --global safe.directory '*' 19 | 20 | HEALTHCHECK CMD gcc --version || exit 1 21 | -------------------------------------------------------------------------------- /script/README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This folder contains scripts that represent common tasks a developer (or CI) 4 | needs to perform when getting started with the project. 5 | 6 | The scripts are loosely based on the model described by 7 | [Github](https://github.blog/2015-06-30-scripts-to-rule-them-all/) 8 | 9 | 10 | # Scripts 11 | 12 | - `bootstrap` - Build the project dependencies. 13 | 14 | - `build` - Build the project and place output in `_build`. Also install to 15 | staging area `_install`. 16 | 17 | - `test` - Run basic smoke testing on built project. Scope can be limited by 18 | providing subset of tests as argument from among: lint, unit 19 | 20 | - `install` - Install the project built in the build stage. If argument is 21 | provided then it will be interpreted as the install prefix. If called without 22 | arguments then installation will be to `VPL_INSTALL_DIR` if defined or system 23 | default location otherwise. 24 | 25 | 26 | **LEGAL NOTICE: By downloading and using any scripts (the “Software Package”) 27 | and the included software or software made available for download, you agree to 28 | the terms and conditions of the software license agreements for the Software 29 | Package, which may also include notices, disclaimers, or license terms for third 30 | party software (together, the “Agreements”) included in this README file. If 31 | the Software Package is installed through a silent install, your download and 32 | use of the Software Package indicates your acceptance of the Agreements.** 33 | -------------------------------------------------------------------------------- /script/bootstrap.bat: -------------------------------------------------------------------------------- 1 | @rem ------------------------------------------------------------------------------ 2 | @rem Copyright (C) Intel Corporation 3 | @rem 4 | @rem SPDX-License-Identifier: MIT 5 | @rem ------------------------------------------------------------------------------ 6 | @rem Install dependencies. 7 | 8 | @echo off 9 | setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 10 | 11 | :: configure winget to accept source agreements 12 | winget list Python.Python.3.10 --accept-source-agreements >NUL 13 | 14 | winget list Python.Python.3.10 >NUL || winget install -e --id=Python.Python.3.10 15 | if %errorlevel% neq 0 exit /b %errorlevel% 16 | 17 | winget list Kitware.CMake >NUL || winget install -e --id Kitware.CMake 18 | if %errorlevel% neq 0 exit /b %errorlevel% 19 | 20 | winget list Microsoft.VisualStudio.2022.Community >NUL || winget install Microsoft.VisualStudio.2022.Community --silent --override "--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended" 21 | if %errorlevel% neq 0 exit /b %errorlevel% 22 | 23 | winget list Git.Git >NUL || winget install -e --id=Git.Git 24 | if %errorlevel% neq 0 exit /b %errorlevel% 25 | 26 | python -m pip install pre-commit --proxy=%HTTP_PROXY% 27 | python -m pip install virtualenv==v20.24.5 --proxy=%HTTP_PROXY% 28 | 29 | endlocal 30 | -------------------------------------------------------------------------------- /script/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # Copyright (C) Intel Corporation 4 | # 5 | # SPDX-License-Identifier: MIT 6 | ############################################################################### 7 | # Build in typical fashion. 8 | set -o errexit ; set -o nounset 9 | 10 | if [ -z "$BASH_VERSION" ]; then 11 | echo "This script must be run under bash" 12 | exit 1 13 | fi 14 | 15 | script_dir="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )" 16 | 17 | source_dir="$(dirname "$script_dir")" 18 | build_dir="$source_dir/_build" 19 | staging_dir="$source_dir/_install" 20 | 21 | cmake -B "$build_dir" -S "$source_dir" \ 22 | -DBUILD_TESTS=ON \ 23 | -DCMAKE_BUILD_TYPE=Release \ 24 | -DCMAKE_INSTALL_LIBDIR=lib \ 25 | -DENABLE_WARNING_AS_ERROR=ON 26 | 27 | cmake --build "$build_dir" --parallel $(nproc) --verbose 28 | 29 | pushd "$build_dir" 30 | cpack . 31 | popd 32 | 33 | cmake --install "$build_dir" --prefix "$staging_dir" --config Release --strip 34 | -------------------------------------------------------------------------------- /script/build.bat: -------------------------------------------------------------------------------- 1 | @rem ------------------------------------------------------------------------------ 2 | @rem Copyright (C) Intel Corporation 3 | @rem 4 | @rem SPDX-License-Identifier: MIT 5 | @rem ------------------------------------------------------------------------------ 6 | @rem Build in typical fashion. 7 | 8 | @echo off 9 | setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 10 | 11 | for %%Q in ("%~dp0\.") DO set "script_dir=%%~fQ" 12 | pushd %script_dir%\.. 13 | set "source_dir=%cd%" 14 | popd 15 | set "build_dir=%source_dir%\_build" 16 | set "staging_dir=%source_dir%\_install" 17 | 18 | cmake -B "%build_dir%" -S "%source_dir%" ^ 19 | -DBUILD_TESTS=ON ^ 20 | -DENABLE_WARNING_AS_ERROR=ON 21 | if %errorlevel% neq 0 exit /b %errorlevel% 22 | 23 | cmake --build "%build_dir%" --parallel %NUMBER_OF_PROCESSORS% --verbose --config Release 24 | if %errorlevel% neq 0 exit /b %errorlevel% 25 | 26 | :: cmake cpack conflicts with choco cpack, at least until next choco release 27 | cmake --build "%build_dir%" --parallel %NUMBER_OF_PROCESSORS% --config Release --target package 28 | if %errorlevel% neq 0 exit /b %errorlevel% 29 | 30 | cmake --install "%build_dir%" --prefix "%staging_dir%" --config Release --strip 31 | if %errorlevel% neq 0 exit /b %errorlevel% 32 | 33 | endlocal 34 | -------------------------------------------------------------------------------- /script/gitlint/verbs.txt: -------------------------------------------------------------------------------- 1 | amass 2 | assess 3 | access 4 | address 5 | abscess 6 | bless 7 | bus 8 | bias 9 | boss 10 | bypass 11 | buttress 12 | caress 13 | census 14 | canvas 15 | caucus 16 | class 17 | callous 18 | confess 19 | compress 20 | canvass 21 | cuss 22 | concuss 23 | crisscross 24 | dress 25 | digress 26 | distress 27 | dismiss 28 | depress 29 | discuss 30 | dispossess 31 | decompress 32 | degauss 33 | emboss 34 | engross 35 | express 36 | encompass 37 | focus 38 | guess 39 | gloss 40 | harness 41 | impress 42 | ingress 43 | ingross 44 | interess 45 | misaddress 46 | oppress 47 | outclass 48 | outguess 49 | pass 50 | press 51 | progress 52 | profess 53 | process 54 | possess 55 | prepossess 56 | percuss 57 | precess 58 | recess 59 | regress 60 | reassess 61 | redress 62 | repress 63 | rendezvous 64 | repossess 65 | refocus 66 | retrogress 67 | reprocess 68 | repercuss 69 | recross 70 | repass 71 | readdress 72 | stress 73 | surpass 74 | suppress 75 | subclass 76 | toss 77 | trespass 78 | transgress 79 | undress 80 | uncross 81 | unharness 82 | uncompress 83 | witness 84 | -------------------------------------------------------------------------------- /script/install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # Copyright (C) Intel Corporation 4 | # 5 | # SPDX-License-Identifier: MIT 6 | ############################################################################### 7 | # Install the product. 8 | # 9 | # If argument is provided then it will be interpreted as the install prefix. If 10 | # called without arguments then installation will be to `VPL_INSTALL_DIR` if 11 | # defined or system default location otherwise. 12 | 13 | set -o errexit 14 | 15 | if [ -z "$BASH_VERSION" ]; then 16 | echo "This script must be run under bash" 17 | exit 1 18 | fi 19 | 20 | script_dir="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )" 21 | 22 | source_dir="$(dirname "$script_dir")" 23 | build_dir="$source_dir/_build" 24 | 25 | if [ -n "$1" ]; then 26 | # use first argument as install prefix 27 | cmake --install "$build_dir" --config Release --strip --prefix "$1" 28 | elif [ -z ${VPL_INSTALL_DIR+x} ]; then 29 | # no argument or env variable defined, use system default install location 30 | cmake --install "$build_dir" --config Release --strip 31 | else 32 | # no argument but env variable was provided, install to VPL_INSTALL_DIR 33 | cmake --install "$build_dir" --config Release --strip --prefix "$VPL_INSTALL_DIR" 34 | fi 35 | -------------------------------------------------------------------------------- /script/install.bat: -------------------------------------------------------------------------------- 1 | @rem ------------------------------------------------------------------------------ 2 | @rem Copyright (C) Intel Corporation 3 | @rem 4 | @rem SPDX-License-Identifier: MIT 5 | @rem ------------------------------------------------------------------------------ 6 | @rem Install the product. 7 | @rem 8 | @rem If argument is provided then it will be interpreted as the install prefix. If 9 | @rem called without arguments then installation will be to `VPL_INSTALL_DIR` if 10 | @rem defined or system default location otherwise. 11 | 12 | 13 | @echo off 14 | setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 15 | 16 | for %%Q in ("%~dp0\.") DO set "script_dir=%%~fQ" 17 | pushd %script_dir%\.. 18 | set "source_dir=%cd%" 19 | popd 20 | set "build_dir=%source_dir%\_build" 21 | 22 | if [%1]==[] goto no_args 23 | :: use first argument as install prefix 24 | cmake --install "%build_dir%" --config Release --strip --prefix "%1" 25 | goto done 26 | :no_args 27 | if DEFINED VPL_INSTALL_DIR ( 28 | :: no argument but env variable was provided, install to VPL_INSTALL_DIR 29 | cmake --install "%build_dir%" --config Release --strip --prefix "%VPL_INSTALL_DIR%" 30 | ) else ( 31 | :: no argument or env variable defined, use system default install location 32 | cmake --install "%build_dir%" --config Release --strip 33 | ) 34 | :done 35 | 36 | endlocal 37 | -------------------------------------------------------------------------------- /script/lint: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # Copyright (C) Intel Corporation 4 | # 5 | # SPDX-License-Identifier: MIT 6 | ############################################################################### 7 | # Check code for issues. 8 | set -o errexit 9 | 10 | if [ -z "$BASH_VERSION" ]; then 11 | echo "This script must be run under bash" 12 | exit 1 13 | fi 14 | 15 | # Set script folder 16 | script_dir="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )" 17 | 18 | # Set root folder 19 | proj_dir="$( dirname "${script_dir}" )" 20 | 21 | pushd "${proj_dir}" 22 | pre-commit run --hook-stage manual gitlint-ci 23 | pre-commit run --all-files 24 | popd 25 | -------------------------------------------------------------------------------- /script/lint.bat: -------------------------------------------------------------------------------- 1 | @REM ------------------------------------------------------------------------------ 2 | @REM Copyright (C) Intel Corporation 3 | @REM 4 | @REM SPDX-License-Identifier: MIT 5 | @REM ------------------------------------------------------------------------------ 6 | @REM Check code for issues. 7 | 8 | @ECHO off 9 | SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 10 | 11 | @REM Set project folder 12 | FOR /D %%i IN ("%~dp0\..") DO ( 13 | SET PROJ_DIR=%%~fi 14 | ) 15 | 16 | @REM Set script folder 17 | FOR /D %%i IN ("%~dp0") DO ( 18 | SET SCRIPT_DIR=%%~fi 19 | ) 20 | 21 | PUSHD %PROJ_DIR% 22 | echo Check commit-msg 23 | pre-commit run --hook-stage manual gitlint-ci || EXIT /b 1 24 | 25 | echo Check commit 26 | pre-commit run --all-files || EXIT /b 1 27 | POPD 28 | 29 | ENDLOCAL 30 | -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################################################### 3 | # Copyright (C) Intel Corporation 4 | # 5 | # SPDX-License-Identifier: MIT 6 | ############################################################################### 7 | # Run the test suite. 8 | # 9 | # Scope can be limited by providing subset of tests as argumene from among: 10 | # lint, unit 11 | set -o errexit ; set -o nounset 12 | 13 | if [ -z "$BASH_VERSION" ]; then 14 | echo "This script must be run under bash" 15 | exit 1 16 | fi 17 | 18 | script_dir="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )" 19 | 20 | source_dir="$(dirname "$script_dir")" 21 | build_dir="$source_dir/_build" 22 | 23 | if [ $# -eq 0 ]; then 24 | # if no arguments provided enable all testing 25 | do_lint=true 26 | do_unit=true 27 | else 28 | do_lint=false 29 | do_unit=false 30 | fi 31 | 32 | while test $# -gt 0 33 | do 34 | case "$1" in 35 | lint) do_lint=true 36 | ;; 37 | unit) do_unit=true 38 | ;; 39 | *) echo "invalid option: '$1'"; 40 | exit 1 41 | ;; 42 | esac 43 | shift 44 | done 45 | 46 | if [ "$do_lint" = true ] ; then 47 | "$source_dir/script/lint" 48 | fi 49 | 50 | if [ "$do_unit" = true ] ; then 51 | ctest --test-dir "$build_dir" --C Release --output-on-failure -T test 52 | fi 53 | -------------------------------------------------------------------------------- /script/test.bat: -------------------------------------------------------------------------------- 1 | @rem ------------------------------------------------------------------------------ 2 | @rem Copyright (C) Intel Corporation 3 | @rem 4 | @rem SPDX-License-Identifier: MIT 5 | @rem ------------------------------------------------------------------------------ 6 | @rem Run the test suite. 7 | @rem 8 | @rem Scope can be limited by providing subset of tests as argumene from among: 9 | @rem lint, unit 10 | 11 | @echo off 12 | setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 13 | 14 | for %%Q in ("%~dp0\.") DO set "script_dir=%%~fQ" 15 | pushd "%script_dir%\.." 16 | set "source_dir=%cd%" 17 | popd 18 | set "build_dir=%source_dir%\_build" 19 | set "staging_dir=%source_dir%\_install" 20 | 21 | 22 | if "%~1"=="" ( 23 | set "do_lint=1" & set "do_unit=1" & goto done 24 | ) 25 | :loop 26 | if "%1"=="lint" (set "do_lint=1") else ^ 27 | if "%1"=="unit" (set "do_unit=1") else ^ 28 | echo invalid option: '%1' && exit /b 1 29 | shift 30 | if not "%~1"=="" goto loop 31 | :done 32 | 33 | 34 | if "%do_lint%" == "1" ( 35 | call "%source_dir%\script\lint.bat" 36 | if !errorlevel! neq 0 exit /b !errorlevel! 37 | ) 38 | 39 | if "%do_unit%" == "1" ( 40 | ctest --test-dir "%build_dir%" -C Release --output-on-failure -T test 41 | if !errorlevel! neq 0 exit /b !errorlevel! 42 | ) 43 | 44 | endlocal 45 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 2.15.0 2 | --------------------------------------------------------------------------------