VP9 SVC minimum bit rate thresholds too low for 720p
Changed minimum bit rate threshold formula to raise the minimum bit rate at which 720p video is presented in VP9 SVC to ensure that the video quality for VP9 SVC is the same or better than VP8 SIM. The minimum bit rate threshold values for lower resolutions remain largely unchanged. Also changed maximum bit rate threshold formula to lower the maximum bit rate for low resolutions (e.g., 180p) in order to ensure higher frame rates when downlink bit rates are very low (e.g., < 100 kbps). Bug: webrtc:9242 Change-Id: I8f9c76c9188b98f3fd40a608551b576b0c3b8f34 Reviewed-on: https://webrtc-review.googlesource.com/75244 Commit-Queue: Michael Horowitz <mhoro@webrtc.org> Reviewed-by: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23218}
This commit is contained in:
@ -18,6 +18,10 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
namespace {
|
||||
const int kMinVp9SvcBitrateKbps = 30; // Lowest VP9 video rate in kbps.
|
||||
} // namespace
|
||||
|
||||
std::vector<SpatialLayer> GetSvcConfig(size_t input_width,
|
||||
size_t input_height,
|
||||
size_t num_spatial_layers,
|
||||
@ -45,16 +49,19 @@ std::vector<SpatialLayer> GetSvcConfig(size_t input_width,
|
||||
spatial_layer.height = input_height >> (num_spatial_layers - sl_idx - 1);
|
||||
spatial_layer.numberOfTemporalLayers = num_temporal_layers;
|
||||
|
||||
// minBitrate and maxBitrate formulas were derived to fit VP9
|
||||
// subjective-quality data for bit rate below which video quality is
|
||||
// unacceptable and above which additional bits do not provide benefit.
|
||||
// minBitrate and maxBitrate formulas were derived from
|
||||
// subjective-quality data to determing bit rates below which video
|
||||
// quality is unacceptable and above which additional bits do not provide
|
||||
// benefit. The formulas express rate in units of kbps.
|
||||
|
||||
// TODO(ssilkin): Add to the comment PSNR/SSIM we get at encoding certain
|
||||
// video to min/max bitrate specified by those formulas.
|
||||
const size_t num_pixels = spatial_layer.width * spatial_layer.height;
|
||||
spatial_layer.minBitrate =
|
||||
static_cast<int>(360 * std::sqrt(num_pixels) / 1000);
|
||||
const int min_bitrate =
|
||||
static_cast<int>((600. * std::sqrt(num_pixels) - 95000.) / 1000.);
|
||||
spatial_layer.minBitrate = std::max(min_bitrate, kMinVp9SvcBitrateKbps);
|
||||
spatial_layer.maxBitrate =
|
||||
static_cast<int>((1.5 * num_pixels + 75 * 1000) / 1000);
|
||||
static_cast<int>((1.6 * num_pixels + 50 * 1000) / 1000);
|
||||
spatial_layer.targetBitrate =
|
||||
(spatial_layer.maxBitrate + spatial_layer.minBitrate) / 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user