FFmpeg
Loading...
Searching...
No Matches
hwcontext_opencl.c File Reference
#include <string.h>
#include "config.h"
#include "avassert.h"
#include "avstring.h"
#include "common.h"
#include "hwcontext.h"
#include "hwcontext_internal.h"
#include "hwcontext_opencl.h"
#include "mem.h"
#include "pixdesc.h"

Go to the source code of this file.

Data Structures

struct  OpenCLDeviceContext
 
struct  OpenCLFramesContext
 
struct  OpenCLDeviceSelector
 
struct  OpenCLMapping
 

Macros

#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
 
#define CL_FUNC(name, desc)
 
#define CHANNEL_ORDER(order, type)
 

Functions

static void CL_CALLBACK opencl_error_callback (const char *errinfo, const void *private_info, size_t cb, void *user_data)
 
static void opencl_device_free (AVHWDeviceContext *hwdev)
 
static char * opencl_get_platform_string (cl_platform_id platform_id, cl_platform_info key)
 
static char * opencl_get_device_string (cl_device_id device_id, cl_device_info key)
 
static int opencl_check_platform_extension (cl_platform_id platform_id, const char *name)
 
static int opencl_check_device_extension (cl_device_id device_id, const char *name)
 
static av_unused int opencl_check_extension (AVHWDeviceContext *hwdev, const char *name)
 
static int opencl_enumerate_platforms (AVHWDeviceContext *hwdev, cl_uint *nb_platforms, cl_platform_id **platforms, void *context)
 
static int opencl_filter_platform (AVHWDeviceContext *hwdev, cl_platform_id platform_id, const char *platform_name, void *context)
 
static int opencl_enumerate_devices (AVHWDeviceContext *hwdev, cl_platform_id platform_id, const char *platform_name, cl_uint *nb_devices, cl_device_id **devices, void *context)
 
static int opencl_filter_device (AVHWDeviceContext *hwdev, cl_device_id device_id, const char *device_name, void *context)
 
static int opencl_device_create_internal (AVHWDeviceContext *hwdev, const OpenCLDeviceSelector *selector, cl_context_properties *props)
 
static int opencl_device_create (AVHWDeviceContext *hwdev, const char *device, AVDictionary *opts, int flags)
 
static int opencl_device_init (AVHWDeviceContext *hwdev)
 
static void opencl_device_uninit (AVHWDeviceContext *hwdev)
 
static int opencl_device_derive (AVHWDeviceContext *hwdev, AVHWDeviceContext *src_ctx, AVDictionary *opts, int flags)
 
static int opencl_get_plane_format (enum AVPixelFormat pixfmt, int plane, int width, int height, cl_image_format *image_format, cl_image_desc *image_desc)
 
static int opencl_frames_get_constraints (AVHWDeviceContext *hwdev, const void *hwconfig, AVHWFramesConstraints *constraints)
 
static void opencl_pool_free (void *opaque, uint8_t *data)
 
static AVBufferRefopencl_pool_alloc (void *opaque, size_t size)
 
static int opencl_frames_init_command_queue (AVHWFramesContext *hwfc)
 
static int opencl_frames_init (AVHWFramesContext *hwfc)
 
static void opencl_frames_uninit (AVHWFramesContext *hwfc)
 
static int opencl_get_buffer (AVHWFramesContext *hwfc, AVFrame *frame)
 
static int opencl_transfer_get_formats (AVHWFramesContext *hwfc, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats)
 
static int opencl_wait_events (AVHWFramesContext *hwfc, cl_event *events, int nb_events)
 
static int opencl_transfer_data_from (AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src)
 
static int opencl_transfer_data_to (AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src)
 
static void opencl_unmap_frame (AVHWFramesContext *hwfc, HWMapDescriptor *hwmap)
 
static int opencl_map_frame (AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags)
 
static cl_mem_flags opencl_mem_flags_for_mapping (int map_flags)
 
static int opencl_map_from (AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags)
 
static int opencl_map_to (AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags)
 
static int opencl_frames_derive_to (AVHWFramesContext *dst_fc, AVHWFramesContext *src_fc, int flags)
 

Variables

struct { 
 
   const char *   key 
 
   cl_platform_info   name 
 
opencl_platform_params [] 
 
struct { 
 
   const char *   key 
 
