Commit 3a3a9efad7 for aom
commit 3a3a9efad7b9286c13320c465409bf73cc2c8808
Author: Narayan Kalaburgi <narayan.kalaburgi@ittiam.com>
Date: Wed Mar 4 17:34:26 2026 +0530
lc-dec: Enable low-complexity decode mode for hdres
This patch enables low-complexity decode mode for HD resolution
by extending the speed features of shorts.
Performance results of encoder and decoder for the streams
generated with low complexity decode enabled.
Decode Time BD-Rate Loss(%)
cpu Reduction(%) avg.psnr ssim vmaf vmaf_neg uvq_1p5
1 19.057 1.3779 1.2776 1.3951 1.4730 1.6249
2 17.989 1.2968 1.1682 1.4135 1.4562 1.1208
3 16.925 1.2230 1.1199 1.3259 1.3151 1.7119
STATS_CHANGED for low complexity decode, hdres
Change-Id: Id755972989f1b62ff136590da6e2e2fa7dbb0086
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index e4e77c9d83..1cb36cbfb6 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -1373,7 +1373,7 @@ static void set_encoder_config(AV1EncoderConfig *oxcf,
// 608p and 720p. This can be further modified if needed.
const int is_low_complexity_decode_mode_supported =
(cfg->g_usage == AOM_USAGE_GOOD_QUALITY) &&
- (oxcf->speed >= 1 && oxcf->speed <= 3) && (cfg->g_w < cfg->g_h) &&
+ (oxcf->speed >= 1 && oxcf->speed <= 3) &&
(AOMMIN(cfg->g_w, cfg->g_h) >= 608 && AOMMIN(cfg->g_w, cfg->g_h) <= 1080);
oxcf->enable_low_complexity_decode =
extra_cfg->enable_low_complexity_decode &&
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 7971136335..14b331753d 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -636,9 +636,10 @@ static void set_good_speed_features_lc_dec_framesize_dependent(
if (speed < 1 || speed > 3) return;
const AV1_COMMON *const cm = &cpi->common;
- const bool is_720p_or_larger = AOMMIN(cm->width, cm->height) >= 720;
const bool is_between_608p_and_1080p = AOMMIN(cm->width, cm->height) >= 608 &&
AOMMIN(cm->width, cm->height) <= 1080;
+ const bool is_between_720p_and_1080p = AOMMIN(cm->width, cm->height) >= 720 &&
+ AOMMIN(cm->width, cm->height) <= 1080;
const bool is_vertical_video = cm->width < cm->height;
const FRAME_UPDATE_TYPE update_type =
@@ -669,20 +670,13 @@ static void set_good_speed_features_lc_dec_framesize_dependent(
}
// Speed features for regular videos
- if (!is_vertical_video && is_720p_or_larger) {
+ if (!is_vertical_video && is_between_720p_and_1080p) {
sf->gm_sf.gm_erroradv_tr_level = 1;
sf->hl_sf.ref_frame_mvs_lvl = 1;
- sf->lpf_sf.dual_sgr_penalty_level = boosted ? 1 : 2;
- sf->lpf_sf.switchable_lr_with_bias_level = 1;
- sf->lpf_sf.skip_loop_filter_using_filt_error =
- (update_type != OVERLAY_UPDATE && update_type != INTNL_OVERLAY_UPDATE &&
- cpi->common.current_frame.pyramid_level > 1)
- ? 1
- : 0;
-
sf->inter_sf.bias_warp_mode_rd_scale_pct = 4;
+ sf->inter_sf.bias_obmc_mode_rd_scale_pct = 1.5f;
sf->part_sf.split_partition_penalty_level = is_key_frame ? 0 : 2;
@@ -2788,29 +2782,13 @@ static void set_good_speed_features_lc_dec_qindex_dependent(
const AV1_COMMON *const cm = &cpi->common;
const bool is_between_608p_and_1080p = AOMMIN(cm->width, cm->height) >= 608 &&
AOMMIN(cm->width, cm->height) <= 1080;
- const bool is_720p_or_larger = AOMMIN(cm->width, cm->height) >= 720;
const bool is_vertical_video = cm->width < cm->height;
- const FRAME_UPDATE_TYPE update_type =
- get_frame_update_type(&cpi->ppi->gf_group, cpi->gf_frame_index);
- const bool leaf_and_overlay_frames =
- (update_type == LF_UPDATE || update_type == OVERLAY_UPDATE ||
- update_type == INTNL_OVERLAY_UPDATE);
// Speed features for vertical videos
if (is_vertical_video && is_between_608p_and_1080p) {
sf->lpf_sf.min_lr_unit_size = RESTORATION_UNITSIZE_MAX >> 1;
sf->lpf_sf.max_lr_unit_size = RESTORATION_UNITSIZE_MAX >> 1;
}
-
- // Speed features for regular videos
- if (!is_vertical_video && is_720p_or_larger) {
- if (speed <= 2 && leaf_and_overlay_frames) {
- // For 720p and above, only enable this feature for leaf and overlay
- // frames to avoid quality degradation on ARF frames.
- sf->lpf_sf.min_lr_unit_size = RESTORATION_UNITSIZE_MAX >> 1;
- sf->lpf_sf.max_lr_unit_size = RESTORATION_UNITSIZE_MAX >> 1;
- }
- }
}
// Override some speed features based on qindex