frontend/va: remove some unnecessary code
authorRuijing Dong <ruijing.dong@amd.com>
Sat, 10 Sep 2022 20:19:09 +0000 (16:19 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Sep 2022 00:16:19 +0000 (00:16 +0000)
clean up some code related to h264 encoding.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18534>

src/gallium/frontends/va/picture_h264_enc.c
src/gallium/include/pipe/p_video_state.h

index a02ed94..abe9c1b 100644 (file)
@@ -259,18 +259,6 @@ vlVaHandleVAEncMiscParameterTypeQualityLevelH264(vlVaContext *context, VAEncMisc
 
 void getEncParamPresetH264(vlVaContext *context)
 {
-   //motion estimation preset
-   context->desc.h264enc.motion_est.motion_est_quarter_pixel = 0;
-   context->desc.h264enc.motion_est.lsmvert = 0;
-   context->desc.h264enc.motion_est.enc_disable_sub_mode = 254;
-   context->desc.h264enc.motion_est.enc_en_ime_overw_dis_subm = 0;
-   context->desc.h264enc.motion_est.enc_ime_overw_dis_subm_no = 0;
-   context->desc.h264enc.motion_est.enc_ime2_search_range_x = 1;
-   context->desc.h264enc.motion_est.enc_ime2_search_range_y = 1;
-
-   //pic control preset
-   context->desc.h264enc.pic_ctrl.enc_constraint_set_flags = 0x00000040;
-
    //rate control
    context->desc.h264enc.rate_ctrl[0].vbv_buffer_size = 20000000;
    context->desc.h264enc.rate_ctrl[0].vbv_buf_lv = 48;
@@ -292,5 +280,4 @@ void getEncParamPresetH264(vlVaContext *context)
       context->desc.h264enc.rate_ctrl[0].frame_rate_num);
 
    context->desc.h264enc.rate_ctrl[0].peak_bits_picture_fraction = 0;
-   context->desc.h264enc.ref_pic_mode = 0x00000201;
 }
index 7948e62..a503081 100755 (executable)
@@ -446,7 +446,6 @@ struct pipe_h264_enc_picture_desc
    unsigned ref_idx_l0_list[32];
    unsigned ref_idx_l1_list[32];
    unsigned gop_size;
-   unsigned ref_pic_mode;
    unsigned num_temporal_layers;
    struct pipe_enc_quality_modes quality_modes;