PDA

View Full Version : RemoveGrain v0.9 bugs?


hartford
27th October 2005, 03:54
About one year ago, I used RemoveGrain v0.6 on a Black & White movie.

I recently tried to use RemoveGrain v0.9 on a Black & White movie and I get this error: "only planar color spaces are supported."

Yet, the included info file says nothing about this; in fact, it demontrates how
to do Black & White.

Also, when I try to use "grey=true," I get this error: "removegrain does not
have a named arguement "grey"."

Anyone else doing B&W having this problem? (I'll use v0.6 for now).

(I've not tried intermediate versions)

Thanks.

Leak
27th October 2005, 08:17
I recently tried to use RemoveGrain v0.9 on a Black & White movie and I get this error: "only planar color spaces are supported."
This probably means that only YV12 is supported, so make sure your movie is in YV12 - since it's black and white the color subsampling won't affect it, and it will also take up less memory for each frame.

AVIL
27th October 2005, 09:00
From the documentation of the filter:

Color Spaces
Until version 0.7 the above filters did also support the color spaces YUY2, RGB24 and RGB32. It did so by converting these interleaved formats internally into a planar ones, then the planar intemediate formats were processed as YV12 and finally the intermediate planar formats were converted back into the original interleaved formats. If ,as in some of the above scripts, many instances of the above filters are used, these conversion routines resulted in enormous overhead. Also the conversion routines were not optimised. Beginning with verison 0.8 we have dropped support for the interleaved color spaces in favor of their planar analogs. For Avisynth planar YUY2, RGB24 or RGB32 frames look just like the ordinary interleaved frames of these color spaces. However, the organization of the data on these frames is very different. The not yet released plugin SSETools (preliminary versions are included in the RemoveGrain package) contains the basic filters Interleaved2Planar and Planar2Interleaved. For YV12 these filters do absolutely nothing. For the other color spaces, Interleaved2Planar converts the interleaved frames into frames with planar data organisation and Planar2Interleaved reverses this conversion. Thus Interleaved2Planar().Planar2Interleaved and Planar2Interleaved.Interleaved2Planar(). leaves any frame unchanged. Thus Planar2Interleaved and Interleaved2Planar are lossless filters. For YUY2 the filters Interleaved2Planar() and Planar2Interleaved are highly optimised and shouldn't cost much more than a simple bitblt. Now, in order to prohibit unexperienced users from applying the above filters to interleaved color spaces, we have added the boolean variable planar to RemoveGrain, Repair and TemporalRepair. If planar=false (the default value), then these filters reject YUY2, RGB24 and RGB32 frames. Only if planar=true, then these filters accept YUY2, RGB24 and RGB32 input, but always assume that the data are organised in a planar way. If you use planar=true with ordinary interleaved input, you get garbage. Clense and MCClense like most other purely temporal filters work the same way with planar and interleaved input. Thus these filters have no planar variable and work both with planar and interleaved input. TemporalRepair(smooth=0) is also purely temporal and thus accepts YUY2, RGB24 and RGB32 input even with planar=false. On the other hand,TemporalRepair(smooth=1) has also spatial aspects and therefore rejects any YUY2, RGB24 and RGB32 input with planar=false. In the not too distant future there should be a web site www.PlanarYUY2.de.tf , which will list filters and there compatibility with planar YUY2, RGB24, RGB32.

As an example for the application of Planar2Interleaved and Interleaved2Planar we give a version of RemoveDust, which works for YV12, and all interleaved color spaces (but not planar YUY2, RGB24, RGB32): function RemoveDust(clip input, bool grey, int "repmode", int "_smooth")
{
default(repmode, 16)
default(_smooth, true)
clmode = 4
input = Interleaved2Planar(input)
clensed = Clense(input, grey=_grey)
rep=Repair(clensed, input, mode=repmode, modeU=_grey ? -1 : repmode )
rg = RemoveGrain(rep, mode=clmode, modeU=_grey ? -1 : clmode)
return TemporalRepair(rg, rep, grey=_grey, smooth=_smooth).Planar2Interleaved()
}

Boulder
27th October 2005, 09:01
For B&W processing add modeU=-1, then Greyscale() afterwards.

For YUY2 processing you need to use Interleaved2Planar().RemoveGrain(planar=true).Planar2Interleaved(). I think the two functions you need are in SSETools.dll.

EDIT: Too late :D

EDIT2: Added planar=true in RemoveGrain

hartford
28th October 2005, 04:28
@ Leak

You're right. I needed to convert to yv12.

Version 0.6 didn't require this, and it is not noted in version 0.9, or perhaps I missed it.

Thanks.

Also, thanks to you "usual suspects" that replied. I appreciate your suggestions.

hartford
28th October 2005, 04:30
@ Boulder

I did try the "ModeU" thing but it failed for me; I can't imagine why. My scripts are very straightforward.

Boulder
28th October 2005, 07:47
In what way did it fail?

No need to convert to YV12 if you use the interleaved2planar->rg->planar2interleaved thingie for YUY2 data. YV12 is much faster though, so if you end up in YV12 anyway, it might be better to convert before RemoveGrain.

EDIT: just remembered that you must specify planar=true in RemoveGrain if you have YUY2 data which has been converted to planar!

Pookie
29th October 2005, 07:56
You might want to try his pre 1.0 release

http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar

Try modes 22 through 27

The following syntax works for me:

RemoveGrain(mode=25,modeu=1)