logo Sign In

Star Wars GOUT in HD using super resolution algorithm (* unfinished project *) — Page 41

Author
Time
 (Edited)

No I'm not using multi-threading. Never really looked into that. 

Ps. You wrote post 1000! Congrats! ;-)

Author
Time
 (Edited)

I would suggest to at least try and see if it can reduce your rendering times.

There is one "unofficial" modified AviSynth 2.6 build that supports multi-threading and is still being developed. You can also find a short example on when to use which MTMode()-setting. The thread on doom9 gives more insight:

http://forum.doom9.org/showthread.php?t=148782

If you need to use 2.5.8 because of plugins not supporting 2.6, there is also an older version with multi-threading support here.

Maybe it is worth a look.

JEDIT: Thanks, haha ;) Looks like we have gone a far way in this thread.

Found a mirror for the 2.5.8:

https://sites.google.com/site/pavelsx2/ at the bottom ("avisynth258MT")

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

Getting some of the plugins to work was a real pain, but I suppose I could give it a try. Plenty of time... ;-)

Author
Time
 (Edited)

Infognition also recommends multi-threading: http://www.infognition.com/tutorials/rip_guides/avisynth.html

Just a quick writeup of your v10 with multi-threading, only three lines added hopefully make the deal. I have not tested it.

SetMTMode(3) #Multi-Threading mode 3 for source filters

orig=AviSource("Star Wars.avi")

SetMTMode(2,0) #Multi-Threading mode 2 with processor's available threads for processing filters

orig=ConvertToRGB24(orig)

edi0=nnedi2_rpow2(orig,rfactor=2, cshift="spline64resize") # edge directed interpolation

edi=edi0

sr1=SR(orig,1424,548) # super resolution in RGB space

sr1=ConvertToYUY2(sr1)

yuy2=ConvertToYUY2(orig)

sr2=SR(yuy2,1424,548) # super resolution in YUY2 space

rev=Reverse(orig)

sr1r=SR(rev,1424,548) # super resolution in reverse direction in RGB space

sr1r=Reverse(sr1r)

sr1r=ConvertToYUY2(sr1r)

yuy2rev=ConvertToYUY2(rev)

sr2r=SR(yuy2rev,1424,548) # super resolution in reverse direction in YUY2 space

sr2r=Reverse(sr2r)

s64=Spline64Resize(orig,1424,548) 

s64=ConvertToYUY2(s64)

edi=ConvertToYUY2(edi0)

Average(sr1,0.5,sr2,0.5,sr1r,0.5,sr2r,0.5,s64,-2,edi,1) # combine SR in both directions for additional detail, and combine details from SR with nnedi2 to reduce aliasing 

ConvertToRGB24()

sr=last

edicd=ConvertToYUY2(edi0)

edicd=ConvertToRGB24(edicd)

Average(sr,1,edi0,1,edicd,-1) # correct colors

nnedi2_rpow2(rfactor=2, cshift="spline64resize") 

Spline64Resize(1920,816)

There is one addition when using filters that already have multi-threading (I think there are not many):

When using MT mode with filters that have ability to spawn several internal processing threads - be sure to set such filters to use only 1 thread. Otherwise for example with 8-thread system MT mode will spawn 8 threads with once instance of such filter per thread (in MT mode 2), each filter instance will spawn 8 threads. End result: 64 threads (ouch).

One should use MTMode 3 or 5 before that filter then.

JEDIT: Removed bad use of SetMemoryMax, thanks RU.08

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

Great thread. Very informative.

I tried v10 on Star Wars SE97. The changes are much more subtle. Probably because the source was already in good condition. I tried it with the Demo Version of SR, so there are diagonal lines. However, you can still see that the algorithm results in a sharper image. 

http://screenshotcomparison.com/comparison/137626

http://screenshotcomparison.com/comparison/137628

http://screenshotcomparison.com/comparison/137630

Author
Time

Thanks for the script! I will try to get it working. Hopefully things will speed up a bit.

Those screenshots of the SE97 look very nice. Laserdisc Master actually has a thread about upscaling the SE97, but he hasn't updated it for a while. 

In the mean time, I think SRV13 is getting somewhere. I will post some screenshots later today, and hopefully also have a video sample by next week. 

Author
Time

I have another question regarding your script: Is there a specific reason you use NNEDI2 instead of NNEDI3?

