View Single Post
Old 7th April 2012, 19:07   #2  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
You upsample from 1920 to 1920*1.4, do a limited sharpening there, then upsample from 1920*1.4 to 1920*1.6, to then let it get downscaled again?

Kind of interesting, but not very efficient.


For realtime sharpening (of HQ sources) upon playback, somehow the following code has crept into my Avisynth tab:

Code:
some_video

sD = mt_lutxy(last,last.removegrain(11,-1).removegrain(4,-1),
 \   "128 x y - abs 1.49 / 1 1.25 / ^ 3.49 * x y - x y - abs 0.001 + / * +",U=1,V=1)
#                                     ^^^^                                          # 1.0 ~ 9.876
last.mt_adddiff(sD,U=2,V=2)
last.mt_makediff(sD.mt_lut("x 128 - 1.00 * 128 +").removegrain(20,-1),U=2,V=2) # or 11 instead of 20
#                                   ^^^^                                      # 0.5 ~ 1.5

# Similar to XSharpen, but more passive
mt_lutxy(last,last.removegrain(20,-1),"x x y - 9.9 * +",U=2,V=2)
 \.repair(last,12,0).mergeluma(last,0.801) # 1.0-strength
It could be named with impressing buzzwords like "Highpass Sharpening" or even "Energy-conserving Sharpening", but the acc. function I've simply named "FineSharpen". (Not quite finished, Im unsure which knobs to expose and which not. Don't want to make a 20-parameters-monster when in fact it's such a simple operation.)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote