Mesa (main): frontends/va/enc: default motion estimation parameters for performance

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 5 16:16:51 UTC 2022


Module: Mesa
Branch: main
Commit: 9caf110d4f31cdb5e962b3d8c144251983e3a577
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9caf110d4f31cdb5e962b3d8c144251983e3a577

Author: Thong Thai <thong.thai at amd.com>
Date:   Wed Dec 29 11:37:45 2021 -0500

frontends/va/enc: default motion estimation parameters for performance

Sets the default motion estimation parameters for the H.264 encoder to
values that increase encoding performance - realistically, this only
benefits the VCE encoder, as the parameters are used no where else.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3540
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2702
Signed-off-by: Thong Thai <thong.thai at amd.com>
Reviewed-by: Leo Liu <leo.liu at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14339>

---

 src/gallium/frontends/va/picture_h264_enc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/frontends/va/picture_h264_enc.c b/src/gallium/frontends/va/picture_h264_enc.c
index 07170a4721f..3f9b3b199b7 100644
--- a/src/gallium/frontends/va/picture_h264_enc.c
+++ b/src/gallium/frontends/va/picture_h264_enc.c
@@ -211,13 +211,13 @@ vlVaHandleVAEncMiscParameterTypeTemporalLayerH264(vlVaContext *context, VAEncMis
 void getEncParamPresetH264(vlVaContext *context)
 {
    //motion estimation preset
-   context->desc.h264enc.motion_est.motion_est_quarter_pixel = 0x00000001;
-   context->desc.h264enc.motion_est.lsmvert = 0x00000002;
-   context->desc.h264enc.motion_est.enc_disable_sub_mode = 0x00000078;
-   context->desc.h264enc.motion_est.enc_en_ime_overw_dis_subm = 0x00000001;
-   context->desc.h264enc.motion_est.enc_ime_overw_dis_subm_no = 0x00000001;
-   context->desc.h264enc.motion_est.enc_ime2_search_range_x = 0x00000004;
-   context->desc.h264enc.motion_est.enc_ime2_search_range_y = 0x00000004;
+   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_cabac_enable = 0x00000001;



More information about the mesa-commit mailing list