You've probably seen Omni's HQx encode for Sonic 3 & Knuckles, then you've probably seen my HQx encodes for some other games.
I'm sharing an easy, AviSynth, way to encode using HQx filters.
First, you have to get the
PointSize plugin for AviSynth. Thanks to sgrunt for finding this plugin.
Then, once you have installed that plugin, you can now use HQ2x, HQ3x and HQ4x in AviSynth! But how?
Here is a sample script using HQ4x.
movie = AVISource("movie.avi").ConvertToRGB32()
resizedmovie = hq4x(movie)
logo = ImageSource(file="logohd.png", start=0, end=119, fps=resizedmovie.FrameRate).ConvertToRGB32()
logoaudio = BlankClip(logo, audio_rate=44100, channels=2)
muxedlogo = AudioDub(logo, logoaudio).Lanczos4Resize(resizedmovie.width, resizedmovie.height).AssumeFPS(movie.FrameRateNumerator, movie.FrameRateDenominator)
final = muxedlogo + resizedmovie
final.ConvertToYV24(chromaresample="point")
final.ConvertToYV12(chromaresample="lanczos4")
return final
It's basically the same script HD encoders generally use, but PointResize is replaced by HQx, since that filter automatically resizes the source dump. And for YV12, lanczos4 is used instead of point. Thanks to Aktan for that suggestion.
But that's not all. You probably want to make the video 6x or 8x bigger than the original source, right?
For that kind of thing, you can combine multiple HQx commands like this.
hq2x(hq4x(movie))
Like this, you make 2x bigger a video that was made 4x bigger. As a result, the video is 8x bigger.
When doing such a thing, for the best result, make sure to put the biggest HQx inside the smallest HQx. For example, to make a video 6x bigger, you should do it like this.
hq2x(hq3x(movie))
And not like this.
hq3x(hq2x(movie))
That's it for the easy, AviSynth way to encode using HQx filters.
I've taken the same frame of a movie twice, one is resized using point resizing while the other is resized using HQx filters.
Point
HQx
Of course, it's possible to get more noticeable results using a less colorful game.
If you want to see HQx in motion,
you can click here.
So, that's pretty much about it.