View Full Version : KISS method: Deen() replaced with Asharp()... some advices?
Hi guys,
Following violao's advice, this is the continuation of the DVD 2.35:1 to NTSC Anamorphic 1.85:1 (http://forum.doom9.org/showthread.php?threadid=93370) thread.
Let me please copy my last post, as a new thread, in the right forum.
If you want to understand more what I've done and what our forum collegues told me to do so far about movie resizing, please read the thread posted above.
After running several tests with KISS, I realized that my movie will be cleaner and sharper using Asharp(), instead of Deen().
Now, Asharp(2,4) is the default setting, but some people like to use it as:
Undot()
Asharp(1,4)
Lanczos4Resize(720,480,76,50,568,378)
Using this script:
c0 = last
c1 = Crop(c0, 0, 0, c0.width, c0.height / 2)
c1 = Subtitle(c1, "Source", 10, 20)
c2 = Crop(c0, 0, c0.height / 2, c0.width, c0.height / 2)
c2 = UnDot(c2)
c2 = Deen(c2)
c2 = Subtitle(c2, "Source + UnDot() + Deen()", 10, 20)
StackVertical(c1, c2)
I was able to compare the results from Deen() and Asharp().
I noticed that, if I run the filters after the Lancoz4Resize, the image will be cleaner...
The image at the top was done with Undot()+Asharp(1,4) and the one below, with Undot()+Asharp(2,4).
I marked the red squares, just to see better the pixelation diffrence between the 2 filter values.
http://xs28.xs.to/pics/05191/asharp.gif
Do you recommend the float "T" to be 1 or 2 (default)? Also, what is your oppinion about DeGrainMedian()?
Asharp(float "T", float "D")
T : unsharp masking threshold. 0 will do nothing. (value clamped to [nothing=0..32])
1 is like 32 with ffdsow/Vdub unsharp mask filter, it'll enhance contrast 1x
default is T=2
D : adaptive sharpenning strength. (value clamped to [disabled=0..16])
set to 0 to disable
if D>0, adaptive thresholding is enabled.
the threshold is adapted for each pixel (bigger for edges)
if adaptive sharpenning is enabled, T acts like a maximum.
default is D=4
Thanks guys.
Wilbert
9th May 2005, 14:58
After running several tests with KISS, I realized that my movie will be cleaner and sharper using Asharp(), instead of Deen().
That makes sense. Asharp is a sharpener and Deen smooths. Why did you use Deen if your video didn't contain any noise (at least i assume it didn't)?
I don't know what to say about Asharp. I never use that in my dvd encodings. Applying a sharpener makes your source less compressible (which could be a problem if you use a low bitrate for your encoding).
Btw, what is the KISS method?
KISS is the nickname for a compressibility enhancer filter pair, UnDot() + Deen().
Please look at the results (pay attention to the wall details):
The wall grains are almost gone, you can barelly see them, with Deen(). With Asharp(), they are smooth and vibrant.
http://xs28.xs.to/pics/05191/asharpdeen.gif
Could you guys please explain when Deen() is recommended to be used?
Many people who compress a movie about 80-90%, will run Deen().
I believe Asharp(1,4) will act like Deen(), only with much better definition and contrast.
What do you recommend for a small compression ratio (around 80%)? To use only Undot()?
Also, what do we do when the compression ratio goes high, to 50-60%?
We are taling about a DVD backup, main movie only.
Thanks for taking the time to read this post.
lamer_de
9th May 2005, 15:31
I belive Asharp (1,4) will act like Deen(), only with much better definition and contrast.Deen is a smoother, asharp a sharpener. Their purpose is 100% contrary. You can't smooth anything with asharp.
If for your source the cleaning with Undot is enough, then there is indeed no use adding Deen on top. For some/many sources undot however is not enough or people like to get higher compressibility, so that's why they use it.
On a sidenote, I always thought KISS would either mean the rock band or "Keep it short and simple" :p
CU,
lamer_de
Thanks lamer_de. In other words, for a DVD backup movie only, if I compress a huge movie, like LOTR, then it will be recommended to KISS it.
However, if the compression is very small (less then 80%), Undot() only will do just fine. Basically, Asharp() should not be used on a DVD backup movie only process...
I use CinemaCraft SP 2.50 for my encoding needs.
Let me know guys if I'm correct. Thanks.
Boulder
9th May 2005, 16:54
You'll have to test whether you'll need the extra compressibility or not.
One way to do so is to calculate the average bitrate of the final encoded video and then encode a 3-5% sample of the video with OPV in CCE. You can get a nice 5% sample clip by using SelectRangeEvery(300,15) as the last item of your script. Try to get the OPV clip's average bitrate as close to the calculated one as possible, then view the sample. If you like what you see, you don't need to add Deen(). Another way is to look at the predicted Q value, if it's 30 or less, it should look OK without any extra filtering.
By the way, your asharped screenshots show quite ugly edge sharpening IMO;)
violao
9th May 2005, 22:01
Q=30? I would use bitrate viewer after a trial one-pass encoding of a whole movie with calculated average bitrate. If the maximum quantizer is below some predifined value (I stick to Q around 10) I use some sharpening. Otherwisew blur. 30 is I believe way to big. Unless most of the movie is below 10 and this is just a short zooming/scanning clip with a lot of details.
Heh Boulder, forgive me... :)
I'm a newcommer to encoding, so please guys bear with me. I'm learning everything as we speak, so into my eyes it looked good compared with the original movie.
So far, I have very good information from all of you.
Boulder, I understand now, I will use OPV because the CCE's one pass vbr mode will self adjust itself to movie's compressibility automatically, (within set parameters or 'Q'?) and set it's own optimal bitrate. Once I have the bitrate, then I can use it in a multipass vbr mode. Let me know if I'm correct.
violao, I will try your Bitrate Viewer tip, it looks like a viable solution to check easy the quality of the compressed movie.
Let's take a small portion of the movie:
http://xs27.xs.to/pics/05185/fit2disc.gif
Run a Lanczos4Resize() on it and analyze it with Bitrate Viewer:
http://xs26.xs.to/pics/05175/bitrateview.gif
I presume what violao ment is this:
If Q<=10, run Asharp() on the movie. If Q>10, run a Deen()?
In our case the Q. level is really low. What would you do next, in terms of filtering?
I would go with a script like this:
Crop(76,50,568,378)
Lanczos4Resize(720,480)
Undot()
Asharp(1,4)
I noticed that, if I run the Undot()+Asharp() after the resize function, it will give me a better picture... wierd, since most of the experts say is better to do it before?
The movie I work with needs to be compressed to 90% only.
How can you determin efficiently the max limit for the compression of your movie?
Thanks for your patience, guys. :)
Boulder
10th May 2005, 05:57
Q30 as the CCE OPV parameter, not the average quantizer;)
violao
10th May 2005, 10:33
Originally posted by TECK
If Q<=10, run Asharp() on the movie. If Q>10, run a Deen()?
In our case the Q. level is really low.
...
How can you determin efficiently the max limit for the compression of your movie?
You've got the general idea. If quantizer is way below 10 I would say that's reasonably good quality compression (sorry Boulder, I missinterpreted your words). Run a bitrate viewer on some originals and compare results.
There are no limits for the compression, just like there are no limits for the bad quality. Do some tests and use your eyes. There are some practical limits that influence compression, like for example the size of the media.
P.S. and be careful with sharpening...low quantizer might be result of compressing very sharp static scenes that don't need any sharpening
kingmob
10th May 2005, 11:05
You're judging your sharpening on intentionally unsharp images. Imo that's a waste of time. Concentrate on faces in the front etc. that's what matters to the ones watching it.
Boulder
10th May 2005, 11:24
Originally posted by violao
You've got the general idea. If quantizer is way below 10 I would say that's reasonably good quality compression (sorry Boulder, I missinterpreted your words). Run a bitrate viewer on some originals and compare results.
A quick way to use OPV in determining the "minimal bitrate requirements" is to encode that 5% sample clip with Q30 in CCE and then determine the average bitrate of the encoded sample. I wouldn't use Bitrate Viewer, it gives too low results. Try MPEG Stream Eye instead (thanks dragongodz;) ).
Compare the average bitrate of the sample to what you have available for the whole movie. If the whole movies average bitrate would be less than the samples, you should be safe, although it's always good to check the sample before making any decisions.
kassandro
10th May 2005, 12:00
Originally posted by TECK
I noticed that, if I run the Undot()+Asharp() after the resize function, it will give me a better picture... wierd, since most of the experts say is better to do it before?
As you are upsizing quite a bit (which makes only sense if you want strict DVD compatibility), the image gets blurred spatially by the resizer. Thus the sharpening done before resizing gets undone to a certain extend. If you want maximum crispness, sharpen as late as possible. You have to pay a high price for crispness, though. If you encode with the same quantiser compression size explodes, because even the best sharpener amplifies noise to a certain extend. I am principially against sharpening before encoding but I am very much in favor of sharpening after decoding, which would look even better, if we would apply the same sharpeners. Unfortunately we don't have available the good Avisynth denoisers in playback devices. For instance, the sharpener in my DVD player (with a Zoran Vaddis 7 CPU) is really crap like in most other DVD players, if they have one at all.
Thanks guys, for your valuable explanations. It helped me a lot.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.