Skip to content

Commit

Permalink
Add VVC decode LibVA interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunjuanLiu authored and XinfengZhang committed Sep 6, 2023
1 parent faeff03 commit 0507018
Show file tree
Hide file tree
Showing 6 changed files with 1,567 additions and 3 deletions.
1 change: 1 addition & 0 deletions va/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ libva_source_h = \
va_dec_jpeg.h \
va_dec_vp8.h \
va_dec_vp9.h \
va_dec_vvc.h \
va_drmcommon.h \
va_egl.h \
va_enc_hevc.h \
Expand Down
1 change: 1 addition & 0 deletions va/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ libva_headers = [
'va_dec_vp8.h',
'va_dec_vp9.h',
'va_dec_av1.h',
'va_dec_vvc.h',
'va_drmcommon.h',
'va_egl.h',
'va_enc_hevc.h',
Expand Down
72 changes: 70 additions & 2 deletions va/va.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ extern "C" {
* - \ref api_enc_vp8
* - \ref api_enc_vp9
* - \ref api_enc_av1
* - Decoder (HEVC, JPEG, VP8, VP9, AV1)
* - Decoder (HEVC, JPEG, VP8, VP9, AV1, VVC)
* - \ref api_dec_hevc
* - \ref api_dec_jpeg
* - \ref api_dec_vp8
* - \ref api_dec_vp9
* - \ref api_dec_av1
* - \ref api_dec_vvc
* - \ref api_vpp
* - \ref api_prot
* - FEI (H264, HEVC)
Expand Down Expand Up @@ -538,7 +539,9 @@ typedef enum {
VAProfileHEVCSccMain444_10 = 34,
/** \brief Profile ID used for protected video playback. */
VAProfileProtected = 35,
VAProfileH264High10 = 36
VAProfileH264High10 = 36,
VAProfileVVCMain10 = 37,
VAProfileVVCMultilayerMain10 = 38
} VAProfile;

/**
Expand Down Expand Up @@ -2112,6 +2115,37 @@ typedef enum {
*/
VAEncDeltaQpPerBlockBufferType = 61,

/**
* \brief VVC ALF data buffer
*
* Refer to \c VAAlfDataVVC
*/
VAAlfBufferType = 62,
/**
* \brief VVC LMCS data buffer
*
* Refer to \c VALmcsDataVVC
*/
VALmcsBufferType = 63,
/**
* \brief VVC SubPic data buffer
*
* Refer to \c VASubPicVVC
*/
VASubPicBufferType = 64,
/**
* \brief VVC Tile Dimension data buffer
*
* Data buffer of tile widths and heights, with each element formatted as uint16_t
*/
VATileBufferType = 65,
/**
* \brief VVC Slice Structure data buffer
*
* Refer to \c VASliceStructVVC
*/
VASliceStructBufferType = 66,

VABufferTypeMax
} VABufferType;

Expand Down Expand Up @@ -5219,6 +5253,39 @@ typedef struct _VAPictureHEVC {
*/
#define VA_PICTURE_HEVC_RPS_LT_CURR 0x00000040

/****************************
* VVC data structures
****************************/
/**
* \brief Description of picture properties of those in DPB surfaces.
*
* Only progressive scan is supported, each surface contains one whole
* frame picture.
*/

typedef struct _VAPictureVVC {
/** \brief reconstructed picture buffer surface index
* invalid when taking value VA_INVALID_SURFACE.
*/
VASurfaceID picture_id;

/** \brief picture order count. */
int32_t pic_order_cnt;

/* described below */
uint32_t flags;

/** \brief Reserved bytes for future use, must be zero */
uint32_t va_reserved[VA_PADDING_LOW];
} VAPictureVVC;

/* flags in VAPictureVVC could be OR of the following */
#define VA_PICTURE_VVC_INVALID 0x00000001
/** \brief Long term reference picture */
#define VA_PICTURE_VVC_LONG_TERM_REFERENCE 0x00000002
/** \brief Unavailable reference picture */
#define VA_PICTURE_VVC_UNAVAILABLE_REFERENCE 0x00000004

typedef enum {
VACopyObjectSurface = 0,
VACopyObjectBuffer = 1,
Expand Down Expand Up @@ -5264,6 +5331,7 @@ VAStatus vaCopy(VADisplay dpy, VACopyObject * dst, VACopyObject * src, VACopyOpt
#include <va/va_dec_vp8.h>
#include <va/va_dec_vp9.h>
#include <va/va_dec_av1.h>
#include <va/va_dec_vvc.h>
#include <va/va_enc_hevc.h>
#include <va/va_fei_hevc.h>
#include <va/va_enc_h264.h>
Expand Down
Loading

0 comments on commit 0507018

Please sign in to comment.