[Mesa-dev] [PATCH 01/11] vl: add parameters for VAAPI encode

Christian König deathsimple at vodafone.de
Thu Jul 14 07:54:15 UTC 2016


Am 14.07.2016 um 00:51 schrieb Boyuan Zhang:
> Allow to specify more parameters in the encoding interface which previously just hardcoded in the encoder
>
> Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>

I'm still not convinced what exactly this is_idr flag should do, but for 
now I've reviewed and push patch 1, 3 and 4.

Christian.

> ---
>   src/gallium/include/pipe/p_video_state.h | 33 ++++++++++++++++++++++++++++++++
>   1 file changed, 33 insertions(+)
>
> diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
> index d353be6..754d013 100644
> --- a/src/gallium/include/pipe/p_video_state.h
> +++ b/src/gallium/include/pipe/p_video_state.h
> @@ -352,9 +352,29 @@ struct pipe_h264_enc_rate_control
>      unsigned frame_rate_num;
>      unsigned frame_rate_den;
>      unsigned vbv_buffer_size;
> +   unsigned vbv_buf_lv;
>      unsigned target_bits_picture;
>      unsigned peak_bits_picture_integer;
>      unsigned peak_bits_picture_fraction;
> +   unsigned fill_data_enable;
> +   unsigned enforce_hrd;
> +};
> +
> +struct pipe_h264_enc_motion_estimation
> +{
> +   unsigned motion_est_quarter_pixel;
> +   unsigned enc_disable_sub_mode;
> +   unsigned lsmvert;
> +   unsigned enc_en_ime_overw_dis_subm;
> +   unsigned enc_ime_overw_dis_subm_no;
> +   unsigned enc_ime2_search_range_x;
> +   unsigned enc_ime2_search_range_y;
> +};
> +
> +struct pipe_h264_enc_pic_control
> +{
> +   unsigned enc_cabac_enable;
> +   unsigned enc_constraint_set_flags;
>   };
>   
>   struct pipe_h264_enc_picture_desc
> @@ -363,17 +383,30 @@ struct pipe_h264_enc_picture_desc
>   
>      struct pipe_h264_enc_rate_control rate_ctrl;
>   
> +   struct pipe_h264_enc_motion_estimation motion_est;
> +   struct pipe_h264_enc_pic_control pic_ctrl;
> +
>      unsigned quant_i_frames;
>      unsigned quant_p_frames;
>      unsigned quant_b_frames;
>   
>      enum pipe_h264_enc_picture_type picture_type;
>      unsigned frame_num;
> +   unsigned frame_num_cnt;
> +   unsigned p_remain;
> +   unsigned i_remain;
> +   unsigned idr_pic_id;
> +   unsigned gop_cnt;
>      unsigned pic_order_cnt;
>      unsigned ref_idx_l0;
>      unsigned ref_idx_l1;
> +   unsigned gop_size;
> +   unsigned ref_pic_mode;
>   
>      bool not_referenced;
> +   bool is_idr;
> +   bool enable_vui;
> +   unsigned int frame_idx[32];
>   };
>   
>   struct pipe_h265_sps



More information about the mesa-dev mailing list