4 <title>Reftest that checks whether WebM video with alpha is rendered with the correct stride
</title>
9 box-shadow:
0 0 0 4px magenta, inset
0 0 0 4px magenta;
13 <div style=
"position: relative">
15 The video below was created as follows:
17 1. Run this code on the web console:
19 var c = document.createElement("canvas")
22 var ctx = c.getContext("2d")
23 ctx.fillStyle = "white"
24 ctx.fillRect(0, 0, 334, 334)
26 ctx.fillRect(0, 0, 64, 64)
27 ctx.fillStyle = "blue"
28 ctx.fillRect(64, 0, 64, 64)
29 ctx.fillStyle = "yellow"
30 ctx.fillRect(0, 64, 64, 64)
31 ctx.fillStyle = "lime"
32 ctx.fillRect(64, 64, 64, 64)
33 ctx.fillStyle = "black"
34 ctx.fillRect(196, 0, 16, 334)
37 2. Save the PNG to a file called "frame.png".
38 3. Convert it to a WebM file using:
40 ffmpeg -framerate 25 -f image2 -i frame.png -c:v libvpx -auto-alt-ref 0 -pix_fmt yuva420p output.webm
42 (The "a" in "yuva420p" gives the video an alpha plane.)
44 4. Convert the WebM file to a data url.
46 The video size is 334x334. 334 is not divisible by 4. But 336 is divisible by 4 (and by 16).
48 <video autoplay
src=
"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAFFxFNm3RAO027i1OrhBVJqWZTrIHlTbuMU6uEFlSua1OsggEjTbuMU6uEElTDZ1OsggFwTbuMU6uEHFO7a1OsggT67AEAAAAAAACbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAADIq17GDD0JATYCNTGF2ZjU4LjEyLjEwMFdBjUxhdmY1OC4xMi4xMDBEiYhARAAA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OHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsnOHsigP7/uoMAHFO7awEAAAAAAAARu4+zgQC3iveBAfGCAjvwgQM="></video>
49 <div class=
"edgeCover" style=
"left: 0; top: 0; width: 64px; height: 64px;"></div>
50 <div class=
"edgeCover" style=
"left: 64px; top: 0; width: 64px; height: 64px;"></div>
51 <div class=
"edgeCover" style=
"left: 0; top: 64px; width: 64px; height: 64px;"></div>
52 <div class=
"edgeCover" style=
"left: 64px; top: 64px; width: 64px; height: 64px;"></div>
53 <div class=
"edgeCover" style=
"left: 196px; top: 0; width: 16px; height: 334px;"></div>