   cl_device_info   name 
 
opencl_device_params [] 
 
struct { 
 
   const char *   key 
 
   cl_device_type   type 
 
opencl_device_types [] 
 
const HWContextType ff_hwcontext_type_opencl
 

Macro Definition Documentation

◆ CL_USE_DEPRECATED_OPENCL_1_2_APIS

#define CL_USE_DEPRECATED_OPENCL_1_2_APIS

Definition at line 19 of file hwcontext_opencl.c.

◆ CL_FUNC

#define CL_FUNC ( name,
desc )
Value:
do { \
if (fail) \
break; \
priv->name = clGetExtensionFunctionAddressForPlatform( \
priv->platform_id, #name); \
if (!priv->name) { \
av_log(hwdev, AV_LOG_VERBOSE, \
desc " function not found (%s).\n", #name); \
fail = 1; \
} else { \
av_log(hwdev, AV_LOG_VERBOSE, \
desc " function found (%s).\n", #name); \
} \
} while (0)
#define fail
Definition test.h:479
#define AV_LOG_VERBOSE
Detailed information.
Definition log.h:226
const char * desc
Definition libsvtav1.c:83
const char * name
Definition qsvenc.c:142

Referenced by opencl_device_init().

◆ CHANNEL_ORDER

#define CHANNEL_ORDER ( order,
type )
Value:
case order: image_format->image_channel_order = type; break;
cl_device_type type

Referenced by opencl_get_plane_format().

Function Documentation

◆ opencl_error_callback()

static void CL_CALLBACK opencl_error_callback ( const char * errinfo,
const void * private_info,
size_t cb,
void * user_data )
static

Definition at line 167 of file hwcontext_opencl.c.

Referenced by opencl_device_create_internal().

◆ opencl_device_free()

static void opencl_device_free ( AVHWDeviceContext * hwdev)
static

Definition at line 176 of file hwcontext_opencl.c.

Referenced by opencl_device_create_internal().

◆ opencl_get_platform_string()

static char * opencl_get_platform_string ( cl_platform_id platform_id,
cl_platform_info key )
static

◆ opencl_get_device_string()

static char * opencl_get_device_string ( cl_device_id device_id,
cl_device_info key )
static

◆ opencl_check_platform_extension()

static int opencl_check_platform_extension ( cl_platform_id platform_id,
const char * name )
static

Definition at line 265 of file hwcontext_opencl.c.

Referenced by opencl_check_extension().

◆ opencl_check_device_extension()

static int opencl_check_device_extension ( cl_device_id device_id,
const char * name )
static

Definition at line 278 of file hwcontext_opencl.c.

Referenced by opencl_check_extension().

◆ opencl_check_extension()

static av_unused int opencl_check_extension ( AVHWDeviceContext * hwdev,
const char * name )
static

Definition at line 291 of file hwcontext_opencl.c.

Referenced by opencl_device_init().

◆ opencl_enumerate_platforms()

static int opencl_enumerate_platforms ( AVHWDeviceContext * hwdev,
cl_uint * nb_platforms,
cl_platform_id ** platforms,
void * context )
static

Definition at line 312 of file hwcontext_opencl.c.

Referenced by opencl_device_create(), and opencl_device_derive().

◆ opencl_filter_platform()

static int opencl_filter_platform ( AVHWDeviceContext * hwdev,
cl_platform_id platform_id,
const char * platform_name,
void * context )
static

Definition at line 343 of file hwcontext_opencl.c.

Referenced by opencl_device_create(), and opencl_device_derive().

◆ opencl_enumerate_devices()

static int opencl_enumerate_devices ( AVHWDeviceContext * hwdev,
cl_platform_id platform_id,
const char * platform_name,
cl_uint * nb_devices,
cl_device_id ** devices,
void * context )
static

Definition at line 378 of file hwcontext_opencl.c.

Referenced by opencl_device_create(), and opencl_device_derive().

◆ opencl_filter_device()

static int opencl_filter_device ( AVHWDeviceContext * hwdev,
cl_device_id device_id,
const char * device_name,
void * context )
static

Definition at line 418 of file hwcontext_opencl.c.

Referenced by opencl_device_create().

◆ opencl_device_create_internal()

static int opencl_device_create_internal ( AVHWDeviceContext * hwdev,
const OpenCLDeviceSelector * selector,
cl_context_properties * props )
static

Definition at line 508 of file hwcontext_opencl.c.

Referenced by opencl_device_create(), and opencl_device_derive().

◆ opencl_device_create()

static int opencl_device_create ( AVHWDeviceContext * hwdev,
const char * device,
AVDictionary * opts,
int flags )
static

Definition at line 641 of file hwcontext_opencl.c.

Referenced by opencl_device_derive().

◆ opencl_device_init()

static int opencl_device_init ( AVHWDeviceContext * hwdev)
static

Definition at line 674 of file hwcontext_opencl.c.

◆ opencl_device_uninit()

static void opencl_device_uninit ( AVHWDeviceContext * hwdev)
static

Definition at line 910 of file hwcontext_opencl.c.

◆ opencl_device_derive()

static int opencl_device_derive ( AVHWDeviceContext * hwdev,
AVHWDeviceContext * src_ctx,
AVDictionary * opts,
int flags )
static

Definition at line 1217 of file hwcontext_opencl.c.

◆ opencl_get_plane_format()

static int opencl_get_plane_format ( enum AVPixelFormat pixfmt,
int plane,
int width,
int height,
cl_image_format * image_format,
cl_image_desc * image_desc )
static

◆ opencl_frames_get_constraints()

static int opencl_frames_get_constraints ( AVHWDeviceContext * hwdev,
const void * hwconfig,
AVHWFramesConstraints * constraints )
static

Definition at line 1505 of file hwcontext_opencl.c.

◆ opencl_pool_free()

static void opencl_pool_free ( void * opaque,
uint8_t * data )
static

Definition at line 1632 of file hwcontext_opencl.c.

Referenced by opencl_pool_alloc().

◆ opencl_pool_alloc()

static AVBufferRef * opencl_pool_alloc ( void * opaque,
size_t size )
static

Definition at line 1650 of file hwcontext_opencl.c.

Referenced by opencl_frames_init().

◆ opencl_frames_init_command_queue()

static int opencl_frames_init_command_queue ( AVHWFramesContext * hwfc)
static

Definition at line 1706 of file hwcontext_opencl.c.

Referenced by opencl_frames_derive_to(), and opencl_frames_init().

◆ opencl_frames_init()

static int opencl_frames_init ( AVHWFramesContext * hwfc)
static

Definition at line 1725 of file hwcontext_opencl.c.

◆ opencl_frames_uninit()

static void opencl_frames_uninit ( AVHWFramesContext * hwfc)
static

Definition at line 1738 of file hwcontext_opencl.c.

◆ opencl_get_buffer()

static int opencl_get_buffer ( AVHWFramesContext * hwfc,
AVFrame * frame )
static

Definition at line 1769 of file hwcontext_opencl.c.

◆ opencl_transfer_get_formats()

static int opencl_transfer_get_formats ( AVHWFramesContext * hwfc,
enum AVHWFrameTransferDirection dir,
enum AVPixelFormat ** formats )
static

Definition at line 1790 of file hwcontext_opencl.c.

◆ opencl_wait_events()

static int opencl_wait_events ( AVHWFramesContext * hwfc,
cl_event * events,
int nb_events )
static

◆ opencl_transfer_data_from()

static int opencl_transfer_data_from ( AVHWFramesContext * hwfc,
AVFrame * dst,
const AVFrame * src )
static

Definition at line 1831 of file hwcontext_opencl.c.

◆ opencl_transfer_data_to()

static int opencl_transfer_data_to ( AVHWFramesContext * hwfc,
AVFrame * dst,
const AVFrame * src )
static

Definition at line 1886 of file hwcontext_opencl.c.

◆ opencl_unmap_frame()

static void opencl_unmap_frame ( AVHWFramesContext * hwfc,
HWMapDescriptor * hwmap )
static

Definition at line 1948 of file hwcontext_opencl.c.

Referenced by opencl_map_frame().

◆ opencl_map_frame()

static int opencl_map_frame ( AVHWFramesContext * hwfc,
AVFrame * dst,
const AVFrame * src,
int flags )
static

Definition at line 1977 of file hwcontext_opencl.c.

Referenced by opencl_map_from().

◆ opencl_mem_flags_for_mapping()

static cl_mem_flags opencl_mem_flags_for_mapping ( int map_flags)
inlinestatic

Definition at line 2217 of file hwcontext_opencl.c.

◆ opencl_map_from()

static int opencl_map_from ( AVHWFramesContext * hwfc,
AVFrame * dst,
const AVFrame * src,
int flags )
static

Definition at line 2921 of file hwcontext_opencl.c.

◆ opencl_map_to()

static int opencl_map_to ( AVHWFramesContext * hwfc,
AVFrame * dst,
const AVFrame * src,
int flags )
static

Definition at line 2930 of file hwcontext_opencl.c.

◆ opencl_frames_derive_to()

static int opencl_frames_derive_to ( AVHWFramesContext * dst_fc,
AVHWFramesContext * src_fc,
int flags )
static

Definition at line 2981 of file hwcontext_opencl.c.

Variable Documentation

◆ key

const char* key

Definition at line 189 of file hwcontext_opencl.c.

◆ name

cl_device_info name

Definition at line 190 of file hwcontext_opencl.c.

◆ [struct]

struct { ... } opencl_platform_params[]
Initial value:
= {
{ "platform_profile", CL_PLATFORM_PROFILE },
{ "platform_version", CL_PLATFORM_VERSION },
{ "platform_name", CL_PLATFORM_NAME },
{ "platform_vendor", CL_PLATFORM_VENDOR },
{ "platform_extensions", CL_PLATFORM_EXTENSIONS },
}

Referenced by opencl_filter_platform().

◆ [struct]

struct { ... } opencl_device_params[]
Initial value:
= {
{ "device_name", CL_DEVICE_NAME },
{ "device_vendor", CL_DEVICE_VENDOR },
{ "driver_version", CL_DRIVER_VERSION },
{ "device_version", CL_DEVICE_VERSION },
{ "device_profile", CL_DEVICE_PROFILE },
{ "device_extensions", CL_DEVICE_EXTENSIONS },
}

Referenced by opencl_filter_device().

◆ type

cl_device_type type

Definition at line 213 of file hwcontext_opencl.c.

Referenced by aax_read_header(), add_adaptation_set(), add_entry(), add_entry1(), add_grain(), add_info(), add_interval(), add_metadata(), add_metadata_from_renditions(), add_node(), add_renditions_to_variant(), add_side_data_from_buf_ext(), alloc_mem(), amf_skip_tag(), amf_tag_skip(), append_unit_data(), apply_channel_coupling(), apv_metadata_add_payload(), asf_read_ext_content(), asf_read_generic_value(), asf_read_metadata_obj(), asf_read_picture(), asf_read_stream_properties(), asf_read_stream_properties(), asf_read_value(), asf_set_metadata(), asf_store_aspect_ratio(), ass_split_section(), ast_read_packet(), ath_init(), audio_element_obu(), audio_frame_obu(), av1_filter_obus(), av_downmix_matrix_alloc(), av_exif_set_entry(), av_find_best_stream(), av_find_best_stream(), av_frame_get_side_data(), av_frame_new_side_data(), av_frame_new_side_data_from_buf(), av_frame_remove_side_data(), av_frame_side_data_add(), av_frame_side_data_desc(), av_frame_side_data_get(), av_frame_side_data_get_c(), av_frame_side_data_name(), av_frame_side_data_new(), av_frame_side_data_remove(), av_guess_codec(), av_hmac_alloc(), av_hwdevice_ctx_alloc(), av_hwdevice_ctx_create(), av_hwdevice_ctx_create_derived(), av_hwdevice_ctx_create_derived_opts(), av_hwdevice_find_type_by_name(), av_hwdevice_get_type_name(), av_hwdevice_iterate_types(), av_iamf_param_definition_alloc(), av_log_default_callback(), av_packet_add_side_data(), av_packet_copy_props(), av_packet_get_side_data(), av_packet_new_side_data(), av_packet_shrink_side_data(), av_packet_side_data_add(), av_packet_side_data_from_frame(), av_packet_side_data_get(), av_packet_side_data_name(), av_packet_side_data_new(), av_packet_side_data_remove(), av_stereo3d_type_name(), av_tx_init(), av_vdpau_get_surface_parameters(), av_video_enc_params_alloc(), av_video_enc_params_create_side_data(), avdevice_app_to_dev_control_message(), avdevice_dev_to_app_control_message(), avformat_query_codec(), avformat_stream_group_create(), avformat_stream_group_name(), avi_stream2fourcc(), avio_put_str16be(), avio_write_marker(), avpriv_stream_set_need_parsing(), avs_decode_frame(), avs_read_packet(), avs_read_video_packet(), bmv_read_packet(), bprint_color(), cbs_insert_unit_data(), cdxl_read_packet(), che_configure(), check_deblock_luma(), check_dmvr(), check_mc(), check_put_vvc_chroma(), check_put_vvc_chroma_uni(), check_put_vvc_luma(), check_put_vvc_luma_uni(), check_temporal_id(), checkasm_check_gmc(), checkasm_check_hevc_epel(), checkasm_check_hevc_epel_bi(), checkasm_check_hevc_epel_bi_w(), checkasm_check_hevc_epel_uni(), checkasm_check_hevc_epel_uni_w(), checkasm_check_hevc_qpel(), checkasm_check_hevc_qpel_bi(), checkasm_check_hevc_qpel_bi_w(), checkasm_check_hevc_qpel_uni(), checkasm_check_hevc_qpel_uni_w(), checkasm_check_mpegvideo_unquantize(), checkasm_getauxval(), checkasm_json(), checkasm_json_pop(), checkasm_json_push(), choose_encoder(), choose_vlc_set(), cipher_init(), clip_output(), commit_bitstream_and_slice_buffer(), commit_bitstream_and_slice_buffer(), commit_bitstream_and_slice_buffer(), commit_bitstream_and_slice_buffer(), commit_bitstream_and_slice_buffer(), commit_bitstream_and_slice_buffer(), constpx(), copy_meta(), create(), create_hwaccel(), create_sink(), debug_callback(), DECL_READ(), DECL_READ(), decode_13(), decode_cabac_b_mb_sub_type(), decode_channel_map(), decode_close(), decode_delta_j(), decode_dlta(), decode_drc_config(), decode_extension_payload(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_frame(), decode_header(), decode_huff(), decode_info_header(), decode_loudness_set(), decode_mad1(), decode_mad1_24(), decode_move(), decode_nal_sei_prefix(), decode_nal_sei_suffix(), decode_q_branch(), decode_subframe(), decode_unit3(), demux_final_stats(), draw_gradients_slice(), draw_gradients_slice16(), draw_gradients_slice32_planar(), draw_horiz_band(), dshow_add_device(), dshow_cycle_formats(), dshow_get_default_format(), dshow_get_device_media_types(), dshow_get_format_info(), dshow_set_audio_buffer_size(), dvbsub_probe(), ebml_writer_add(), enc_stats_init(), encode_picture(), exact_prod(), exif_decode_tag(), expand32(), expr_count(), extract_field(), ff_aac_get_che(), ff_aac_output_configure(), ff_aac_usac_config_decode(), ff_aac_usac_reset_state(), ff_all_formats(), ff_AMediaCodecList_getCodecNameByType(), ff_amf_match_string(), ff_ass_split_dialog(), ff_attributes_dump(), ff_av1_extract_obu(), ff_av1_parse_seq_header(), ff_cbs_bsf_generic_init(), ff_cbs_sei_find_type(), ff_default_query_formats(), ff_dshow_enummediatypes_Create(), ff_dshow_enummediatypes_Setup(), ff_dshow_filter_Setup(), ff_dshow_pin_ConnectionMediaType(), ff_dshow_pin_EnumMediaTypes(), ff_dshow_pin_Free(), ff_dshow_pin_QueryAccept(), ff_dshow_pin_ReceiveConnection(), ff_dxva2_commit_buffer(), ff_dxva2_common_end_frame(), ff_estimate_b_frame_motion(), ff_fix_long_mvs(), ff_fix_long_p_mvs(), ff_flac_parse_picture(), ff_frame_new_side_data(), ff_frame_new_side_data_from_buf(), ff_frame_new_side_data_from_buf_ext(), ff_frame_side_data_add_from_buf(), ff_get_best_fcode(), ff_get_coded_side_data(), ff_getauxval(), ff_h2645_sei_message_decode(), ff_h2645_unit_requires_zero_byte(), ff_h264_sei_decode(), ff_h274_hash_init(), ff_hevc_annexb2mp4(), ff_hevc_decode_extradata(), ff_hevc_decode_nal_sei(), ff_hevc_decode_nal_sei(), ff_hevc_nal_is_nonref(), ff_hw_base_encode_get_pictype_name(), ff_iamf_parse_obu_header(), ff_iamf_read_packet(), ff_iamf_write_audio_frame(), ff_iamfdec_read_descriptors(), ff_id3v2_write_apic(), ff_ip_resolve_host(), ff_isom_write_av1c(), ff_isom_write_vvcc(), ff_jni_init_jfields(), ff_jni_reset_jfields(), ff_jpeg2000_dwt_init(), ff_make_pixel_format_list(), ff_me_init(), ff_media_type_dump(), ff_media_type_to_pix_fmt(), ff_media_type_to_sample_fmt(), ff_norm_qscale(), ff_opencl_filter_work_size_from_image(), ff_print_AM_MEDIA_TYPE(), ff_qsv_map_pictype(), ff_rtmp_packet_create(), ff_rtmpe_compute_secret_key(), ff_rtmpe_encrypt_sig(), ff_rtp_send_jpeg(), ff_set_cmp(), ff_socket(), ff_spatial_dwt(), ff_spatial_idwt(), ff_spatial_idwt_buffered_init(), ff_spatial_idwt_buffered_slice(), ff_spatial_idwt_init(), ff_spatial_idwt_init_x86(), ff_sws_add_filters(), ff_sws_apply_lut3d(), ff_sws_decode_colors(), ff_sws_encode_colors(), ff_sws_op_list_split_at(), ff_sws_pixel_type_is_int(), ff_sws_pixel_type_name(), ff_sws_pixel_type_size(), ff_tget(), ff_tread_tag(), ff_tx_decompose_length(), ff_tx_init_subtx(), ff_v4l2_context_set_status(), ff_vaapi_decode_make_param_buffer(), ff_vaapi_vpp_make_param_buffers(), ff_vdpau_common_frame_params(), ff_vdpau_common_init(), ff_vk_exec_add_dep_obj(), ff_voc_get_packet(), ff_vvc_annexb2mp4(), fg_complex_bind_input(), fg_create(), fg_create_simple(), fg_output_frame(), filter(), filter_frame(), find_and_decode_index(), find_codec(), find_mca_link_id(), find_stream(), flac_parse_block_header(), flac_probe(), flac_write_picture(), flush(), flv_data_packet(), flv_parse_video_color_info(), flv_read_metabody(), flv_read_packet(), format_line(), frame_configure_elements(), frame_encode(), frei0r_init(), generate_fake_vps(), generate_transition(), get_content_type(), get_duration_insec(), get_extension_str(), get_format(), get_media_type_char(), get_obu_bit_length(), get_penalty_factor(), get_penalty_factor(), get_pi_samples(), get_pict_type(), get_planar_fmt(), get_score(), get_score(), get_sei_msg_bytes(), get_tag(), get_tag(), GET_TOK(), get_type_string(), get_value(), gif_read_header(), global_motion_param(), global_motion_params(), global_motion_params(), gxf_resync_media(), gxf_write_packet_header(), h264_handle_packet(), h264_probe(), handle_metadata(), hevc_extradata_to_annexb(), hevc_filter(), hevc_probe(), hvcc_parse_nal_unit(), hw_decoder_init(), hw_device_default_name(), hw_device_get_by_type(), hw_device_init_from_string(), hw_device_init_from_type(), hw_device_setup_for_decode(), hwmap_config_output(), iamf_probe(), id3v2_parse(), idct(), idct10(), idct_mmi(), idct_msa(), iff_read_header(), import_pem(), init(), init(), init(), init_mpeg12_test(), init_muxer(), init_sec_buffer(), insert_trim(), insert_unit_content(), io_write_data_type(), is_expand_bit(), is_frame_packing_type_valid(), ist_add(), ist_find_unused(), iterative_me(), ivr_read_header(), jpeg_create_header(), jpeg_parse_packet(), jpegxl_read_extra_channel_info(), lavfi_read_header(), libjxl_receive_frame(), libx265_encode_frame(), list_formats(), log_type(), main(), main(), main(), make_eval_expr(), match_stream_specifier(), merge_formats_internal(), meta_spec_matches(), mf_choose_input_type(), mf_choose_output_type(), mf_enca_input_adjust(), mf_enca_input_score(), mf_enca_output_adjust(), mf_enca_output_score(), mf_enca_output_type_get(), mf_encv_input_adjust(), mf_encv_input_score(), mf_encv_output_adjust(), mf_encv_output_score(), mf_encv_output_type_get(), mf_output_type_get(), mjpeg_decode_app(), mkv_write_blockadditionmapping(), mm_decode_frame(), mmap_close(), mmap_start(), mms_safe_send_recv(), modify_fpel(), moflex_probe(), moflex_read_sync(), mov_read_covr(), mov_read_default(), mov_read_dfla(), mov_read_dref(), mov_read_eyes(), mov_read_ftyp(), mov_read_glbl(), mov_read_hdlr(), mov_read_iprp(), mov_read_iref(), mov_read_iref_cdsc(), mov_read_keys(), mov_read_pack(), mov_read_SA3D(), mov_read_st3d(), mov_text_decode_frame(), mov_write_isml_manifest(), mov_write_psp_udta_tag(), mpegps_psm_parse(), mpegps_read_packet(), mpegts_open_filter(), musx_read_header(), mux_final_stats(), mux_stream_alloc(), mxf_add_metadata_set(), mxf_free_metadataset(), mxf_metadataset_init(), mxf_parse_klv(), mxf_parse_structural_metadata(), mxf_read_close(), mxf_read_local_tags(), mxf_resolve_strong_ref(), mxf_write_content_storage(), mxf_write_umid(), mxf_write_uuid(), nal_send(), needs_termination(), new_rendition(), next_gain(), of_add_metadata(), of_parse_group_token(), ofilter_alloc(), on2avc_decode_pairs(), on2avc_decode_quads(), open_codec_context(), open_codec_context(), opt_copy_elem(), opt_free_elem(), opt_init_hw_device(), opt_is_pod(), opt_match_per_stream(), opt_match_per_stream_group(), opt_set_elem(), ost_add(), output_server_manifest(), p8idct(), packet_side_data_add(), packet_side_data_get(), param_parse(), parse_adaptation_sets(), parse_delays(), parse_device_name(), parse_ext(), parse_fmtp(), parse_header(), parse_legacy_attrib(), parse_manifest_representation(), parse_meta_type(), parse_number(), parse_obu_header(), parse_packet_header(), parse_timestamp(), parse_utf(), pixel_from_q64(), pixel_is_1s(), pixel_is_repeating(), pixel_type_to_int(), pixel_type_to_int(), print_cpu_flags(), print_track_chunks(), print_type(), probe(), probe(), process_metadata(), progress_done(), project(), prompeg_write_fec(), pulse_control_message(), put_chunk(), qdm2_decode_fft_packets(), qdm2_parse_subpacket(), qdm2_search_subpacket_type_in_list(), query_formats(), queue_alloc(), randomize_luma_buffers(), rasm_op_new(), read_global_param(), read_header(), read_kuki_chunk(), read_packet(), read_packet(), read_thread(), rm_assemble_video_frame(), rndpx(), rtmp_handshake(), rtmp_packet_read_one_chunk(), rtmp_write_amf_data(), rv34_parse(), rv34_pred_mv_b(), scan_file(), sch_stop(), select_reference_stream(), set_bframe_chain_length(), set_blocks(), set_codec_from_probe_data(), set_dispositions(), set_format(), set_string_fmt(), set_string_number(), setup_sync_queues(), sga_decode_frame(), sga_probe(), sga_read_header(), show_hwaccels(), side_data_pref(), silk_decode_frame(), sol_channels(), sol_codec_id(), sol_codec_type(), sol_read_header(), spatial_idwt_init(), spatial_idwt_init_TMPL(), spatial_idwt_slice(), spdif_get_pkt_size_bits(), spectral_to_sample(), sq_alloc(), ssim_end1(), sunrast_decode_frame(), svq3_decode_block(), svq3_decode_mb(), tak_get_nb_samples(), tak_read_header(), targa_decode_rle(), task_init(), test_device(), test_device_type(), test_dwt(), tiff_decode_tag(), tm2_decode_blocks(), tnput(), tq_alloc(), type2str(), type_string(), unsupported_codec(), update_double_stat(), update_float_stat(), vaapi_decode_find_best_format(), vaapi_encode_add_global_param(), vaapi_encode_av1_add_obu(), vaapi_encode_av1_write_extra_header(), vaapi_encode_h264_write_extra_header(), vaapi_encode_h265_write_extra_header(), vaapi_encode_issue(), vaapi_encode_make_misc_param_buffer(), vaapi_encode_make_packed_header(), vaapi_encode_make_param_buffer(), vaapi_encode_mjpeg_write_extra_buffer(), vaapi_encode_mpeg2_add_header(), vaapi_encode_surface_alignment(), vaapi_encode_vp8_write_quant_table(), vaapi_frames_get_constraints(), vc1_probe(), vk_dev_type(), vmd_read_header(), vp3_decode_frame(), vp56_decode_4mv(), vp56_parse_mb_type_models(), vqa_decode_frame_hicolor(), vs2av_log(), vulkan_device_has_rebar(), vulkan_encode_av1_add_obu(), vvc_extradata_to_annexb(), vvc_probe(), w_c(), wmv2_pred_motion(), write_configuration_record(), write_fragments(), write_frame(), write_metadata_header(), write_number(), write_packet(), write_tiles(), write_typecode(), wv_unpack_mono(), wv_unpack_stereo(), and xv_control_message().

◆ [struct]

struct { ... } opencl_device_types[]
Initial value:
= {
{ "cpu", CL_DEVICE_TYPE_CPU },
{ "gpu", CL_DEVICE_TYPE_GPU },
{ "accelerator", CL_DEVICE_TYPE_ACCELERATOR },
{ "custom", CL_DEVICE_TYPE_CUSTOM },
{ "default", CL_DEVICE_TYPE_DEFAULT },
{ "all", CL_DEVICE_TYPE_ALL },
}

Referenced by opencl_filter_device().

◆ ff_hwcontext_type_opencl

const HWContextType ff_hwcontext_type_opencl
Initial value:
= {
.name = "OpenCL",
.device_hwctx_size = sizeof(OpenCLDeviceContext),
.frames_hwctx_size = sizeof(OpenCLFramesContext),
.device_create = &opencl_device_create,
.device_derive = &opencl_device_derive,
.device_init = &opencl_device_init,
.device_uninit = &opencl_device_uninit,
.frames_get_constraints = &opencl_frames_get_constraints,
.frames_init = &opencl_frames_init,
.frames_uninit = &opencl_frames_uninit,
.frames_get_buffer = &opencl_get_buffer,
.transfer_get_formats = &opencl_transfer_get_formats,
.transfer_data_to = &opencl_transfer_data_to,
.transfer_data_from = &opencl_transfer_data_from,
.map_from = &opencl_map_from,
.map_to = &opencl_map_to,
.frames_derive_to = &opencl_frames_derive_to,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
@ AV_HWDEVICE_TYPE_OPENCL
Definition hwcontext.h:37
static int opencl_frames_get_constraints(AVHWDeviceContext *hwdev, const void *hwconfig, AVHWFramesConstraints *constraints)
static int opencl_transfer_data_from(AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src)
static int opencl_map_to(AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags)
static int opencl_frames_init(AVHWFramesContext *hwfc)
static int opencl_device_create(AVHWDeviceContext *hwdev, const char *device, AVDictionary *opts, int flags)
static int opencl_frames_derive_to(AVHWFramesContext *dst_fc, AVHWFramesContext *src_fc, int flags)
static int opencl_device_init(AVHWDeviceContext *hwdev)
static void opencl_device_uninit(AVHWDeviceContext *hwdev)
static int opencl_get_buffer(AVHWFramesContext *hwfc, AVFrame *frame)
static void opencl_frames_uninit(AVHWFramesContext *hwfc)
static int opencl_map_from(AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src, int flags)
static int opencl_transfer_data_to(AVHWFramesContext *hwfc, AVFrame *dst, const AVFrame *src)
static int opencl_transfer_get_formats(AVHWFramesContext *hwfc, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats)
static int opencl_device_derive(AVHWDeviceContext *hwdev, AVHWDeviceContext *src_ctx, AVDictionary *opts, int flags)
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
Definition pixfmt.h:358

Definition at line 3045 of file hwcontext_opencl.c.