nnedi3 is nnedi2 with improved predictor neural network architecture and local neighborhood pre-processing.

It COULD give better results but is slower. These are screenshots from an interlaced source, I don't know how well it will work on the GOUT:

NNEDI2 vs. NNEDI3 (no source unfortunately)

To counter the slower speed, we could utilize the video card's GPU power for processing NNEDI3 in this OpenCL rewrite: http://forum.doom9.org/showthread.php?t=169766

Depends on your video card of course. May I ask which specifications your GPU/CPU has?

That build also seems to support more colorspaces (when using the nnedi3x script with Avisynth 2.6 mentioned in the wiki) if I'm not wrong. Perhaps that could reduce one or two conversions, I have yet to understand all of your script.

I will have to acquire the NTSC GOUT (I only have PAL) and try this out, but I wanted to share the information so you can take a look at it already.

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

It was You_Too who advised me to use NNEDI2, because his tests showed it gives better results than NNEDI3. 

I use a laptop with a Intel Core i5-4210U. I don't know what GPU I have. 

Author
Time

Ah, I see. I'm still curious about the difference. NNEDI3 is recommended on the AviSynth wiki. Sure this can be an exception though.

Multi-threading should give you a speed boost. I'm not sure about the OpenCL, because if you don't have a dedicated video chip and only the integrated GPU from Intel, it might be useless.

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

DrDre said:

If there is consensus that SRV13 is an improvement over SRV12, I will probably do another pass. Here's a few more comparisons for SRV13:

http://screenshotcomparison.com/comparison/137550

http://screenshotcomparison.com/comparison/137551

http://screenshotcomparison.com/comparison/137552

http://screenshotcomparison.com/comparison/137553

http://screenshotcomparison.com/comparison/137554

 Hey, that actually looks good! A marked improvement over the source material!

Ol’ George has the GOUT, I see.

Author
Time

archimedes said:

I tried v10 on Star Wars SE97.

 

SR does next to nothing on this source.

However, the colors look very nice on the caps, but it may be just an illusion. Is there general consensus on how it compares to Harmy's colors? Better/worse/just different?

Author
Time
 (Edited)

DrDre said:

It was You_Too who advised me to use NNEDI2, because his tests showed it gives better results than NNEDI3. 

I use a laptop with a Intel Core i5-4210U. I don't know what GPU I have. 

 http://www.techpowerup.com/gpuz/

You can run that and learn all you never wanted to know about your GPU. It's also useful for monitoring the GPU performance while encoding (or making sure that it *is* being used, and to what extent, when, etc.)

zee944 said:

archimedes said:

I tried v10 on Star Wars SE97.

 

SR does next to nothing on this source.

However, the colors look very nice on the caps, but it may be just an illusion. Is there general consensus on how it compares to Harmy's colors? Better/worse/just different?

 It seemed to do something for LDM's test encodes. But he was somehow using multiple SE97 captures, IIRC.

I think the 97SE colors look quite a bit different from Harmy's colors (especially post-1.0). I don't think there's any consensus for better/worse on anything SW color related. Ever. 

Author
Time

Wow, quite impressive. Although, there is detail that is wiped away. Not substantial, but noticeable. The same 10 minute video sample you usually do would provide the best constructive criticism.

In my opinion, I would be happier with SRV12 given these screenshots. Grain hardly bothers me. I might be swayed with the sample video.

But, lets see what the general consensus is. I suspect this will be a topic of great debate. :P

Author
Time

I would have to go with you. I don't like that the detail DrDre could scrub out of this now gets blurred again. Maybe more conservative settings could convince me.

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

I agree that in the stills V12 looks better than V13.  Video might be a different story.  It's possible the grain of V12 is static from frame to frame and doesn't really add to the detail, but it looks like it does in one single frame.

What would be cool is a 3-5 second back to back clip of V12 and V13 that could be looped. 

Author
Time

This top layer grain permeates all 3 films. Seems to be inherent from the LaserDisc itself, as this same grain field is present when watching any LaserDisc on a modern TV. Albeit, not nearly as obvious due to the lower resolution compared to Dvd.

I think a short, looped clip is an excellent idea thorr.

Author
Time

