xine-lib: xine-lib-1.2.13/src/video_out/vaapi/vaapi_util.h File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Typedefs | Functions
vaapi_util.h File Reference
`#include <xine/video_out.h>`
`#include "accel_vaapi.h"`
`#include <sys/types.h>`
`#include <va/va.h>`

Go to the source code of this file.

## Data Structures
struct | vaapi_context_impl

## Macros
#define | RENDER_SURFACES 50

## Typedefs
typedef struct vaapi_context_impl | vaapi_context_impl_t

## Functions
const char * | _x_va_profile_to_string (VAProfile profile)
const char * | _x_va_entrypoint_to_string (VAEntrypoint entrypoint)
void | _x_va_reset_va_context (ff_vaapi_context_t *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_free (vaapi_context_impl_t **va_context)
int | _x_va_check_status (vaapi_context_impl_t *va_context, VAStatus vaStatus, const char *msg)
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)
int | _x_va_profile_from_imgfmt (vaapi_context_impl_t *va_context, unsigned format)
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)
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)

## Macro Definition Documentation

## ◆ RENDER_SURFACES

#define RENDER_SURFACES 50

Referenced by _x_va_accel_get_vaapi_surface(), _x_va_alloc_surface(), _x_va_destroy_render_surfaces(), _x_va_frame_alloc_frame(), _x_va_frame_displayed(), _x_va_frame_duplicate_frame_data(), _x_va_frame_provide_standard_frame_data(), _x_va_frame_update_frame_format(), _x_va_init(), _x_va_reset_va_context(), vaapi_display_frame(), vaapi_get_property(), vaapi_init_internal(), vaapi_open_plugin(), and vaapi_ovl_associate().

## Typedef Documentation

## ◆ vaapi_context_impl_t

typedef struct vaapi_context_impl vaapi_context_impl_t

## Function Documentation

## ◆ _x_va_alloc_surface()

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().

## ◆ _x_va_check_status()

int _x_va_check_status | ( | vaapi_context_impl_t * | va_context,
|  | 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().

## ◆ _x_va_close()

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().

## ◆ _x_va_create_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 )

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().

## ◆ _x_va_destroy_image()

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().

## ◆ _x_va_entrypoint_to_string()

const char * _x_va_entrypoint_to_string | ( | VAEntrypoint | entrypoint | ) |

References ENTRYPOINT.

Referenced by _x_va_init().

## ◆ _x_va_free()

void _x_va_free | ( | vaapi_context_impl_t ** | 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().

## ◆ _x_va_init()

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, ff_vaapi_context_s::height, 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, ff_vaapi_context_s::width, 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().

## ◆ _x_va_new()

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, ff_vaapi_context_s::va_display, xine_va_display_t::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().

## ◆ _x_va_profile_from_imgfmt()

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().

## ◆ _x_va_profile_to_string()

const char * _x_va_profile_to_string | ( | VAProfile | profile | ) |

References PROFILE.

Referenced by _x_va_init(), and _x_va_profile_from_imgfmt().

## ◆ _x_va_release_surface()

void _x_va_release_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_FREE, SURFACE_RELEASE, SURFACE_RENDER, SURFACE_RENDER_RELEASE, vaapi_context_impl::surfaces_lock, and ff_vaapi_surface_s::va_surface_id.

Referenced by _x_va_accel_release_vaapi_surface().

## ◆ _x_va_render_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().

## ◆ _x_va_reset_va_context()

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().

## ◆ _x_va_surface_displayed()

void _x_va_surface_displayed | ( | vaapi_context_impl_t * | va_context,
|  | ff_vaapi_surface_t * | va_surface )

References _x_assert, DBG_SURFACE, ff_vaapi_surface_s::status, SURFACE_FREE, SURFACE_RELEASE, SURFACE_RENDER, SURFACE_RENDER_RELEASE, vaapi_context_impl::surfaces_lock, and ff_vaapi_surface_s::va_surface_id.

Referenced by _x_va_frame_displayed(), and _x_va_frame_duplicate_frame_data().