A Blurring/Sharpening filter would be nice.

Feature requests for VLC.
prologic
Blank Cone
Blank Cone
Posts: 12
Joined: 16 Dec 2006 16:21

A Blurring/Sharpening filter would be nice.

Postby prologic » 17 Dec 2006 10:10

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! :lol:

solace121
New Cone
New Cone
Posts: 1
Joined: 04 Jan 2007 09:00

Postby solace121 » 04 Jan 2007 09:03

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 04 Jan 2007 12:09

Do you have the mathematic references for those filter requests?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DJ_Mulder
New Cone
New Cone
Posts: 6
Joined: 24 Jan 2007 21:55

Postby DJ_Mulder » 24 Jan 2007 22:22

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. :wink:

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 26 Jan 2007 22:37

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 :)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

DJ_Mulder
New Cone
New Cone
Posts: 6
Joined: 24 Jan 2007 21:55

Postby DJ_Mulder » 30 Jan 2007 23:52

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 31 Jan 2007 00:39

1/ repair your compile System.
2/ give us a link to the patch made with svn diff or diff -ruN...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DJ_Mulder
New Cone
New Cone
Posts: 6
Joined: 24 Jan 2007 21:55

Postby DJ_Mulder » 01 Feb 2007 00:06

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
Jérémy DEMEULE
EPITA - SIGL Promotion 2005

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 01 Feb 2007 00:45

404
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DJ_Mulder
New Cone
New Cone
Posts: 6
Joined: 24 Jan 2007 21:55

Postby DJ_Mulder » 01 Feb 2007 01:08

Fixed
Jérémy DEMEULE
EPITA - SIGL Promotion 2005

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 01 Feb 2007 23:43

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
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 02 Feb 2007 00:33

Oki. I made a few fix, cleaning, and configure.ac.

Here is the new patch
http://www.jbkempf.com/~jb/vlc/sharpen.patch
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 04 Feb 2007 23:31

The filter has been submitted to trunk.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

neXus
Blank Cone
Blank Cone
Posts: 19
Joined: 23 Jun 2006 01:03

Postby neXus » 05 Feb 2007 22:55

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 05 Feb 2007 23:29

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.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DJ_Mulder
New Cone
New Cone
Posts: 6
Joined: 24 Jan 2007 21:55

Postby DJ_Mulder » 06 Feb 2007 22:15

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?
Jérémy DEMEULE
EPITA - SIGL Promotion 2005

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 06 Feb 2007 22:25

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 ? :D
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

DJ_Mulder
New Cone
New Cone
Posts: 6
Joined: 24 Jan 2007 21:55

Postby DJ_Mulder » 06 Feb 2007 23:56

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.
Jérémy DEMEULE
EPITA - SIGL Promotion 2005

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 07 Feb 2007 00:02

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 ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

cocquebert
Blank Cone
Blank Cone
Posts: 15
Joined: 14 Mar 2006 09:39

Postby cocquebert » 07 Feb 2007 09:38

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 ...)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Postby Jean-Baptiste Kempf » 07 Feb 2007 09:57

Well, ask dionoea or on the mailing list. The main idea is that vfilter2 can be in the transcoding chain.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 6 guests