Commit abea5e81 authored by He Junyan's avatar He Junyan Committed by Víctor Manuel Jáquez Leal

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: <!348>
parent 19903e1a
Pipeline #171791 waiting for manual action with stages
in 4 minutes and 22 seconds
......@@ -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)) {
success = ensure_tuning_high_compression (encoder);
success = TRUE;
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))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment