From: jialipen <[email protected]> Currently the roi_value in VAEncROI is used as the qp priority when VAConfigAttribRateControl != VA_RC_CQP. But some customers hope to use it as qp_delta like CQP mode. In such case one flag is added to indicate whether it is qp_priority or not. At the same time driver can export it in VAConfigAttribValEncROI to indicate whether the qp_delta is supported when VAConfigAttribRateControl != VA_RC_CQP.
Signed-off-by: Zhao Yakui <[email protected]> Signed-off-by: ceciliapeng <[email protected]> Signed-off-by: Pengfei Qu <[email protected]> --- va/va.h | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/va/va.h b/va/va.h index 2029149..e87891c 100644 --- a/va/va.h +++ b/va/va.h @@ -593,12 +593,20 @@ typedef union _VAConfigAttribValEncROI { struct { /** \brief The number of ROI regions supported, 0 if ROI is not supported. */ unsigned int num_roi_regions : 8; - /** \brief Indicates if ROI priority indication is supported when - * VAConfigAttribRateControl != VA_RC_CQP, else only ROI delta QP added on top of - * the frame level QP is supported when VAConfigAttribRateControl == VA_RC_CQP. + /** \brief Currently the roi_value in VAEncROI is used as the qp priority when + * VAConfigAttribRateControl != VA_RC_CQP. But some customers hope to use + * it as qp_delta like CQP mode. In such case one flag is added to indicate + * whether it is qp_priority or not. At the same time driver can export it + * in VAConfigAttribValEncROI to indicate whether the qp_delta is supported + * when VAConfigAttribRateControl != VA_RC_CQP. */ - unsigned int roi_rc_priority_support : 1; - unsigned int reserved : 23; + unsigned int roi_rc_priority_support : 1; + /** \brief indicates whether ROI delta qp is supported when+ + * VAConfigAttribRateControl != VA_RC_CQP. If not, the roi_rc_priority_support+ + * is used. It is ignored when VAConfigAttribRateControl == VA_RC_CQP+ + */ + unsigned int roi_rc_qp_delat_support : 1; + unsigned int reserved : 22; } bits; unsigned int value; } VAConfigAttribValEncROI; @@ -1293,6 +1301,19 @@ typedef struct _VAEncMiscParameterBufferROI { /** \brief Pointer to a VAEncROI array with num_roi elements. It is relative to frame * coordinates for the frame case and to field coordinates for the field case.*/ VAEncROI *roi; + union { + struct { + /** \this indicates whether the qp delta should be used + * when VAConfigAttribRateControl != VA_RC_CQP. If it is true, + * it indicates that delta qp is used in VAEncROI. Else it indicates + * that the roi priority is used. When the VAConfigAttribRateControl + * is VA_RC_CQP, it is ignored. + */ + uint32_t roi_value_is_qp_delta : 1; + uint32_t reserved : 31; + } bits; + uint32_t value; + } roi_flags; } VAEncMiscParameterBufferROI; /** -- 2.7.4 _______________________________________________ Libva mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libva
