Page 1 of 1
A Blurring/Sharpening filter would be nice.
Posted: 17 Dec 2006 10:10
by prologic
I know that VideoLAN has a motion blur filter, but what about a simple, "gaussian" (for lack of a better word) blur filter? It would belp in videos that look "blocky". Also, I think it would be a good idea to include a sharpening filter in the player, to improve the image of videos that are a bit blurry.
It just seems strange to me. I mean, VideoLAN has an incredible "psychedelic distortion" filter and a brilliant "video wall" mode, but it lacks a proper blur/sharpen adjustment!
Posted: 04 Jan 2007 09:03
by solace121
I second that. Especially with a large monitor, the blockiness becomes annoying, and unfortunately my lcd doesn't allow me to turn down the sharpness enough for my tastes.
Posted: 04 Jan 2007 12:09
by Jean-Baptiste Kempf
Do you have the mathematic references for those filter requests?
Posted: 24 Jan 2007 22:22
by DJ_Mulder
Do you have the mathematic references for those filter requests?
Hello,
If you want, I've already code a sharpen filter to VLC for the same reason as
prologic.
The code could be found here :
http://djduron.no-ip.org/vlc/sharpen.c
Else the mathematic reference was juste a laplacian convolution filter :
Code: Select all
[-1 -1 -1]
D = X + (sigma * X.[-1 8 -1])
[-1 -1 -1]
Where sigma is the sharpen' strength, X the image source and D the result image.
I've seen, just apply filter on Y plane was enough.
This is not perfect, the code need optimisation and I need to know how to apply this filter after desinterlace one and after subtitle filter (apply sharpen filter on subtitle was... dreadful).
So if someone could say me how to manage filter order, I can improve this.
Posted: 26 Jan 2007 22:37
by dionoea
I'd be glad to commit your filter to VLC if you changed the following:
* remove commented out test code
* make it a video filter 2 instead of a video filter 1 (check current svn for examples. stuff like adjust.c or invert.c).
/me waits for a new patch
Posted: 30 Jan 2007 23:52
by DJ_Mulder
I'd be glad to commit your filter to VLC if you changed the following:
* remove commented out test code
* make it a video filter 2 instead of a video filter 1 (check current svn for examples. stuff like adjust.c or invert.c).
Hello,
I'm currently coding this patch in "video filter 2" but:
- impossible to test it under 0.8.6a (error message: no video filter module matched "sharpen")
- 0.9.0-trunk don't compile under my system (fresh and minimalist mingw).
So, how can I test it easily?
Posted: 31 Jan 2007 00:39
by Jean-Baptiste Kempf
1/ repair your compile System.
2/ give us a link to the patch made with svn diff or diff -ruN...
Posted: 01 Feb 2007 00:06
by DJ_Mulder
lol, ok, my question is little newbie one
.
Underline I want to say: "How can I use video filter2 with vlc 0.8.6 under Windows to test and daily use this filter?".
So, I finish the patch using my gentoo and it can be found here:
http://djduron.no-ip.org/vlc/0.9.0-sharpen.patch
Posted: 01 Feb 2007 00:45
by Jean-Baptiste Kempf
404
Posted: 01 Feb 2007 01:08
by DJ_Mulder
Fixed
Posted: 01 Feb 2007 23:43
by dionoea
You can't manually choose video filter2 filters for local display in 0.8.6. The only (hackish) way to do so is:
Code: Select all
vlc <input> --sout "#transcode{vcodec=mp2v,vb=2048,vfilter=sharpen}:display"
This changed in the development version which is why i ported most video filters to the video filter2 framework. If you get 0.9.0, note that you select video filters with --vout-filter and video filter2s with --video-filter. I'll test the filter ASAP and commit it if it looks/works fine.
Edit: note that you forgot to add your filter to configure.ac
Posted: 02 Feb 2007 00:33
by Jean-Baptiste Kempf
Oki. I made a few fix, cleaning, and configure.ac.
Here is the new patch
http://www.jbkempf.com/~jb/vlc/sharpen.patch
Posted: 04 Feb 2007 23:31
by Jean-Baptiste Kempf
The filter has been submitted to trunk.
Posted: 05 Feb 2007 22:55
by neXus
Jeah, sharpen filter would be great, I'm using Crystal Player for that matter, because, a lot of Divx is blurry, due to downsampling of source video (DVD). SO GO AND KICK ASS WITH SHARPEN FILTER.
Posted: 05 Feb 2007 23:29
by Jean-Baptiste Kempf
It is in the trunk. 0.9.0-svn. use nightlies if you want it. Or wait for 0.9.0 Release.
AND DON'T ASK WHEN is the release.
Posted: 06 Feb 2007 22:15
by DJ_Mulder
Hello and thanks to adding my code so quickly.
Reading the modification you've done, I didn't see were you bind sigma value from the user configuration.
Is it automatically done with the new video filter2?
Posted: 06 Feb 2007 22:25
by Jean-Baptiste Kempf
add_float_with_range( "sharpen-sigma", 0.05, 0.0, 2.0, NULL, SIG_TEXT, SIG_LONGTEXT, VLC_FALSE );
and
p_filter->p_sys->f_sigma = var_GetFloat(p_this, "sharpen-sigma");
But this is going to change a little since there is a new patch on the ml.
Will you work on a new filter ?
Posted: 06 Feb 2007 23:56
by DJ_Mulder
Sorry, I didn't see the new position of this line.
Will you work on a new filter ?
Not for the moment but I'm looking to a solution to upscale video using Lanczos method.
Scale filter do the job using "nearest neighbour" and I don't see how to setup it precisely (upscale to 1366x768 or anything else...).
Under 0.8.6a, swscale lib could do it but:
1/ it was removed
2/ I never see how vlc use it
So... perhaps I can add Lanczos (and open to another) algorithm and parametrize to it. Off course, only if this didn't break videolan future changes.
Posted: 07 Feb 2007 00:02
by Jean-Baptiste Kempf
In fact this has been moved to be only at the Creation time, not every time.
This filter should be improved in performance in the future. But now, it works.
Swscale is very experimental and buggy, so that why it is not in 0.8.6. I don't know for future versions.
A good list of filters :
http://movavi.com/enhancemovie/filters.html
Btw, the sharpen does only sharpen or can it blur too ?
Posted: 07 Feb 2007 09:38
by cocquebert
A question about vfilter2 vs. vfilter:
I have made a similar filter first in vfilter2, I have seen that it was too slow ... I have decided to code on vfilter, and voilĂ ... it's much faster ...
Why a such difference (with the same algorithm ...)
Posted: 07 Feb 2007 09:57
by Jean-Baptiste Kempf
Well, ask dionoea or on the mailing list. The main idea is that vfilter2 can be in the transcoding chain.