зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1728088 [wpt PR 30226] - Increase bandwidth of fake video signal used for testing., a=testonly
Automatic update from web-platform-tests Increase bandwidth of fake video signal used for testing. (#30226) This will increase the size of an encoded 640x480 video from approximately 8 Kbits/second to approximately 64 Kbits/second, which means that limiting the bandwidth will actually have an effect. This is done in preparation for further tests that limit the bandwidth and expect an observable result. Bug: None Change-Id: Ib3c63c4ae8c41fe7c608f1c06c8c61c2beecbe11 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3128063 Reviewed-by: Florent Castelli <orphis@chromium.org> Commit-Queue: Harald Alvestrand <hta@chromium.org> Cr-Commit-Position: refs/heads/main@{#916377} Co-authored-by: Harald Alvestrand <hta@chromium.org> -- wpt-commits: ed9b278329b48455b62195b32be8aa0f40812de5 wpt-pr: 30226
This commit is contained in:
Родитель
5f9ff92e11
Коммит
339a8756b3
|
@ -407,6 +407,15 @@ const trackFactories = {
|
|||
ctx.fillStyle = `rgb(${count%255}, ${count*count%255}, ${count%255})`;
|
||||
count += 1;
|
||||
ctx.fillRect(0, 0, width, height);
|
||||
// Add some bouncing boxes in contrast color to add a little more noise.
|
||||
const contrast = count + 128;
|
||||
ctx.fillStyle = `rgb(${contrast%255}, ${contrast*contrast%255}, ${contrast%255})`;
|
||||
const xpos = count % (width - 20);
|
||||
const ypos = count % (height - 20);
|
||||
ctx.fillRect(xpos, ypos, xpos + 20, ypos + 20);
|
||||
const xpos2 = (count + width / 2) % (width - 20);
|
||||
const ypos2 = (count + height / 2) % (height - 20);
|
||||
ctx.fillRect(xpos2, ypos2, xpos2 + 20, ypos2 + 20);
|
||||
// If signal is set (0-255), add a constant-color box of that luminance to
|
||||
// the video frame at coordinates 20 to 60 in both X and Y direction.
|
||||
// (big enough to avoid color bleed from surrounding video in some codecs,
|
||||
|
|
Загрузка…
Ссылка в новой задаче