Lines Matching refs:hwdev
161 static void opencl_device_free(AVHWDeviceContext *hwdev)
163 AVOpenCLDeviceContext *hwctx = hwdev->hwctx;
168 av_log(hwdev, AV_LOG_ERROR, "Failed to release OpenCL "
276 static av_unused int opencl_check_extension(AVHWDeviceContext *hwdev,
279 AVOpenCLDeviceContext *hwctx = hwdev->hwctx;
280 OpenCLDeviceContext *priv = hwdev->internal->priv;
283 av_log(hwdev, AV_LOG_DEBUG,
289 av_log(hwdev, AV_LOG_DEBUG,
297 static int opencl_enumerate_platforms(AVHWDeviceContext *hwdev,
306 av_log(hwdev, AV_LOG_ERROR, "Failed to get number of "
310 av_log(hwdev, AV_LOG_DEBUG, "%u OpenCL platforms found.\n",
319 av_log(hwdev, AV_LOG_ERROR, "Failed to get list of OpenCL "
328 static int opencl_filter_platform(AVHWDeviceContext *hwdev,
347 av_log(hwdev, AV_LOG_ERROR, "Failed to query %s "
353 av_log(hwdev, AV_LOG_DEBUG, "%s does not match (\"%s\").\n",
363 static int opencl_enumerate_devices(AVHWDeviceContext *hwdev,
375 av_log(hwdev, AV_LOG_DEBUG, "No devices found "
380 av_log(hwdev, AV_LOG_ERROR, "Failed to get number of devices "
384 av_log(hwdev, AV_LOG_DEBUG, "%u OpenCL devices found on "
394 av_log(hwdev, AV_LOG_ERROR, "Failed to get list of devices "
403 static int opencl_filter_device(AVHWDeviceContext *hwdev,
425 av_log(hwdev, AV_LOG_ERROR, "Unknown device type %s.\n",
433 av_log(hwdev, AV_LOG_ERROR, "Failed to query device type "
439 av_log(hwdev, AV_LOG_DEBUG, "device_type does not match.\n");
453 av_log(hwdev, AV_LOG_ERROR, "Failed to query %s "
459 av_log(hwdev, AV_LOG_DEBUG, "%s does not match (\"%s\").\n",
473 int (*enumerate_platforms)(AVHWDeviceContext *hwdev,
477 int (*filter_platform) (AVHWDeviceContext *hwdev,
481 int (*enumerate_devices) (AVHWDeviceContext *hwdev,
487 int (*filter_device) (AVHWDeviceContext *hwdev,
493 static int opencl_device_create_internal(AVHWDeviceContext *hwdev,
502 AVOpenCLDeviceContext *hwctx = hwdev->hwctx;
512 err = selector->enumerate_platforms(hwdev, &nb_platforms, &platforms,
534 err = selector->filter_platform(hwdev, platforms[p],
543 err = selector->enumerate_devices(hwdev, platforms[p], platform_name,
565 err = selector->filter_device(hwdev, devices[d],
574 av_log(hwdev, AV_LOG_VERBOSE, "%d.%d: %s / %s\n", p, d,
586 av_log(hwdev, AV_LOG_ERROR, "No matching devices found.\n");
591 av_log(hwdev, AV_LOG_ERROR, "More than one matching device found.\n");
607 &opencl_error_callback, hwdev, &cle);
609 av_log(hwdev, AV_LOG_ERROR, "Failed to create OpenCL context: "
615 hwdev->free = &opencl_device_free;
626 static int opencl_device_create(AVHWDeviceContext *hwdev, const char *device,
645 av_log(hwdev, AV_LOG_ERROR, "Invalid OpenCL platform/device "
656 return opencl_device_create_internal(hwdev, &selector, NULL);
659 static int opencl_device_init(AVHWDeviceContext *hwdev)
661 AVOpenCLDeviceContext *hwctx = hwdev->hwctx;
662 OpenCLDeviceContext *priv = hwdev->internal->priv;
668 av_log(hwdev, AV_LOG_ERROR, "Failed to retain external "
678 av_log(hwdev, AV_LOG_ERROR, "Failed to create internal "
688 av_log(hwdev, AV_LOG_ERROR, "Failed to determine the OpenCL "
699 av_log(hwdev, AV_LOG_VERBOSE, \
703 av_log(hwdev, AV_LOG_VERBOSE, \
716 av_log(hwdev, AV_LOG_WARNING, "Beignet DRM to OpenCL "
733 if (!opencl_check_extension(hwdev, va_ext)) {
734 av_log(hwdev, AV_LOG_VERBOSE, "The %s extension is "
742 av_log(hwdev, AV_LOG_VERBOSE, "Failed to get context "
747 av_log(hwdev, AV_LOG_VERBOSE, "Media sharing must be "
760 av_log(hwdev, AV_LOG_VERBOSE, "Failed to get context "
773 av_log(hwdev, AV_LOG_VERBOSE, "Media sharing must be "
779 av_log(hwdev, AV_LOG_VERBOSE, "A valid VADisplay is "
794 av_log(hwdev, AV_LOG_WARNING, "QSV to OpenCL mapping "
816 av_log(hwdev, AV_LOG_WARNING, "DXVA2 to OpenCL mapping "
832 if (!opencl_check_extension(hwdev, d3d11_ext)) {
833 av_log(hwdev, AV_LOG_VERBOSE, "The %s extension is "
836 } else if (!opencl_check_extension(hwdev, nv12_ext)) {
837 av_log(hwdev, AV_LOG_VERBOSE, "The %s extension may be "
850 av_log(hwdev, AV_LOG_WARNING, "D3D11 to OpenCL mapping "
865 if (!opencl_check_extension(hwdev, drm_arm_ext)) {
866 av_log(hwdev, AV_LOG_VERBOSE, "The %s extension is "
871 if (!opencl_check_extension(hwdev, image_ext)) {
872 av_log(hwdev, AV_LOG_VERBOSE, "The %s extension is "
881 av_log(hwdev, AV_LOG_WARNING, "DRM to OpenCL mapping on ARM "
895 static void opencl_device_uninit(AVHWDeviceContext *hwdev)
897 OpenCLDeviceContext *priv = hwdev->internal->priv;
903 av_log(hwdev, AV_LOG_ERROR, "Failed to release internal "
911 static int opencl_filter_intel_media_vaapi_platform(AVHWDeviceContext *hwdev,
921 av_log(hwdev, AV_LOG_DEBUG, "Platform %s does not export the "
929 static int opencl_enumerate_intel_media_vaapi_devices(AVHWDeviceContext *hwdev,
945 av_log(hwdev, AV_LOG_ERROR, "Failed to get address of "
954 av_log(hwdev, AV_LOG_DEBUG, "No VAAPI-supporting devices found "
959 av_log(hwdev, AV_LOG_ERROR, "Failed to get number of devices "
972 av_log(hwdev, AV_LOG_ERROR, "Failed to get list of VAAPI-supporting "
981 static int opencl_filter_intel_media_vaapi_device(AVHWDeviceContext *hwdev,
991 av_log(hwdev, AV_LOG_DEBUG, "Device %s does not support the "
999 static int opencl_filter_dxva2_platform(AVHWDeviceContext *hwdev,
1009 av_log(hwdev, AV_LOG_DEBUG, "Platform %s does not support the "
1015 static int opencl_enumerate_dxva2_devices(AVHWDeviceContext *hwdev,
1032 av_log(hwdev, AV_LOG_ERROR, "Failed to get address of "
1042 av_log(hwdev, AV_LOG_DEBUG, "No DXVA2-supporting devices found "
1047 av_log(hwdev, AV_LOG_ERROR, "Failed to get number of devices "
1061 av_log(hwdev, AV_LOG_ERROR, "Failed to get list of DXVA2-supporting "
1072 static int opencl_filter_d3d11_platform(AVHWDeviceContext *hwdev,
1082 av_log(hwdev, AV_LOG_DEBUG, "Platform %s does not support the "
1088 static int opencl_enumerate_d3d11_devices(AVHWDeviceContext *hwdev,
1103 av_log(hwdev, AV_LOG_ERROR, "Failed to get address of "
1113 av_log(hwdev, AV_LOG_DEBUG, "No D3D11-supporting devices found "
1118 av_log(hwdev, AV_LOG_ERROR, "Failed to get number of devices "
1132 av_log(hwdev, AV_LOG_ERROR, "Failed to get list of D3D11-supporting "
1143 static int opencl_filter_gpu_device(AVHWDeviceContext *hwdev,
1154 av_log(hwdev, AV_LOG_ERROR, "Failed to query device type "
1159 av_log(hwdev, AV_LOG_DEBUG, "Device %s skipped (not GPU).\n",
1169 static int opencl_filter_drm_arm_platform(AVHWDeviceContext *hwdev,
1179 av_log(hwdev, AV_LOG_DEBUG, "Platform %s does not support the "
1185 static int opencl_filter_drm_arm_device(AVHWDeviceContext *hwdev,
1195 av_log(hwdev, AV_LOG_DEBUG, "Device %s does not support the "
1202 static int opencl_device_derive(AVHWDeviceContext *hwdev,
1231 err = opencl_device_create_internal(hwdev, &selector, NULL);
1264 err = opencl_device_create_internal(hwdev, &selector, props);
1280 av_log(hwdev, AV_LOG_ERROR, "Failed to open device handle "
1307 err = opencl_device_create_internal(hwdev, &selector, props);
1312 av_log(hwdev, AV_LOG_ERROR, "Failed to lock device handle "
1344 err = opencl_device_create_internal(hwdev, &selector, props);
1362 err = opencl_device_create_internal(hwdev, &selector, NULL);
1484 static int opencl_frames_get_constraints(AVHWDeviceContext *hwdev,
1488 AVOpenCLDeviceContext *hwctx = hwdev->hwctx;
1499 av_log(hwdev, AV_LOG_ERROR, "Failed to query maximum "
1507 av_log(hwdev, AV_LOG_ERROR, "Failed to query maximum "
1512 av_log(hwdev, AV_LOG_DEBUG, "Maximum supported image size %dx%d.\n",
1520 av_log(hwdev, AV_LOG_ERROR, "Failed to query supported "
1526 av_log(hwdev, AV_LOG_ERROR, "No image support in OpenCL "
1545 av_log(hwdev, AV_LOG_ERROR, "Failed to query supported "
1579 av_log(hwdev, AV_LOG_DEBUG, "Format %s supported.\n",