libs: encoder: set entrypoint based on tune automatically
authorHe Junyan <junyan.he@hotmail.com>
Mon, 16 Dec 2019 15:19:46 +0000 (23:19 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Sun, 29 Dec 2019 16:58:36 +0000 (17:58 +0100)
commit3398c64036dea3781bba843abee998acc80a6c32
tree86980d97d3ee56ade517e1c615040cf9b2af701d
parentb50f06309afc11da783b977589ab4a708ac87822
libs: encoder: set entrypoint based on tune automatically

Some profile, such as H265_MAIN_444 on new Intel platform, may only
support ENTRYPOINT_SLICE_ENCODE_LP entrypoint. This leads two
problems:

1. We need to specify the tune mode like `vaapih265enc tune=low-power`
   every time when we need to use this kind of profile. Or we can not
   create the encoder context successfully.

2. More seriously, we set the entrypoint to a fixed value in
   init_context_info() and so the create_test_context_config() can not
   create the test context for these profile and can not get the
   supported video formats, either.

We now change the entrypoint setting based on the tune option of the
encoder. If no tune property provided, we just choose the first
available entrypoint.
gst-libs/gst/vaapi/gstvaapiencoder.c
gst-libs/gst/vaapi/gstvaapiencoder.h
gst-libs/gst/vaapi/gstvaapiencoder_h264.c
gst-libs/gst/vaapi/gstvaapiencoder_h265.c
gst-libs/gst/vaapi/gstvaapiencoder_vp9.c