Lines Matching defs:hwfc

1613     AVHWFramesContext       *hwfc = opaque;
1621 av_log(hwfc, AV_LOG_ERROR, "Failed to release plane %d: "
1631 AVHWFramesContext *hwfc = opaque;
1632 AVOpenCLDeviceContext *hwctx = hwfc->device_ctx->hwctx;
1646 err = opencl_get_plane_format(hwfc->sw_format, p,
1647 hwfc->width, hwfc->height,
1661 av_log(hwfc, AV_LOG_ERROR, "Failed to create image for "
1672 &opencl_pool_free, hwfc, 0);
1685 static int opencl_frames_init_command_queue(AVHWFramesContext *hwfc)
1687 AVOpenCLFramesContext *hwctx = hwfc->hwctx;
1688 OpenCLDeviceContext *devpriv = hwfc->device_ctx->internal->priv;
1689 OpenCLFramesContext *priv = hwfc->internal->priv;
1696 av_log(hwfc, AV_LOG_ERROR, "Failed to retain frame "
1704 static int opencl_frames_init(AVHWFramesContext *hwfc)
1706 if (!hwfc->pool) {
1707 hwfc->internal->pool_internal =
1708 av_buffer_pool_init2(sizeof(cl_mem), hwfc,
1710 if (!hwfc->internal->pool_internal)
1714 return opencl_frames_init_command_queue(hwfc);
1717 static void opencl_frames_uninit(AVHWFramesContext *hwfc)
1719 OpenCLFramesContext *priv = hwfc->internal->priv;
1729 av_log(hwfc, AV_LOG_ERROR, "Failed to release mapped "
1741 av_log(hwfc, AV_LOG_ERROR, "Failed to release frame "
1748 static int opencl_get_buffer(AVHWFramesContext *hwfc, AVFrame *frame)
1753 frame->buf[0] = av_buffer_pool_get(hwfc->pool);
1763 frame->width = hwfc->width;
1764 frame->height = hwfc->height;
1769 static int opencl_transfer_get_formats(AVHWFramesContext *hwfc,
1779 fmts[0] = hwfc->sw_format;
1786 static int opencl_wait_events(AVHWFramesContext *hwfc,
1794 av_log(hwfc, AV_LOG_ERROR, "Failed to wait for event "
1802 av_log(hwfc, AV_LOG_ERROR, "Failed to release "
1810 static int opencl_transfer_data_from(AVHWFramesContext *hwfc,
1813 OpenCLFramesContext *priv = hwfc->internal->priv;
1822 if (dst->format != hwfc->sw_format)
1826 err = opencl_get_plane_format(hwfc->sw_format, p,
1836 av_log(hwfc, AV_LOG_ERROR, "Plane %d missing on "
1853 av_log(hwfc, AV_LOG_ERROR, "Failed to enqueue read of "
1860 opencl_wait_events(hwfc, events, p);
1865 static int opencl_transfer_data_to(AVHWFramesContext *hwfc,
1868 OpenCLFramesContext *priv = hwfc->internal->priv;
1877 if (src->format != hwfc->sw_format)
1881 err = opencl_get_plane_format(hwfc->sw_format, p,
1891 av_log(hwfc, AV_LOG_ERROR, "Plane %d missing on "
1908 av_log(hwfc, AV_LOG_ERROR, "Failed to enqueue write of "
1915 opencl_wait_events(hwfc, events, p);
1927 static void opencl_unmap_frame(AVHWFramesContext *hwfc,
1930 OpenCLFramesContext *priv = hwfc->internal->priv;
1945 av_log(hwfc, AV_LOG_ERROR, "Failed to unmap OpenCL "
1951 opencl_wait_events(hwfc, events, e);
1956 static int opencl_map_frame(AVHWFramesContext *hwfc, AVFrame *dst,
1959 OpenCLFramesContext *priv = hwfc->internal->priv;
1971 av_assert0(hwfc->sw_format == dst->format);
1991 err = opencl_get_plane_format(hwfc->sw_format, p,
2010 av_log(hwfc, AV_LOG_ERROR, "Failed to map OpenCL "
2018 av_log(hwfc, AV_LOG_DEBUG, "Map plane %d (%p -> %p).\n",
2022 err = opencl_wait_events(hwfc, events, p);
2046 opencl_wait_events(hwfc, events, p);
2821 static int opencl_map_from(AVHWFramesContext *hwfc, AVFrame *dst,
2825 if (hwfc->sw_format != dst->format)
2827 return opencl_map_frame(hwfc, dst, src, flags);
2830 static int opencl_map_to(AVHWFramesContext *hwfc, AVFrame *dst,
2833 av_unused OpenCLDeviceContext *priv = hwfc->device_ctx->internal->priv;
2839 return opencl_map_from_drm_beignet(hwfc, dst, src, flags);
2844 return opencl_map_from_vaapi(hwfc, dst, src, flags);
2850 return opencl_map_from_qsv(hwfc, dst, src, flags);
2855 return opencl_map_from_dxva2(hwfc, dst, src, flags);
2860 return opencl_map_from_d3d11(hwfc, dst, src, flags);
2865 return opencl_map_from_drm_arm(hwfc, dst, src, flags);