Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th October 2002, 09:11   #1  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Peach Smoother

Here is “Peach Smoother.” It is dedicated to an especially yummy peach I had a few weeks back.

http://students.washington.edu/ldubb...chSmoother.zip

This is meant as a pure “does it crash” build. This is my first AVISynth plug-in, so I’d like to make sure that I haven’t done anything truly screwy.

Being a stability test, I haven’t enabled any options or included any documentation. To run it, the command is
PeachSmoother()

Basically, the Peach works by looking for good pixels and gathering orange smoke from them. When it has gathered enough orange smoke, it sprinkles that onto the bad pixels, making them better. When the Peach is seeing lots of good pixels, it gets so happy that a small green dot appears in the upper left corner of the image.

Um... Well, I’ll write real documentation once I’m sure it isn’t just crashing people’s computers.

PS: The link has been edited to point to the most recent version. (I noticed that version 0.9a was getting more new downloads than 0.9h)

PPS: Note that this requires SSE instructions (from a Pentium 3, Athlon, Celeron beginning with the Tualatins (~1.2 GHz), or anything more recent).
__________________
9:) Lindsey Dubb

Last edited by High Speed Dubb; 2nd November 2002 at 06:52.
High Speed Dubb is offline   Reply With Quote
Old 25th October 2002, 12:04   #2  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
LOL - who needs more documentation than that?

It works great, and seems to be a very good temporal smoother, much better than the built in.

The first frame is very often trashed, with strange artifacts, but that's the only problem I've seen. (Try opening in VDubAVS and refresh (F5) at at frame).

This combination does wonders for my noisy DV source
Code:
PeachSmoother()
Convolution3d (preset="movieLQ")
lanczosresize(448,336)
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote
Old 25th October 2002, 14:24   #3  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
I don't see any green dots or orange smoke but it does not crash my machine.

I can't really tell what it does.

- Tom
trbarry is offline   Reply With Quote
Old 25th October 2002, 14:26   #4  |  Link
ajp
Registered User
 
Join Date: Oct 2002
Location: Sweden
Posts: 83
Didn't crash my computer either and the results look very promising on the short clip I tested. Will come in real handy for my DV caps from TV, keep up the good work!

When can we expect a version with parameters?

EDIT: I can see some "smearing" or ghosting, not sure how to explain it. Very nice for a testversion though...

Last edited by ajp; 25th October 2002 at 21:19.
ajp is offline   Reply With Quote
Old 25th October 2002, 21:22   #5  |  Link
vlad59
Vlad, the Buffy slayer
 
vlad59's Avatar
 
Join Date: Oct 2001
Location: France
Posts: 445
I got no crash too!

But I got a strange effect on a dark blue background which has been transformed in some parts in pure black.

I can send png images if you like !
__________________
Vlad59
Convolution3D for avisynth 2.0X : http://www.hellninjacommando.com/con3d
Convolution3D for avisynth 2.5 : http://www.hellninjacommando.com/con3d/beta
vlad59 is offline   Reply With Quote
Old 26th October 2002, 00:07   #6  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Yay! No crash is a good sign, I think. Thank you for testing it.

My apologies to people with pre-SSE computers. I forgot to post that SSE instructions (from a P3, P4, Athlon, or recent Celerons) are necessary in order to run it. It does check for processor capabilities, so this shouldn’t have caused any crashes. But that would have saved some unnecessary downloads.

The Peach is mostly a temporal smoother, though it falls back on spatial smoothing in moving areas if the signal is very noisy. It’s a port of the “adaptive noise” filter from DScaler, though it has a few extra changes (mainly the spatial smoothing).

I’ll mostly leave the picture quality issues for later, once I’ve got parameter entry and the docs together. The main trick with this filter is patience. It blurs too much until the green dot shows up. You know, not enough orange smoke.

Sh0dan,
I’m not sure about the first frame corruption. That sounds a lot like an uninitialized buffer — but double checking for that looks like everything is initialized properly. By design the first frame should be left through unaltered. Also, I haven’t been able to get a corrupted first frame on my computer. Could you rephrase your description of how to see it? There’s a typo in your explanation which makes it confusing.
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 26th October 2002, 03:10   #7  |  Link
trbarry
Registered User
 
