From 4033745a571c228133347446cdeacf80800e78ed Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Wed, 12 Jul 2017 15:15:51 -0700 Subject: [PATCH] Add support for encoding QP buffer VAEncQPBufferH264 structure is defined to hold QP per 16x16 macroblock for H.264 encoding, we can add similar structures for other codecs in the future. VAEncQPBufferType is added to pass the corresponding QP buffer to the driver for each codec. Signed-off-by: Sreerenj Balachandran Signed-off-by: Xiang, Haihao Signed-off-by: Jonathan Bian --- va/va.h | 9 +++++++++ va/va_enc_h264.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/va/va.h b/va/va.h index a0eb02f..5c679bc 100644 --- a/va/va.h +++ b/va/va.h @@ -1123,6 +1123,15 @@ typedef enum VAEncMiscParameterBufferType = 27, VAEncMacroblockParameterBufferType = 28, VAEncMacroblockMapBufferType = 29, + + /** + * \brief Encoding QP buffer + * + * This buffer contains QP per MB for encoding. Currently + * VAEncQPBufferH264 is defined for H.264 encoding, see + * #VAEncQPBufferH264 for details + */ + VAEncQPBufferType = 30, /* Following are video processing buffer types */ /** * \brief Video processing pipeline parameter buffer. diff --git a/va/va_enc_h264.h b/va/va_enc_h264.h index 2e7eb8d..c62ec93 100644 --- a/va/va_enc_h264.h +++ b/va/va_enc_h264.h @@ -368,6 +368,15 @@ typedef struct _VAEncPictureParameterBufferH264 { } pic_fields; } VAEncPictureParameterBufferH264; +typedef struct _VAEncQPBufferH264 { + /* + * \brief This structure holds QP per 16x16 macroblock. Buffer size shall be + * sufficient to fit the slice or frame to be encoded depending on if it is a + * slice level or frame level encoding. + */ + uint8_t qp; +} VAEncQPBufferH264; + /** * \brief Slice parameter for H.264 encoding in baseline, main & high profiles. * -- 2.11.0