[Libva] [PATCH 1/3] Subject: [PATCH] Add one flag to use the qp_delta instead of qp priority for ROI under non-CQP mode

Xiang, Haihao haihao.xiang at intel.com
Fri Jul 1 02:57:42 UTC 2016


Please remove "Subject: [PATCH]" from the short summary.


> From: jialipen <cecilia.peng at intel.com>
> 
> 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.

Because this commit changes the usage of roi_value, please update the
comment for roi_value in VAEncROI too.

> 
> Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
> Signed-off-by: ceciliapeng <cecilia.peng at intel.com>
> Signed-off-by: Pengfei Qu <Pengfei.Qu at intel.com>
> ---
>  va/va.h | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/va/va.h b/va/va.h
> index 2029149..8373737 100644
> --- a/va/va.h
> +++ b/va/va.h
> @@ -598,7 +598,12 @@ typedef union _VAConfigAttribValEncROI {
>           * the frame level QP is supported when
> VAConfigAttribRateControl == VA_RC_CQP.
>           */
>  	unsigned int roi_rc_priority_support	: 1;
> -	unsigned int reserved                   : 23;
> +        /** \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 +1298,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;
>  
>  /**


More information about the Libva mailing list