Commit 99355f5f authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/vaapi/VP9Encoder: Fix the assignment of ts_rate_decimator

Bug: 1030199
Test: vp9_encoder_unittest
Change-Id: Id6cc6779c6632d778e8ef664c66a440252358520
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359973
Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799101}
parent 2a44034a
......@@ -147,7 +147,7 @@ libvpx::VP9RateControlRtcConfig CreateRateControlConfig(
rc_cfg.min_quantizers[ti] = rc_cfg.min_quantizer;
rc_cfg.layer_target_bitrate[ti] = base::checked_cast<int>(
bitrate_allocation.GetBitrateBps(0, ti) / 1000.0);
rc_cfg.ts_rate_decimator[ti] = 1u << ti;
rc_cfg.ts_rate_decimator[ti] = 1u << (num_temporal_layers - ti - 1);
}
return rc_cfg;
}
......
......@@ -152,7 +152,7 @@ MATCHER_P4(MatchRtcConfigWithRates,
static_cast<int>(bitrate_allocation.GetBitrateBps(0, i) / 1000.0)) {
return false;
}
if (arg.ts_rate_decimator[i] != (1 << i))
if (arg.ts_rate_decimator[i] != (1 << (num_temporal_layers - i - 1)))
return false;
}
......
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