Lanczos vs Bicubic

Lanczos and Bicubic are both rescaling algorithms. They can both upscale or downscale stream images. For example, you can play a game at 1440p and stream it at 1080p. Conversely, you could upscale a 720p game to 1080p while streaming. While images rescaled by either Lanczos or Bicubic look virtually identical at a cursory glance, there are differences in image sharpness and computing cost.
By Kelvin Wamalwa Written by Kelvin Wamalwa
Updated on September 4, 2022

There are numerous reasons to rescale your stream. If you’re using the same PC for both gaming and streaming, downscaling might be necessary in order to reduce the strain on system resources. If you’re playing an older game with a lower resolution (N64 games have a resolution of 480p, for example) then you might upscale your output to a higher resolution. In OBS, Lanczos and Bicubic are two of the most popular rescaling filters.

Lanczos and Bicubic are both rescaling algorithms. They can both upscale or downscale stream images. For example, you can play a game at 1440p and stream it at 1080p. Conversely, you could upscale a 720p game to 1080p while streaming. While images rescaled by either Lanczos or Bicubic look virtually identical at a cursory glance, there are differences in image sharpness and computing cost.

Lanczos vs Bicubic: Functionality

Scaling algorithms work by either “compressing” or “stretching” pixels in an image. But first, we have to define pixels. A pixel is a square dot of color. The size of individual pixels varies from screen to screen.

One pixel can only store one color, either red, yellow, or blue. These three are the primary colors, and mixing them produces all the millions of colors that exist in the world. Pixels are what form images on a screen. The number of pixels a screen has determines its resolution.

An HD display, for example, has a resolution of 1080p or more specifically 1920 by 1080 pixels. That means the HD display has 1920 horizontal pixels and 1080 vertical pixels adding up to 2.07 million pixels. 4K screens have four times as many pixels, around eight million.

Screens can have higher or lower resolutions. The larger the number of pixels, the higher the resolution and thus the sharper the image. When you downscale say from 1920 by 1080p to 1280 by 720p, the image is “compressed.” The scaling algorithms (Lanczos and Bicubic) take neighboring pixels and merge them to form the smaller resulting image with fewer pixels.

Some kind of “stretching” happens when you’re upscaling which enlarges the image. You may have noticed that images get blurry if you zoom in too much. This is because the pixels are “stretched,” exposing the gaps between them. Scaling algorithms prevent this blurriness by adding pixels to the image. 

You’ve probably seen the “zoom enhance” sequel in crime shows. The algorithms aren’t actually enhancing the image. They’re adding new pixels by scanning neighboring ones. Basically, it’s making very educated guesses. So, you can’t enhance what isn’t actually in the image. Your algorithm can only make guesses based on what is already there. If a number plate is already blurry, no amount of enhancement will sharpen it. The AI will just guess a random plate or the one it was trained on.

How Bicubic and Lanczos rescale images

Bicubic

Bicubic “enhances” or “compresses” images by scanning four neighboring pixels to determine which color the merged or added pixels should be. 

Lanczos

While Bicubic scans four neighboring pixels before interpolating, Lanczos scans 16, providing a better guess. This is the reason Lanczos images are sharper than Bicubic ones.

Lanczos vs Bicubic: CPU Usage

Lanczos

Lanczos takes up a bigger chunk of CPU resources than Bicubic. This is because before merging or adding a single pixel, it scans the 16 surrounding pixels. This is intensive work even for computers considering that a single image is made up of millions of pixels and a video stream has at least 24 images per second.

Bicubic

Bicubic uses fewer CPU resources because it scans only four neighboring pixels before rescaling an image, unlike Lanczos which scans 16.

Lanczos vs Bicubic: Speed

Lanczos

Because Lanczos does more work, it stands to reason that it would run slower. However, if your PC is powerful enough, you won’t notice this. It’s only an issue in lower-end or overloaded PCs.

Bicubic

Bicubic rescales faster than Lanczos because it processes less data but the difference in speed comes down to the processing power of the PC in question rather than the algorithms themselves. 

Lanczos vs Bicubic: Cost

Lanczos and Bicubic both come with OBS so you don’t pay for them. Their only cost is the computational one. If you’re gaming and streaming on a lower-end machine then Bicubic is a better option because of its smaller processing load. If computational resources are not an issue, use Lanczos. It’s the superior rescaling algorithm even if it places a heavier load on your processor.

Verdict: Which is better, Lanczos or Bicubic?

Lanczos is the superior rescaling algorithm. It produces sharper images than Bicubic simply because it works with more data. You can make better predictions from 16 data points than you could from four. 

Lanczos does oversharpen certain objects, say the tip of a sword but this is only visible when you zoom in close enough. 

You should keep in mind that Lanczos is more CPU-intensive so if your PC isn’t powerful enough to play your game and run Lanczos at the same time, use Bicubic. Bicubic is good enough that a cursory viewer won’t notice any difference between an image rescaled by either of the two algorithms.