feat(step-down): the bitrate floor is the tier's YouTube minimum
Step-down used a flat 3 Mbps (4 for vertical) as its floor — a number that had nothing to do with the tier being streamed. With CBR holding the target, that floor is a real picture-quality floor, so it has to follow YouTube's published H.264 table (support.google.com/youtube/answer/2853702): 6 at 1080p60, 5 at 1080p30, 3 at 720p. Models/RateLadder is that table as pure policy. Vertical is not a separate row: 1080x1920 and 1920x1080 are the same pixel count, so the frame rate alone picks the band. StepDownPolicy takes the floor as an optional constructor argument and refuses one above the starting rate, so an unusual start cannot begin under its own floor. Omitted, the historical 3/4 floor still applies, which keeps the existing policy tests meaningful and lets a caller opt in. One consequence worth knowing: the three-step budget can stop above the floor (12 → 9.6 → 7.7 → 6.2 from a 20% loss), so the floor is a limit, not a target. 669 pass, 0 warnings.
This commit is contained in:
@@ -26,7 +26,8 @@ public partial class MainViewModel
|
||||
var quality = OutputProfile.Resolve(SelectedQuality, QualityOptions, HasProOutput);
|
||||
_encoderTierOverride = null;
|
||||
_stepDownPlanner = new StepDownPlanner(
|
||||
new StepDownPolicy(quality.Width, quality.Height, quality.Fps, quality.Bitrate),
|
||||
new StepDownPolicy(quality.Width, quality.Height, quality.Fps, quality.Bitrate,
|
||||
floorBitrateMbps: RateLadder.For(quality).Minimum),
|
||||
_sessionStartedAtUtc ?? DateTime.UtcNow);
|
||||
_framePump.StatsReported += OnPumpStatsReported;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user