Ultrawidify and Chrome (2021 edition, episode 2)

Back in January, Chromium browsers had a bit of a fucky-wucky on Windows — though when I say “had,” I actually mean “this issue still happens.” The fucky-wucky in question causes the video to incorrectly stretch instead of cropping away the black bars. Here’s a pic for quick illustration.

The issue first started to appearing mid-January and it started to appear across all extensions that do the “crop away the black bar on ultrawide videos pls” thing. By mid February, most extension had this issue fixed to varying degrees.

The workarounds have not fixed the issue for everyone, though (I have been getting complaints that had this issue smell on them rather recently). Since Chromium devs don’t seem to be in any sort of hurry to actually fix their bugs (and since I need to pad out my blog), I guess that some sort of semi-official statement needs to get posted somewhere. Yes, even though it’s been about 8 months by now.

What Went Wrong

Google fucked up their DirectX11 and DirectX12 hardware acceleration.

Since this explanation may not be very accessible to folks who aren’t technically minded, time for an ELI5-level crash course on computer graphics.

Displaying a video — especially when it’s also high resolution — requires a lot of calculations. However, as it turns out, that’s too much for the processors, which can generally do one about calculation at the time1asterisks apply — with advent of multi-threading, CPUs can do more things at once, but CPUs with thread counts in double digits at a consumer-affordable price are a fairly recent thing. So at some point in time — probably about a decade or so ago, but hard to verify with 5 second google search — someone had a bright idea. “What if we don’t do video calculations on the CPU? What if we instead do them on the graphics card?” GPUs are, after all, a simpler, dumbed down version of a CPU. But they have a lot of said dumbed down cores, which makes them much faster at solving certain problems. Decoding video is one of those problems, so off it goes.

But to do things with the graphics card, your program needs to tell the graphics card what needs to do. It can do that in a few different ways, using a few different so-called APIs. On the “I don’t like Microsoft” side of things you have OpenGL (older) and Vulkan (new), on the “Microsoft <3” side of thing there’s DirectX 9, at this point ancient enough that it can run on everything that doesn’t belong to a garbage bin (and even on some things that do), and then there’s brand new DirectX 112Not actually new — it’s well over a decade old at this point and DirectX 12.

Since each API does things differently and offers different goodies, hardware acceleration using DirectX 9 will also do things different than the hardware acceleration approach that uses DirectX 11. This means that you can have bugs that only happen with DirectX 11 but not with Directx9 (or vice versa).

The neat thing about this is since almost all browsers now copy Google’s homework, you are guaranteed to run into this problem no matter what browser you use. Chrome and Chromium both have this issue. So do Edge and Opera. The only browser with an userbase worth considering that doesn’t have this issue is Firefox. Firefox (and a few other browsers that are too irrelevant to warrant a mention) don’t copy Google’s homework and are therefore not affected.

And How Do I Fix That?

There’s two ways.

I am not Afraid of chrome://flags Edition

  • Open chrome://flags/ (or edge://flags/ if using Edge)
  • Search for Choose ANGLE graphics backend
  • Pick D3D9 or OpenGL.
  • Restart
  • Optionally do the exact opposite of the next section
  • Enjoy

I don’t Want to Mess With My Settings

  • Open extension settings from the popup
  • Scroll down to ‘Browser quirk mitigations‘ section
  • Ensure ‘Limit Zoom’ option is checked (if you followed the previous section, you can untick that option and stop reading)
  • If the option is ticked, try decreasing the Limit zoom to % of width option to 0.99 or 0.98 or even lower. Once you lower the number enough, the cropping should stop stretching the video at the expense of some black on all four sides.
  • If you need to decrease the ‘Limit zoom‘ box below 0.90, try unchecking ‘limit zoom only while in fullscreen’ box instead.

That’s gonna be all.

Related reading

Both links appeared earlier in this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.