PDA

View Full Version : SmoothHiQ.dll and Avisynth 2.55


denissio
23rd July 2004, 16:48
Hi!
The question is (quite a beginner's one in fact)
I've got Avisynth 2.5.5, VirtualDubMod 1.5.10 and an MPEG-2 source which has lots of DCT-caused noise.
What is the best way to filter it using SmoothHiQ without doing too many colorspace conversions (that may affect ?quality? and speed)?
As far as I know, the current version of SmoothHiQ for Avisynth 2.5 (08 Feb 2003) supports only YUY2 whereas AviSynth requires YV12.
So I tried this version and noticed a very strange effect (bug?): when using Diameter=9 or 11 or 13 the picture's colors got corrupted (had pinkish hue).
When I lowered the Diameter (3, 5 or 7), however, it seemed to be ok.
Was I doing anything wrong or maybe it's safer to use the vdf version of the filter?
Also, if using SmoothHiQ.dll for AviSynth should I make a "Video=ConvertToYV12(Video)" (or to RGB32???) conversion after converting to YUY2?
Ok, here's the script:


# PLUGINS
LoadPlugin("F:\AUTORV~2.0_B\SOFTS\AVSFILE\MPEG2DEC3.DLL")
LoadPlugin("C:\avs\SmoothHiQ.DLL")
Import("F:\AUTORV~2.0_B\SOFTS\AVSFILE\SCRIPT\FIELDORDER.AVS")
#
# VIDEO SOURCE
Video=Mpeg2Source("F:\VIDEO_ED\TROY\rv10\01\troy_rv10_01.d2v", idct=5 )
#
Video=ConvertToYUY2(Video)
Video=SmoothHiQ(Video,11,25,35,224,5)
#???Video=ConvertTo???(Video)
#
# LIMIT Chroma & Luma Value
#Video=Limiter(Video)
#
# FINISH
Return(Video)


Maybe I simply misused the parameters in "Video=SmoothHiQ(Video,11,25,35,224,5)" (I haven't found any proper documentation for this version)???

P.S. I'm going to encode it with AutoRV10_v1.0_b5 so I can't use AviSynth v. lower than 2.5.5
Of course using SmoothHiQ is an ultimate solution so maybe you know a better way to filter this source (frames - 52Kb and 50Kb). Please tell me :)

ftp://suninthethaw:Greenwinter@ftp.narod.ru/img/Troy_frame_No104590.jpg
ftp://suninthethaw:Greenwinter@ftp.narod.ru/img/Troy_frame_No104590_DistortedColors.jpg
[connection to these links is rather slow :(]



__THANK__YOU__!!!!

jggimi
23rd July 2004, 19:55
I don't have answers to your SmoothHiQ filter questions, as I don't have experience with that filter.

However, unless your output is required in YV12, you need not convert it back. AviSynth 2.5 supports YV12, it doesn't require it.

denissio
23rd July 2004, 20:46
:thanks:
Thanks a lot, I've been looking forward to smb reply. I stupid man :stupid: should have posted this in "AviSynth Usage" section.
Can someone please MOVE this thread to THAT section? The problem is still actual for me and probably I'll get more answers there.

ammck55
23rd July 2004, 20:56
Originally posted by denissio
Can someone please MOVE this thread to THAT section? The problem is still actual for me and probably I'll get more answers there. Certainly!

DarkNite
23rd July 2004, 22:40
You might also try the smoothuv.dll and use it's sshiq function. It accepts YV12 input, and is comparable, if not better suited for the job in some cases. The parameters are a bit different, but not difficult to figure out.

It can found in the usual place (http://www.avisynth.org/warpenterprises/) under the name SmoothUV.

Bogalvator
24th July 2004, 00:26
Also consider MipSmooth (available from same place as above), a filter by the same author as SmoothHiQ. It is, as he puts it, a "reinvention of SmoothHiQ", that also doesn't require a colourspace conversion.

As for the answer to your original question, I don't know what RV10 uses as a colourspace, so probably best to leave it as YUY2 - you're not likely to see any visual difference either way.

Asmodian
24th July 2004, 00:34
rv10 uses the I420 color space which is very similar to YV12 (YV12 with U and V swapped).

Bogalvator
24th July 2004, 00:52
Thanks Asmodian.

With that in mind, it's definitely best to leave it as YUY2. AviSynth doesn't do I420 so you would go YUY2 --> YV12 --> I420 (as opposed to YUY2 --> I420 direct), hence an unnecessary colour conversion will hve taken place.

DarkNite
24th July 2004, 04:55
If you're using RV10 you would probably want to (or already) use the Helix YUV codecs which will take care of the YUY2/YV12/I420 issue as far as Producer is concerned. All you have to worry about is whether or not you're converting colorspaces needlessly within your script.

denissio
25th July 2004, 02:03
Thanks!!
You really helped me to make up my mind about colorspaces but as for the filters I still couldn't find any that could beat SmoothHiQ yet (I really miss that 'weigh with difference' mode in similar filters) (: VagueDenoiser is also a very interesting filter.

BTW, I've just got the idea of creating a _very_tiny_ (and very simple) tool that could somehow facilitate the hard work of _very_lazy_ avisynth users. :D I won't say more for now ;) (you'll guess then), 'cause I don't know for sure how to implement it (but I'm sure the algorithm is cr*p). So even if I make sth don't take it serious :)

bye