A method to get 60% faster SD 2X upscale with v3.2.x on Apple M1/M2

I’m fed up with the inefficiency of SD upscaling on my Mac Studio and tired of waiting for any improvement from Topaz in that regard. Now, after creating some shell scripts, I’ve achieved around 60% speed increase from ~16.5 fps to ~26.5 fps. I have the lowest spec Mac Studio M1 Max.

In real-time, I can now deinterlace (using ffmpeg), 2X upscale (using Artemis) PAL DVD MKVs (720x576 25fps) and view the output MKV using VLC (after ~30s of pre-processing).

The essential ingredient for this increased efficiency is “stacking”. I experimented with various configurations of rectangular “mosaics” and found the most efficient was a single row of 8 (i.e. 5760x576). By stacking the SD video segments, the resulting higher resolution is upscaled much more efficiently by the Apple Silicon GPU cores. Of course, the scripts do other things such as the segmenting, cropping and concatenation. Also, I needed to compensate for the inferior quality of the first upscaled frame of each segment (because TVAI doesn’t have any previous frames to compare). I do this by prepending a frame from the end of the previous segment and removing the added (now upscaled) frame afterwards.

There are only about 160 lines of shell script (Zsh) across 8 files (excluding comments and spacers). I’m happy to make the scripts available if anyone is interested.

Finally, I think that Topaz should be at least a little embarrassed that I’ve achieved such a speed increase. I’m just a hobbyist in terms of ffmpeg and scripting, certainly no expert. Imagine what the devs at Topaz could achieve at source code level…

Thanks.

Andy

1 Like

Congrats Andy

I have noticed that my rendering were slower since I bought their last version 3, I was happy with the 2.
Working with a 64gb M1 max
Topaz should hire you

Hey Andy
Do you mind sharing the script?
I have m1 pro 16gb and i feel my rtx 2060 does a faster rendering than my £1800 macbook pro.

Whole reason i hot a macbook is for less power consumption and similar rendering speeds, but it seems a i5 9600k and rtx 2060 is double faster at rendering which is a shame.

Any advice how to speed up rendering would be much appreciated :+1: thank.

Hi

In case of any use to you or anyone else, here’s a link to the scripts:

Thanks.

Andy

1 Like

Thanks mate really appreciate it, i haven’t looked at it yet but any tips you can provide how to use it? Is it simply double clicking the script? Im confused.

I will check it out later when i get home, also is this for version 3.2 only?

ok just checked this and seems its a bit difficult for me, im mainly a windows user so mac is new to me.
good luck everyone and thanks Andy for sharing im sure it will be some use to somebody.

also im guessing its only for deinterlacing only? i cant use 2x upscale on progressive video?