![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
This file contains functions related to hw acceleration. More...
#include <libavcodec/version.h>#include <libavutil/pixdesc.h>#include <libavutil/hwcontext_vaapi.h>#include "debug.h"#include "hwaccel_libav_common.h"#include "hwaccel_vaapi.h"#include "libavcodec/lavc_common.h"
Go to the source code of this file.
Classes | |
| struct | vaapi_ctx |
Macros | |
| #define | DEFAULT_SURFACES 20 |
| #define | MOD_NAME "[vaapi] " |
Functions | |
| static enum AVPixelFormat | get_sw_format (VADisplay display, AVBufferRef *device_ref, enum AVPixelFormat fallback_fmt) |
| int | vaapi_init (struct AVCodecContext *s, struct hw_accel_state *state, codec_t out_codec) |
| void | vaapi_uninit (struct hw_accel_state *s) |
This file contains functions related to hw acceleration.
Definition in file hwaccel_vaapi.c.
| #define DEFAULT_SURFACES 20 |
Definition at line 63 of file hwaccel_vaapi.c.
Referenced by vaapi_init().
| #define MOD_NAME "[vaapi] " |
Definition at line 64 of file hwaccel_vaapi.c.
|
static |
Returns first SW format from valid_sw_formats. This is usually AV_PIX_FMT_YUV420P or AV_PIX_FMT_NV12.
The code borrows heavily from mpv https://github.com/mpv-player/mpv/blob/master/video/out/hwdec/hwdec_vaapi.c namely from function try_format_config().
< just some valid size
Definition at line 210 of file hwaccel_vaapi.c.
References DEBUG, get_avpixfmts_names(), and MSG.
Referenced by vaapi_init().

| int vaapi_init | ( | struct AVCodecContext * | s, |
| struct hw_accel_state * | state, | ||
| codec_t | out_codec ) |
Definition at line 279 of file hwaccel_vaapi.c.
References DEFAULT_SURFACES, vaapi_ctx::device_ctx, vaapi_ctx::device_ref, vaapi_ctx::device_vaapi_ctx, vaapi_ctx::frame_ctx, get_sw_format(), vaapi_ctx::hw_frames_ctx, HWACCEL_VAAPI, LOG_LEVEL_ERROR, log_msg(), state, and vaapi_uninit().
Referenced by get_format_callback().

| void vaapi_uninit | ( | struct hw_accel_state * | s | ) |
Definition at line 84 of file hwaccel_vaapi.c.
References hw_accel_state::ctx.
Referenced by vaapi_init().