FFmpeg: libavcodec/vaapi_decode.h Source File

FFmpeg
Loading...
Searching...
No Matches
vaapi_decode.h
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef AVCODEC_VAAPI_DECODE_H
20#define AVCODEC_VAAPI_DECODE_H
21
22#include <va/va.h>
23
24#include "libavutil/frame.h"
25#include "libavutil/hwcontext.h"
26#include "libavutil/hwcontext_vaapi.h"
27
28#include "avcodec.h"
29
30 static inline VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
31{
32 return (uintptr_t)pic->data[3];
33}
34
46
62
63
64int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx,
65 VAAPIDecodePicture *pic,
66 int type,
67 const void *data,
68 size_t size);
69
70int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx,
71 VAAPIDecodePicture *pic,
72 const void *params_data,
73 int nb_params,
74 size_t params_size,
75 const void *slice_data,
76 size_t slice_size);
77
78int ff_vaapi_decode_issue(AVCodecContext *avctx,
79 VAAPIDecodePicture *pic);
80int ff_vaapi_decode_cancel(AVCodecContext *avctx,
81 VAAPIDecodePicture *pic);
82
83int ff_vaapi_decode_init(AVCodecContext *avctx);
84int ff_vaapi_decode_uninit(AVCodecContext *avctx);
85
86int ff_vaapi_common_frame_params(AVCodecContext *avctx,
87 AVBufferRef *hw_frames_ctx);
88
89#endif /* AVCODEC_VAAPI_DECODE_H */
Libavcodec external API header.
reference-counted frame API
cl_device_type type
API-specific header for AV_HWDEVICE_TYPE_VAAPI.
const char data[16]
Definition mxf.c:149
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
A reference to a data buffer.
Definition buffer.h:82
main external API structure.
Definition avcodec.h:443
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition frame.h:493
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
Definition hwcontext.h:63
This struct describes a set or pool of "hardware" frames (i.e.
Definition hwcontext.h:118
VAAPI connection details.
VAAPI-specific data associated with a frame pool.
AVVAAPIDeviceContext * hwctx
Definition vaapi_decode.h:52
AVHWDeviceContext * device
Definition vaapi_decode.h:51
enum AVPixelFormat surface_format
Definition vaapi_decode.h:57
VASurfaceAttrib pixel_format_attribute
Definition vaapi_decode.h:60
AVHWFramesContext * frames
Definition vaapi_decode.h:54
AVVAAPIFramesContext * hwfc
Definition vaapi_decode.h:55
VAConfigID va_config
Definition vaapi_decode.h:48
VAContextID va_context
Definition vaapi_decode.h:49
VABufferID * param_buffers
Definition vaapi_decode.h:39
int nb_slice_buffers_allocated
Definition vaapi_decode.h:44
VABufferID * slice_buffers
Definition vaapi_decode.h:43
int nb_param_buffers_allocated
Definition vaapi_decode.h:40
VASurfaceID output_surface
Definition vaapi_decode.h:36
int size
int ff_vaapi_decode_make_param_buffer(AVCodecContext *avctx, VAAPIDecodePicture *pic, int type, const void *data, size_t size)
Definition vaapi_decode.c:34
static VASurfaceID ff_vaapi_get_surface_id(AVFrame *pic)
Definition vaapi_decode.h:30
int ff_vaapi_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Definition vaapi_decode.c:668
int ff_vaapi_decode_issue(AVCodecContext *avctx, VAAPIDecodePicture *pic)
Definition vaapi_decode.c:166
int ff_vaapi_decode_init(AVCodecContext *avctx)
Definition vaapi_decode.c:692
int ff_vaapi_decode_uninit(AVCodecContext *avctx)
Definition vaapi_decode.c:738
int ff_vaapi_decode_cancel(AVCodecContext *avctx, VAAPIDecodePicture *pic)
Definition vaapi_decode.c:247
int ff_vaapi_decode_make_slice_buffer(AVCodecContext *avctx, VAAPIDecodePicture *pic, const void *params_data, int nb_params, size_t params_size, const void *slice_data, size_t slice_size)
Definition vaapi_decode.c:75

Generated on Sun Sep 6 2026 19:20:59 for FFmpeg by doxygen 1.13.2

AltStyle によって変換されたページ (->オリジナル) /