Is there anyone in here who could please provide me with one or two seconds of lossless NTSC GOUT footage around the 4512 frame mark (C-3PO)? Lagarith codec or uncompressed will do just fine. I wanted to test something (including NNEDI3, multi-threading and OpenCL), but with my PAL GOUT the results are not really worth comparing.

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

A video sample for SRV13 is being processed. Should be finished by the beginning of next week. We can then do a proper comparison. The slow moving grain is much more apparent on my HD-TV than on my laptop. Also the static nature of the grain can't really be seen in a single screenshot. 

Author
Time

Intruder said:

Infognition also recommends multi-threading: http://www.infognition.com/tutorials/rip_guides/avisynth.html

Just a quick writeup of your v10 with multi-threading, only three lines added hopefully make the deal. I have not tested it.

SetMemoryMax(2048) #I have enough memory

That's an incorrect use of SetMemoryMax and will cause problems. SetMemoryMax only controls the caching amount for each clip within the script, as Avisynth is 32bit it can't index beyond the 2GB limit imposed on 32bit applications (and that includes all 32 bit processes). Each time a new clip is created in the script more caching memory is allocated, your instruction could result in Avisynth trying to index around 22GB of RAM in total in DrDre's script.

[ Scanning stuff since 2015 ]

Author
Time

Okay, thanks for the notice. Would you recommend leaving SetMemoryMax out and let AviSynth control it?

Darth Id on ‘Why “Ben”?’:

And while we’re at it, we need to figure out why they kept calling Mark Hamill’s character “Luke Skywalker,” since it’s my subjective opinion that his name is actually Schnarzle Shnuzzle.  It just doesn’t make sense!

Damn you George Lucas for never explaining why they all keep calling Schnarzle “Luke”!

Damn You!!!

Author
Time

DrDre said:

A video sample for SRV13 is being processed. Should be finished by the beginning of next week. We can then do a proper comparison. The slow moving grain is much more apparent on my HD-TV than on my laptop. Also the static nature of the grain can't really be seen in a single screenshot. 

 Is this the same static grain that is so clearly seen on Teamblu's most recent effort? I assumed it was something they had added rather than something they brought out from the GOUT.

I found it quite distracting, it almost seemed like looking at the image through a lace material or something. I would rather watch their V3 release due to it.

Author
Time

dave88 said:

DrDre said:

A video sample for SRV13 is being processed. Should be finished by the beginning of next week. We can then do a proper comparison. The slow moving grain is much more apparent on my HD-TV than on my laptop. Also the static nature of the grain can't really be seen in a single screenshot. 

 Is this the same static grain that is so clearly seen on Teamblu's most recent effort? I assumed it was something they had added rather than something they brought out from the GOUT.

I found it quite distracting, it almost seemed like looking at the image through a lace material or something. I would rather watch their V3 release due to it.

 Technically, yes. When the Gout DVD was mastered, it of course, received all the defects of an analog source, IE, this top layer "grain". Since the mastering was so lazily done, this top layer "grain" is extremely noticeable because of the higher resolution of DVD compared to LaserDisc.

Super Resolution makes it even more apparent. :/

Author
Time

hmmm, bummer :( The GOUT is truly diseased in many ways.

Thanks for clarifying that Zyrother. I appreciate that this isn't actually film grain (which would not bother me) but some kind of digital "grain" from the poor processing / upscaling.

I still look forward to seeing what kind of results can be achieved with the amazing work DrDre is doing here.

Author
Time

Zyrother said:

dave88 said:

DrDre said:

A video sample for SRV13 is being processed. Should be finished by the beginning of next week. We can then do a proper comparison. The slow moving grain is much more apparent on my HD-TV than on my laptop. Also the static nature of the grain can't really be seen in a single screenshot. 

 Is this the same static grain that is so clearly seen on Teamblu's most recent effort? I assumed it was something they had added rather than something they brought out from the GOUT.

I found it quite distracting, it almost seemed like looking at the image through a lace material or something. I would rather watch their V3 release due to it.

 Technically, yes. When the Gout DVD was mastered, it of course, received all the defects of an analog source, IE, this top layer "grain". Since the mastering was so lazily done, this top layer "grain" is extremely noticeable because of the higher resolution of DVD compared to LaserDisc.

Super Resolution makes it even more apparent. :/

 Is there any feasible way to get rid of it?

Ol’ George has the GOUT, I see.