trbarry's Avatar
 
Join Date: Oct 2001
Location: Gainesville FL USA
Posts: 2,092
Lindsey -

I've recently taken to using DScaler's Gradual Noise filter on some of my Tivo channels. What is the difference between the Gradual Noise filter and (more Peachy?) Temporal Noise filter?

- Tom
trbarry is offline   Reply With Quote
Old 26th October 2002, 03:31   #8  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Temporal noise averages (75% previous field, 25% this field) so long as the difference is below a threshold. It also has some rounding glitches.

Gradual noise averages between the previous field and the current field using a weighting determined by the local sum of differences — The closer the pixels are, the more weight is placed on the old value at that pixel. It fixes the rounding glitches. (But there’s a small bug in the fdshow version which reintroduced some rounding problems.)

The Peach/adaptive noise works similarly to gradual noise, but uses a more effective scheme to detect motion, making use of temporal and spatial correlation in the motion. It also figures out the appropriate weighting scheme by estimating the noise (aka orange smoke) in the picture.

That’s why I was able to get away with posting a parameterless version — the same setting is designed to work regardless of the noise. But it does make sense to tweak depending on the amount of detail in the picture — The posted version has reasonable parameters for animation, since that seems to be popular in this group.

The FLT_GradualNoise.c and FLT_AdaptiveNoise.txt files have a fair amount of detail about the algorithms. They’re at
http://cvs.sourceforge.net/cgi-bin/v...caler/Plugins/

Parameter input seems to be working. Now I just need to write up some documentation...
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 26th October 2002, 03:47   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
>Now I just need to write up some documentation...

Documenting is my favorite part of a project. It is so much easier than coding, testing, debugging.

Don't you agree?
Guest is offline   Reply With Quote
Old 26th October 2002, 05:30   #10  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Well, there are definitely some programs for which the documentation is more complicated than the code.

This isn’t one of those. I’ve now got some docs.

The new version, with accessible parameters and a few tweaks, is available from
http://students.washington.edu/ldubb...ther_v0_9c.zip

Next up is changing it to properly handle interlaced material.

PS: Edited to put up the new version, which properly checks its parameters.
PPS: Look further down in the thread for a more recent version.
__________________
9:) Lindsey Dubb

Last edited by High Speed Dubb; 27th October 2002 at 01:14.
High Speed Dubb is offline   Reply With Quote
Old 26th October 2002, 06:52   #11  |  Link
soulfx
The Digital Soul
 
soulfx's Avatar
 
Join Date: Jun 2002
Location: Nebraska, USA
Posts: 114
@High Speed Dubb: Wow, this is really awesome work. You've been able to put a single filter together for what I was trying to accomplish with three seperate filters, nice work

I came across a little bug, but not that big of deal. PeachSmoother seems to take any ol' last frame to compare with the current frame. Like when I jump around from a position farther ahead it remembers that frame and tries to adjust it to the frame I land on farther back. It still works for strait through encodes though.

Thanks for an awesome filter. You have my 100% support for this filter. All I do all day every day is TV captures and the biggest problem I have is noise. I'm glad to add this filter to my arsenal for ultimate noise beatdown ^_^

Peace,
SoulFX
soulfx is offline   Reply With Quote
Old 26th October 2002, 06:59   #12  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Glad it’s working well.

Yeah, I haven’t yet put in a check for contiguous frames. I should probably figure out about the first frame problem before doing that.
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 27th October 2002, 01:14   #13  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Here’s a minor update which allows higher spatial smoothing values. PS:... and now turns off when jumping between frames. (It would be better to turn off just the temporal part of the algorithm, but that would be harder to write.)

http://students.washington.edu/ldubb...ther_v0_9e.zip
__________________
9:) Lindsey Dubb

Last edited by High Speed Dubb; 27th October 2002 at 06:03.
High Speed Dubb is offline   Reply With Quote
Old 28th October 2002, 08:46   #14  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Here’s a more significant update. This version deals properly with interlaced video, averaging only between matching fields.

