Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Cartoon Cleaner, ...anyone wants to test my first filter?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
Fredrik
Posted: Dec 9 2002, 12:05 AM


Unregistered









Hello!

I have just finished writing my first VirtualDub filter and would like to hear your opinion about it. It is not yet configurable and uses hardcoded settings instead. Get it from http://www.geocities.com/ackehurst/

It is a combination of temporal cleaning and 2d cleaning. I wanted to make a really FAST filter, that's why I did not write special 2d cleaning code for the margins... they are simply cropped away (I capture at 336x252, so throwing away 16x12 pixels is okay for me).

On my Duron 650, it runs at 13-14 fps. Looking forward to hearing your opinion... oh btw I'm going to buy a real C++ soon ;-)
 
  Top
Morsa
Posted: Dec 9 2002, 03:32 AM


Moderator of the Vdub support board


Group: Moderators
Posts: 640
Member No.: 246
Joined: 9-September 02



Nice to see a new filter arrival!!!
I will test it when it has a configuration dialog.
hope soon.....
Good luck!
 
     Top
jcsston
Posted: Dec 9 2002, 04:41 AM


Matroska Dev


Group: Moderators
Posts: 553
Member No.: 652
Joined: 3-November 02



Nice filter, it is fast too on my T-Bird 650 smile.gif 16-17fps from Huffyuv to uncompressed RGB
I just letterboxed my video so none of the picture would be cut off.


--------------------
Use the Matroska file format
 
       Top
ChristianHJW
Posted: Dec 9 2002, 03:37 PM


Advanced Member


Group: Moderators
Posts: 1768
Member No.: 2
Joined: 7-July 02



welcome Fredrik,

its always a pleasure to welcome a new developer here who is sharing his work for Virtualdub with us ...

--------------------
Visit the unofficial Virtualdub support forum on http://forums.virtualdub.org - help to reduce the big number of emails Avery Lee is getting every day !!
Support matroska as container and Gstreamer as the only truely open, x-platform multimedia platform ....
 
       Top
Fredrik
Posted: Dec 9 2002, 09:55 PM


Unregistered









The implementation of the 2d cleaner part changed, you can download v0.2 of the filter at http://www.geocities.com/ackehurst/



the 2d cleaner part of v0.1 works as follows:
----------------------------------------------
every pixel in the 8x8 matrix is compared to the center pixel. if the difference is not smaller than the threshold, the pixel is added to an accumulator, else the center pixel is added to the accumulator. the result of the 64 additions is then right shiftet by 6.
that leads to the problem that small equal-colored areas with only (for example) 10 pixels is not 2d cleaned very well, because the 10 pixels add up only 10/64 = 15% of the new averaged pixel.


the 2d cleaner part of v0.2 works as follows:
---------------------------------------------
every pixel in the 8x8 matrix is compared to the center pixel. if the difference is not smaller than the threshold, the pixel is added to an accumulator and a counter is increased. after checking the 64 pixels, accumulator/counter is the new pixel.
BTW I think this is how the "optimized 2d cleaner" filter by Jim Casaburi works...? I still don't understand his code btw... pretty heavy stuff.


I noticed my threshold values to be a little too high since black lines in dark-coloured areas disappeared (for example the black lines in the simpsons' red couch or in a green tree). After experimenting a bit I set all rgb thresholds to 10.

Today I spent a lot of time optimizing my code - all opcodes in the loops could be arranged to pair (correct english? pair as a verb?). You may not notice the difference in speed since the new 2d algo is a little slower (but more accurate) than the old one. I'll see if I can gain a little speed bust by loop unrolling, but I'm afraid I've already run out of mmx registers ;-)



Regarding configurability: this filter is my first win32 prog ever, so don't expect anything in the near future ;-)
 
  Top
Fredrik
Posted: Dec 9 2002, 09:57 PM


Unregistered









QUOTE (jcsston @ Dec 8 2002, 10:41 PM)
Nice filter, it is fast too on my T-Bird 650 smile.gif 16-17fps from Huffyuv to uncompressed RGB
I just letterboxed my video so none of the picture would be cut off.

Could you test version 0.2 of the filter, too? Thanx.
 
  Top
Fredrik
Posted: Dec 31 2002, 12:46 AM


Unregistered









Version 0.5 of the filter is now available. Instead of 8x8 it uses an 11x11 matrix, thus it is of course slower than 0.2, but the quality is better. feel free to download and test it... i'd be glad if you could benchmark it against the 2d cleaner (threshold 10, radius 5). thanx!
 
  Top
Fredrik
Posted: Dec 31 2002, 03:11 AM


Unregistered









QUOTE (Fredrik @ Dec 30 2002, 06:46 PM)
Version 0.5 of the filter is now available.

I found a stupid bug, please update to v0.5b
My filter seems to be 7% slower than optimized 2d cleaner 0.9 (but the latter does not clean temporally).

Edit: just to be sure, I want to align a dword array on qword boundaries. I use

last = (Pixel32*)((((dword)(mfd->lastframe))+7)&(-8));

Is this the correct way?

mfd->lastframe was created 8 bytes bigger than necessary.

 
  Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
7 replies since Dec 9 2002, 12:05 AM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Filters and Filter Development