diff options
author | He Junyan <junyan.he@intel.com> | 2020-07-02 19:19:35 +0800 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-07-03 15:28:40 +0000 |
commit | abea5e81c8fb314f1df7f2c37993174a343c2bb2 (patch) | |
tree | 5fd989325c0f6904574851b60620aec30636009d /gst-libs | |
parent | 19903e1afcd58ed070235be333b3123d3a826e85 (diff) |
libs: encoder: h265: no need to check the high compression tune.
The h265 encoder just support tune mode:
(0): none - None
(3): low-power - Low power mode
So, no need to check and set the high compression parameters.
And by the way, the current ensure_tuning_high_compression manner
of choosing the hightest profile idc as the best compression profile
is not correct. Unlike h264, in h265 the higher profile idc number
does not mean it has more compression tools, and so it has better
compression performance. It may even be un-compatible with the lower
profile idc. For example, the SCREEN_CONTENT_CODING profile with idc
9 is not compatible with 3D_MAIN profile with idc 8.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/348>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiencoder_h265.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c index e26a67f1..dc311464 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c @@ -1249,44 +1249,6 @@ error_unsupported_level: } } -/* Derives the minimum tier from the active coding tools */ -/* Enable "high-compression" tuning options */ -static gboolean -ensure_tuning_high_compression (GstVaapiEncoderH265 * encoder) -{ - guint8 profile_idc; - - if (!ensure_hw_profile_limits (encoder)) - return FALSE; - - profile_idc = encoder->hw_max_profile_idc; - if (encoder->max_profile_idc && encoder->max_profile_idc < profile_idc) - profile_idc = encoder->max_profile_idc; - - /* Tuning options */ - if (!encoder->num_bframes) - encoder->num_bframes = 3; - - return TRUE; -} - -/* Ensure tuning options */ -static gboolean -ensure_tuning (GstVaapiEncoderH265 * encoder) -{ - gboolean success; - - switch (GST_VAAPI_ENCODER_TUNE (encoder)) { - case GST_VAAPI_ENCODER_TUNE_HIGH_COMPRESSION: - success = ensure_tuning_high_compression (encoder); - break; - default: - success = TRUE; - break; - } - return success; -} - /* Handle new GOP starts */ static void reset_gop_start (GstVaapiEncoderH265 * encoder) @@ -2327,8 +2289,6 @@ ensure_profile_tier_level (GstVaapiEncoderH265 * encoder) const GstVaapiTierH265 tier = encoder->tier; const GstVaapiLevelH265 level = encoder->level; - ensure_tuning (encoder); - if (!ensure_profile (encoder) || !ensure_profile_limits (encoder)) return GST_VAAPI_ENCODER_STATUS_ERROR_UNSUPPORTED_PROFILE; |