|
xine-lib 1.2.12
|
#include "vaapi_util.h"#include <stdlib.h>#include <pthread.h>#include <xine/xine_internal.h>#include <xine/xineutils.h>#include <va/va.h>#include "xine_va_display.h"Macros | |
| #define | LOG_MODULE "vaapi" |
| #define | PROFILE(profile) case VAProfile##profile: return "VAProfile" #profile |
| #define | ENTRYPOINT(entrypoint) case VAEntrypoint##entrypoint: return "VAEntrypoint" #entrypoint |
| #define | DBG_SURFACE(...) do { } while (0) |
Functions | |
| const char * | _x_va_profile_to_string (VAProfile profile) |
| const char * | _x_va_entrypoint_to_string (VAEntrypoint entrypoint) |
| int | _x_va_check_status (vaapi_context_impl_t *this, VAStatus vaStatus, const char *msg) |
| void | _x_va_reset_va_context (ff_vaapi_context_t *va_context) |
| void | _x_va_free (vaapi_context_impl_t **p_va_context) |
| vaapi_context_impl_t * | _x_va_new (xine_t *xine, int visual_type, const void *visual, unsigned va_display_flags) |
| void | _x_va_destroy_image (vaapi_context_impl_t *va_context, VAImage *va_image) |
| VAStatus | _x_va_create_image (vaapi_context_impl_t *va_context, VASurfaceID va_surface_id, VAImage *va_image, int width, int height, int clear, int *is_bound) |
| static VAStatus | _x_va_destroy_render_surfaces (vaapi_context_impl_t *va_context) |
| void | _x_va_close (vaapi_context_impl_t *va_context) |
| VAStatus | _x_va_init (vaapi_context_impl_t *va_context, int va_profile, int width, int height) |
| static int | _x_va_has_profile (VAProfile *va_profiles, int va_num_profiles, VAProfile profile) |
| int | _x_va_profile_from_imgfmt (vaapi_context_impl_t *va_context, unsigned format) |
| ff_vaapi_surface_t * | _x_va_alloc_surface (vaapi_context_impl_t *va_context) |
| void | _x_va_render_surface (vaapi_context_impl_t *va_context, ff_vaapi_surface_t *va_surface) |
| void | _x_va_release_surface (vaapi_context_impl_t *va_context, ff_vaapi_surface_t *va_surface) |
| void | _x_va_surface_displayed (vaapi_context_impl_t *va_context, ff_vaapi_surface_t *va_surface) |
| #define DBG_SURFACE | ( | ... | ) | do { } while (0) |
| #define ENTRYPOINT | ( | entrypoint | ) | case VAEntrypoint##entrypoint: return "VAEntrypoint" #entrypoint |
| #define LOG_MODULE "vaapi" |
| #define PROFILE | ( | profile | ) | case VAProfile##profile: return "VAProfile" #profile |
| ff_vaapi_surface_t * _x_va_alloc_surface | ( | vaapi_context_impl_t * | va_context | ) |
References _x_va_check_status(), vaapi_context_impl::c, DBG_SURFACE, lprintf, NULL, vaapi_context_impl::query_va_status, RENDER_SURFACES, ff_vaapi_surface_s::status, SURFACE_ALOC, SURFACE_FREE, vaapi_context_impl::surfaces_lock, ff_vaapi_context_s::va_display, vaapi_context_impl::va_head, ff_vaapi_context_s::va_render_surfaces, and ff_vaapi_surface_s::va_surface_id.
Referenced by _x_va_accel_alloc_vaapi_surface().
| int _x_va_check_status | ( | vaapi_context_impl_t * | this, |
| VAStatus | vaStatus, | ||
| const char * | msg | ||
| ) |
References LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _x_va_alloc_surface(), _x_va_close(), _x_va_create_image(), _x_va_destroy_image(), _x_va_destroy_render_surfaces(), _x_va_frame_duplicate_frame_data(), _x_va_frame_provide_standard_frame_data(), _x_va_init(), _x_va_new(), and _x_va_profile_from_imgfmt().
| void _x_va_close | ( | vaapi_context_impl_t * | va_context | ) |
References _x_va_check_status(), _x_va_destroy_render_surfaces(), vaapi_context_impl::c, vaapi_context_impl::ctx_lock, ff_vaapi_context_s::va_config_id, ff_vaapi_context_s::va_context_id, ff_vaapi_context_s::va_display, and ff_vaapi_context_s::valid_context.
Referenced by _get_instance(), _x_va_init(), and vaapi_close().
| VAStatus _x_va_create_image | ( | vaapi_context_impl_t * | va_context, |
| VASurfaceID | va_surface_id, | ||
| VAImage * | va_image, | ||
| int | width, | ||
| int | height, | ||
| int | clear, | ||
| int * | is_bound | ||
| ) |
References _x_va_check_status(), _x_va_destroy_image(), vaapi_context_impl::c, height, lprintf, NULL, ff_vaapi_context_s::va_display, ff_vaapi_context_s::va_image_formats, ff_vaapi_context_s::va_num_image_formats, and width.
Referenced by _x_va_frame_duplicate_frame_data(), _x_va_frame_provide_standard_frame_data(), vaapi_init_internal(), and vaapi_init_soft_surfaces().
| void _x_va_destroy_image | ( | vaapi_context_impl_t * | va_context, |
| VAImage * | va_image | ||
| ) |
References _x_va_check_status(), vaapi_context_impl::c, lprintf, and ff_vaapi_context_s::va_display.
Referenced by _x_va_create_image(), _x_va_frame_duplicate_frame_data(), _x_va_frame_provide_standard_frame_data(), vaapi_create_subpicture(), vaapi_destroy_soft_surfaces(), vaapi_destroy_subpicture(), and vaapi_init_internal().
|
static |
References _x_va_check_status(), vaapi_context_impl::c, ff_vaapi_surface_s::index, RENDER_SURFACES, ff_vaapi_surface_s::status, SURFACE_FREE, vaapi_context_impl::surfaces_lock, ff_vaapi_context_s::va_display, ff_vaapi_context_s::va_render_surfaces, ff_vaapi_surface_s::va_surface_id, and ff_vaapi_context_s::va_surface_ids.
Referenced by _x_va_close().
| const char * _x_va_entrypoint_to_string | ( | VAEntrypoint | entrypoint | ) |
References ENTRYPOINT.
Referenced by _x_va_init().
| void _x_va_free | ( | vaapi_context_impl_t ** | p_va_context | ) |
References _x_freep(), vaapi_context_impl::c, vaapi_context_impl::ctx_lock, xine_va_display_t::dispose, NULL, vaapi_context_impl::surfaces_lock, ff_vaapi_context_s::va_display, vaapi_context_impl::va_display_plugin, ff_vaapi_context_s::va_image_formats, and ff_vaapi_context_s::va_num_image_formats.
Referenced by _get_instance(), _module_dispose(), _x_va_new(), and vaapi_dispose_locked().
|
static |
Referenced by _x_va_profile_from_imgfmt().
| VAStatus _x_va_init | ( | vaapi_context_impl_t * | va_context, |
| int | va_profile, | ||
| int | width, | ||
| int | height | ||
| ) |
References _x_assert, _x_va_check_status(), _x_va_close(), _x_va_entrypoint_to_string(), _x_va_profile_to_string(), vo_frame_s::accel_data, vaapi_context_impl::c, vaapi_context_impl::ctx_lock, vaapi_accel_s::f, vaapi_context_impl::frames, height, ff_vaapi_context_s::height, ff_vaapi_surface_s::index, vaapi_accel_s::index, LOG_MODULE, NULL, RENDER_SURFACES, vaapi_accel_funcs_s::render_vaapi_surface, ff_vaapi_surface_s::status, SURFACE_FREE, vaapi_context_impl::surfaces_lock, ff_vaapi_context_s::va_config_id, ff_vaapi_context_s::va_context_id, ff_vaapi_context_s::va_display, vaapi_context_impl::va_head, ff_vaapi_context_s::va_render_surfaces, ff_vaapi_surface_s::va_surface_id, ff_vaapi_context_s::va_surface_ids, vaCreateSurfaces, ff_vaapi_context_s::valid_context, width, ff_vaapi_context_s::width, vaapi_context_impl::xine, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_instance(), _x_va_accel_vaapi_init(), and vaapi_init_internal().
| vaapi_context_impl_t * _x_va_new | ( | xine_t * | xine, |
| int | visual_type, | ||
| const void * | visual, | ||
| unsigned | va_display_flags | ||
| ) |
References _x_va_check_status(), _x_va_display_open(), _x_va_free(), _x_va_reset_va_context(), vaapi_context_impl::c, vaapi_context_impl::ctx_lock, xine_va_display_t::dispose, LOG_MODULE, NULL, vaapi_context_impl::query_va_status, vaapi_context_impl::surfaces_lock, xine_va_display_t::va_display, ff_vaapi_context_s::va_display, vaapi_context_impl::va_display_plugin, vaapi_context_impl::va_head, ff_vaapi_context_s::va_image_formats, ff_vaapi_context_s::va_num_image_formats, ff_vaapi_context_s::va_render_surfaces, vaapi_context_impl::va_render_surfaces_storage, ff_vaapi_context_s::va_surface_ids, vaapi_context_impl::va_surface_ids_storage, vaapi_context_impl::xine, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_instance(), and vaapi_initialize().
| int _x_va_profile_from_imgfmt | ( | vaapi_context_impl_t * | va_context, |
| unsigned | format | ||
| ) |
References _x_assert, _x_va_check_status(), _x_va_has_profile(), _x_va_profile_to_string(), vaapi_context_impl::c, IMGFMT_VAAPI_CODEC, IMGFMT_VAAPI_CODEC_H264, IMGFMT_VAAPI_CODEC_HEVC, IMGFMT_VAAPI_CODEC_MPEG2, IMGFMT_VAAPI_CODEC_MPEG4, IMGFMT_VAAPI_CODEC_VC1, IMGFMT_VAAPI_HEVC, IMGFMT_VAAPI_HEVC_MAIN10, IMGFMT_VAAPI_VC1, IMGFMT_VAAPI_WMV3, LOG_MODULE, NULL, ff_vaapi_context_s::va_display, vaapi_context_impl::xine, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _x_va_accel_profile_from_imgfmt().
| const char * _x_va_profile_to_string | ( | VAProfile | profile | ) |
References PROFILE.
Referenced by _x_va_init(), and _x_va_profile_from_imgfmt().
| void _x_va_release_surface | ( | vaapi_context_impl_t * | va_context, |
| ff_vaapi_surface_t * | va_surface | ||
| ) |
| void _x_va_render_surface | ( | vaapi_context_impl_t * | va_context, |
| ff_vaapi_surface_t * | va_surface | ||
| ) |
References _x_assert, DBG_SURFACE, ff_vaapi_surface_s::status, SURFACE_ALOC, SURFACE_RENDER, vaapi_context_impl::surfaces_lock, and ff_vaapi_surface_s::va_surface_id.
Referenced by _x_va_accel_render_vaapi_surface().
| void _x_va_reset_va_context | ( | ff_vaapi_context_t * | va_context | ) |
References ff_vaapi_surface_s::index, RENDER_SURFACES, ff_vaapi_surface_s::status, SURFACE_FREE, ff_vaapi_context_s::va_config_id, ff_vaapi_context_s::va_context_id, ff_vaapi_context_s::va_render_surfaces, ff_vaapi_surface_s::va_surface_id, ff_vaapi_context_s::va_surface_ids, and ff_vaapi_context_s::valid_context.
Referenced by _x_va_new().
| void _x_va_surface_displayed | ( | vaapi_context_impl_t * | va_context, |
| ff_vaapi_surface_t * | va_surface | ||
| ) |