Skip to content

Commit 28c04ae

Browse files
committed
Add VVC decode LibVA interface.
Signed-off-by: Liu, Chunjuan <[email protected]>
1 parent faeff03 commit 28c04ae

File tree

6 files changed

+1622
-3
lines changed

6 files changed

+1622
-3
lines changed

va/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ libva_source_h = \
4848
va_dec_jpeg.h \
4949
va_dec_vp8.h \
5050
va_dec_vp9.h \
51+
va_dec_vvc.h \
5152
va_drmcommon.h \
5253
va_egl.h \
5354
va_enc_hevc.h \

va/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ libva_headers = [
2727
'va_dec_vp8.h',
2828
'va_dec_vp9.h',
2929
'va_dec_av1.h',
30+
'va_dec_vvc.h',
3031
'va_drmcommon.h',
3132
'va_egl.h',
3233
'va_enc_hevc.h',

va/va.h

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,13 @@ extern "C" {
120120
* - \ref api_enc_vp8
121121
* - \ref api_enc_vp9
122122
* - \ref api_enc_av1
123-
* - Decoder (HEVC, JPEG, VP8, VP9, AV1)
123+
* - Decoder (HEVC, JPEG, VP8, VP9, AV1, VVC)
124124
* - \ref api_dec_hevc
125125
* - \ref api_dec_jpeg
126126
* - \ref api_dec_vp8
127127
* - \ref api_dec_vp9
128128
* - \ref api_dec_av1
129+
* - \ref api_dec_vvc
129130
* - \ref api_vpp
130131
* - \ref api_prot
131132
* - FEI (H264, HEVC)
@@ -538,7 +539,9 @@ typedef enum {
538539
VAProfileHEVCSccMain444_10 = 34,
539540
/** \brief Profile ID used for protected video playback. */
540541
VAProfileProtected = 35,
541-
VAProfileH264High10 = 36
542+
VAProfileH264High10 = 36,
543+
VAProfileVVCMain10 = 37,
544+
VAProfileVVCMultilayerMain10 = 38
542545
} VAProfile;
543546

544547
/**
@@ -2112,6 +2115,37 @@ typedef enum {
21122115
*/
21132116
VAEncDeltaQpPerBlockBufferType = 61,
21142117

2118+
/**
2119+
* \brief VVC ALF data buffer
2120+
*
2121+
* Refer to \c VAAlfDataVVC
2122+
*/
2123+
VAAlfBufferType = 62,
2124+
/**
2125+
* \brief VVC LMCS data buffer
2126+
*
2127+
* Refer to \c VALmcsDataVVC
2128+
*/
2129+
VALmcsBufferType = 63,
2130+
/**
2131+
* \brief VVC SubPic data buffer
2132+
*
2133+
* Refer to \c VASubPicVVC
2134+
*/
2135+
VASubPicBufferType = 64,
2136+
/**
2137+
* \brief VVC Tile Dimension data buffer
2138+
*
2139+
* Data buffer of tile widths and heights, with each element formatted as uint16_t
2140+
*/
2141+
VATileBufferType = 65,
2142+
/**
2143+
* \brief VVC Slice Structure data buffer
2144+
*
2145+
* Refer to \c VASliceStructVVC
2146+
*/
2147+
VASliceStructBufferType = 66,
2148+
21152149
VABufferTypeMax
21162150
} VABufferType;
21172151

@@ -5219,6 +5253,43 @@ typedef struct _VAPictureHEVC {
52195253
*/
52205254
#define VA_PICTURE_HEVC_RPS_LT_CURR 0x00000040
52215255

5256+
/****************************
5257+
* VVC data structures
5258+
****************************/
5259+
/**
5260+
* \brief Description of picture properties of those in DPB surfaces.
5261+
*
5262+
* Only progressive scan is supported, each surface contains one whole
5263+
* frame picture.
5264+
*/
5265+
5266+
typedef struct _VAPictureVVC {
5267+
/** \brief reconstructed picture buffer surface index
5268+
* invalid when taking value VA_INVALID_SURFACE.
5269+
*/
5270+
VASurfaceID picture_id;
5271+
5272+
/** \brief picture order count. */
5273+
int32_t pic_order_cnt;
5274+
5275+
/* described below */
5276+
uint32_t flags;
5277+
5278+
/** \brief Reserved bytes for future use, must be zero */
5279+
uint32_t va_reserved[VA_PADDING_LOW];
5280+
} VAPictureVVC;
5281+
5282+
/* flags in VAPictureVVC could be OR of the following */
5283+
#define VA_PICTURE_VVC_INVALID 0x00000001
5284+
/** \brief Long term reference picture */
5285+
#define VA_PICTURE_VVC_LONG_TERM_REFERENCE 0x00000002
5286+
/** \brief Unavailable reference picture
5287+
* This flag indicates the situation that the process of
5288+
* "generating unavailable reference pictures" (spec section 8.3.4)
5289+
* is required.
5290+
*/
5291+
#define VA_PICTURE_VVC_UNAVAILABLE_REFERENCE 0x00000004
5292+
52225293
typedef enum {
52235294
VACopyObjectSurface = 0,
52245295
VACopyObjectBuffer = 1,
@@ -5264,6 +5335,7 @@ VAStatus vaCopy(VADisplay dpy, VACopyObject * dst, VACopyObject * src, VACopyOpt
52645335
#include <va/va_dec_vp8.h>
52655336
#include <va/va_dec_vp9.h>
52665337
#include <va/va_dec_av1.h>
5338+
#include <va/va_dec_vvc.h>
52675339
#include <va/va_enc_hevc.h>
52685340
#include <va/va_fei_hevc.h>
52695341
#include <va/va_enc_h264.h>

0 commit comments

Comments
 (0)