http://students.washington.edu/ldubb...ther_v0_9f.zip

Also, I rescaled the spatial smoothing parameter so that it is really measured in percent of the temporal smoothing. To convert your current value to the new scale, multiply it by 1.23 (yes, really ).

That leaves just a couple small tweaks before I call it version 1.

To Tom, vlad59, and sh0dan (and anyone else, of course) — Now that the filter is a little further along, I’m interested in the picture quality issues. Have the updates fixed the first frame corruption or the black on blue problem?
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 28th October 2002, 09:08   #15  |  Link
vlad59
Vlad, the Buffy slayer
 
vlad59's Avatar
 
Join Date: Oct 2001
Location: France
Posts: 445
@High Speed Dubb

The black on blue problem was solved with the 0.9e release. Gonna recheck with the 0.9f to be sure.

Your suggested settings for cartoon seems to strong for my test I've lowered a little the NoiseReduction parameter to get rid of ghosting.

Very good work.
__________________
Vlad59
Convolution3D for avisynth 2.0X : http://www.hellninjacommando.com/con3d
Convolution3D for avisynth 2.5 : http://www.hellninjacommando.com/con3d/beta
vlad59 is offline   Reply With Quote
Old 28th October 2002, 10:36   #16  |  Link
JohnMK
Registered User
 
Join Date: Sep 2002
Location: Seattle
Posts: 551
I'm very impressed with my UW comrade.
JohnMK is offline   Reply With Quote
Old 28th October 2002, 13:56   #17  |  Link
iago
retired
 
iago's Avatar
 
Join Date: Jun 2002
Location: hollywood
Posts: 1,013
@High Speed Dubb

First of all, before I report a few issues I observe in my test encodes (normal movie / average quality DVD / XviD fixed quants 2 and 3 / MPEG2Dec3.dll / Avisynth 2.06), I would like to congragulate and thank you for this very successful filter, which in terms of compressibility gain, quality and speed is really amazing. BTW, I used default values in the test encodes -> PeachSmoother()

Just a possible problem: it seems to cause some sort of instability and shaking with still parts of the picture, both when applying it after resize or before. This is very obvious when I compare the results with and without PeachSmoother. I dunno if others experienced such a problem too, but I just wanted to report it here. (Version 0.9f)

best regards,
iago

Last edited by iago; 28th October 2002 at 13:59.
iago is offline   Reply With Quote
Old 28th October 2002, 16:01   #18  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
vlad59,

Interesting — I would have guessed that 0.9b had the fix for it. (That’s where I corrected to allow for Y(black) = 16.) Well, I’m glad it’s taken care of.

iago,

Would those parts of the picture be at the edges of objects or of compression blocks? Do you see any (less obvious) shimmering in the unprocessed source at the same locations?


Yay, Dawgs?
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 28th October 2002, 16:29   #19  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
Oops — I forgot to comment on some of that.

Vlad59,

Those values were from a flat colored, high contrast cartoon (Justice League). Shaded animation would probably have problems with those settings. I’ll put an explanation of that in the example scripts.


I tried compressing a few quick clips (with HuffYUV), and noticed something sort of surprising. A noise reduction value of 150 allowed only a little more compression than a value of 20. So for saving disk space, it may be that only very light noise reduction is necessary. (But I do think the output looks nicer when noise reduction is in the low 50s.)
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Old 28th October 2002, 16:52   #20  |  Link
High Speed Dubb
Registered User
 
Join Date: Jan 2002
Posts: 283
It’s me again.

Many thanks to everybody for the feedback! This makes it much easier to figure out bugs, quirks, tweaks, and defaults. And it’s great to hear that the filter is working well.

Here is version 0.9g . This one enables spatial (but not temporal) smoothing when jumping between frames, and adds a couple speed-ups. You can now get it to run faster by turning off spatial smoothing.

http://students.washington.edu/ldubb...ther_v0_9g.zip

This is likely to be the last 0.9 release. Now is a good time to suggest changes to the parameter names, since I won’t want to change them after a 1.0 version.
__________________
9:) Lindsey Dubb
High Speed Dubb is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.