Postprocessing in XBMC

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Ed76 Offline
Senior Member
Posts: 128
Joined: Oct 2012
Reputation: 1
Location: Germany
Post: #1
are there any plans to add real postprocessing to xbmc (14)? one way would be support of ffdshow but that seems complicated/impossible. another option would be to add shader support like it is done in mpc-hc. at the moment i mostly miss a good sharpen filter.....
(This post was last modified: 2014-02-13 16:39 by Ed76.)
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #2
an LoG for example can be easily implemented in our renderer - volunteers ahead :-)
find quote
steelman1991 Offline
Donor
Posts: 2,420
Joined: Jan 2009
Reputation: 10
Post: #3
(2014-02-13 16:39)Ed76 Wrote:  are there any plans to add real postprocessing to xbmc (14)? one way would be support of ffdshow but that seems complicated/impossible. another option would be to add shader support like it is done in mpc-hc. at the moment i mostly miss a good sharpen filter.....

Try DSPlayer
find quote
Ed76 Offline
Senior Member
Posts: 128
Joined: Oct 2012
Reputation: 1
Location: Germany
Post: #4
(2014-02-13 21:55)fritsch Wrote:  an LoG for example can be easily implemented in our renderer - volunteers ahead :-)

what is a LoG?


i know dsplayer but this isnt working very good/stable for livetv/pvr or other internet streams
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #5
Laplacian of Gaussian - it's a default filter in image processing which can be easily implemented by combining a Laplace Filter (second derivation) with a gaussian smooth filter, which has a symmetric kernel so it can be implemented separable.

Google "Mexican Hat" :-)
find quote
Ed76 Offline
Senior Member
Posts: 128
Joined: Oct 2012
Reputation: 1
Location: Germany
Post: #6
sorry, dont understand that. to complicated. i only want to know if its possible or planed to implement shader support (for instance sharpen complex 2 or other shaders).
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #7
Possible yes.

I implemented a swfilter infrastructure together with FernetMenta - on linux though - we currently use this to do yadif deinterlacing - though decoding with vaapi. In this filter chain we can easily integrate such filters. Best are those ffmpeg already has.

Check those: http://www.ffmpeg.org/ffmpeg-filters.html
(This post was last modified: 2014-02-13 23:15 by fritsch.)
find quote
Ed76 Offline
Senior Member
Posts: 128
Joined: Oct 2012
Reputation: 1
Location: Germany
Post: #8
hi fritsch,
every posibillity to postprocessing/sharpen is welcome. from the list you give i would say "unsharp" should be the right one. the "unsharp mask" filter within ffdshow is a good one, i dont know if its the same than the ffmpeg one. one of the best sharpen filters is sharpen complex 2 (mpc-hc). the postprocessing system within mpc-hc is very good (combine shaders, post-, pre-resize shaders).
find quote
StinDaWg Offline
Fan
Posts: 542
Joined: Jul 2011
Reputation: 1
Post: #9
Sharpen complex 2 is too strong IMO. It's too artificially sharp rather than subtle. Regular sharpen complex is alright. I prefer to do a luma sharpen in ffdshow resize instead. Lanczos 4 with 0.5 luma sharpen.
(This post was last modified: 2014-02-17 04:32 by StinDaWg.)
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #10
:-) I see we have a lot of experts. So - let's see for gotham +1. What we can do. I also plan on integrating the BBC deinterlacer, which has hit ffmpeg in 2.x. I already tested it and the quality is really nice - but - expect a core i7 to actually run it.
find quote
Ed76 Offline
Senior Member
Posts: 128
Joined: Oct 2012
Reputation: 1
Location: Germany
Post: #11
(2014-02-17 04:31)StinDaWg Wrote:  Sharpen complex 2 is too strong IMO. It's too artificially sharp rather than subtle. Regular sharpen complex is alright. I prefer to do a luma sharpen in ffdshow resize instead. Lanczos 4 with 0.5 luma sharpen.

yes, by default. but sharpen complex 2 is a kind of "advanced unshap masking filter" (like asharp in ffdshow) in combination with another sharping method. you can open the shader-file with a txt-editor. there are 4 different parameters that influence the kind and strongness of sharpen. the paramter for "strongness" is set to 2, and thats to much, i agree. but you can lower that...
a general problem if you use a sharpen filter - its hard to find one value for all kind of video marterials. i use ffdshow, so i can use a different "sharpen strongness" for sd, hd, avi/xvid. so the most perfect way to implement such (sharpen) shaders would be "rule based" (video input resolution).
find quote
StinDaWg Offline
Fan
Posts: 542
Joined: Jul 2011
Reputation: 1
Post: #12
(2014-02-17 10:22)Ed76 Wrote:  a general problem if you use a sharpen filter - its hard to find one value for all kind of video marterials. i use ffdshow, so i can use a different "sharpen strongness" for sd, hd, avi/xvid. so the most perfect way to implement such (sharpen) shaders would be "rule based" (video input resolution).
Yup, this is what I do too. SD content doesn't get sharpened as much as 720p because the source is crappy to begin with. A good 720p video upscaled can look near 1080p quality if done right.

I wish I didn't have to use DSPlayer or launch MPC-HC, but it's the only way to get acceptable quality IMO. The debanding filter also works wonders for a lot of content.
(This post was last modified: 2014-02-18 14:01 by StinDaWg.)
find quote
fritsch Offline
Team-XBMC Developer
Posts: 5,479
Joined: Aug 2011
Reputation: 129
Location: Karlsruhe
Post: #13
Please, someone with clue adds a first PR. I will jump in and do the rest. Also be aware that xbmc has more stages then just decode filter. Especially the render which does the upscaling needs to be taken into account.

And for the rest. We have all read Image Processing by Gonzalez et. al. - so let's do less bikeshedding and more start to improve xbmc code.

I won't have any chance to look at it prior to gotham is out. Quite full with other things.
find quote