Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th March 2021, 14:53   #21  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
seems it has missing some asm functions so I couldn't build it
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th March 2021, 05:14   #22  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by real.finder View Post
seems it has missing some asm functions so I couldn't build it
Thanks for trying. Today Asd built the binaries and put them up on http://avisynth.nl/index.php/AviSynth%2B_x64_plugins

Asd
Reel.Deel is offline   Reply With Quote
Old 10th March 2021, 09:15   #23  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
How did you come to know about it?
pinterf is offline   Reply With Quote
Old 10th March 2021, 16:13   #24  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,565
Quote:
Originally Posted by Reel.Deel View Post
Thanks for trying. Today Asd built the binaries and put them up on
Is the UnsharpHQmod filter? I can't find any other.
__________________
@turment on Telegram
tormento is online now   Reply With Quote
Old 10th March 2021, 18:39   #25  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by pinterf View Post
How did you come to know about it?
About the plugin or the binaries that Asd uploaded?

Quote:
Originally Posted by tormento View Post
Is the UnsharpHQmod filter? I can't find any other.
Yes, UnsharpHQmod is the filter.
Reel.Deel is offline   Reply With Quote
Old 10th March 2021, 20:49   #26  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Hopefully of use to someone. I did a google translate of a couple of files from the zip.

unsharpHQmod.txt
Code:
/*
	UnsharpHQ ver 0.5
	Copyright (c) 2011-2014, Lucas De Lio (lucasdelio@gmail.com).
	mod by 299792458m

	This file is part of UnsharpHQ.

    UnsharpHQ is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    UnsharpHQ is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with UnsharpHQ.  If not, see <http://www.gnu.org/licenses/>.
*/

UnsharpHQ is a video plugin for Avisytnh 2.5x.

	REQUIRES
* YUV colorspace input.
* optimize for SSE2/AVX capable CPU.

	USAGE
UnsharpHQ(int THRESHOLD,float SHARPSTR,float SMOOTH,bool SHOW)

	PARAMETERS
(All parameters are optional).
* THRESHOLD: (Default = 20)  The value to determine whether or not to sharp a pixel based on the luminance change between their neighbors. Any value >0 can be used.
* SHARPSTR : (Default = 4.0) The sharp strength for the pixels to be sharped. Values from 2 to 10 are recommended.
* SMOOTH   : (Default = 0.5) The smooth strength to pixels not sharped. Use this with 0 if you don't want any smooth, or just leave it with default.
* SHOW   : (Default = false) The debug or not parameter. Set this to true will show a green video showing the zones to be sharped or not, this is useful to adjust your threshold to your right value.

	EXAMPLES
Unsharphq()           #All by default, this is useful in most cases.
Unsharphq(20,15.0)    #Very strong sharp.
Unsharphq(debug=true) #Run in debug mode.


--------------------------------------------------------------------------
mod by 299792458m

mod 181224	いろいろ
mod 190119	ループの範囲を修正
			補正重みを4→8に(これによりmode0でも出力が微妙に変更される)
			mode1での補正重みを中央点と8近傍の差分がTHRESHOLDの時に1になるように修正
mod 200816	Avisynth2.6+化
			HBD(8-16 YUVのみ)対応+AVX2最適化
			HBD時のshowを無効化
			asmのintrinsic化



modのメモ
* MODE	:0(従来相当のはず)
		:1 mod版で追加 パラメータの効果が変わるので分けてる
* SHOW	:いまいち使い方がわからないのでHBDではちゃんとした対応をしていない
* OPT	:0=auto 1=compiler optimazation 2:SSE2 3:AVX2
		
元々の仕様説明
■8近傍点からフィルタをかける
- - i - -
- j - k -
l - X - m
- n - o -
- - p - -

dst=org + funcion[diff] *(org-avr)/ocho;
(より正確にはdst=( org*(ocho + funcion[diff]) - avr*funcion[diff]) )/ocho;)
 ocho:重み 内部で4が使われている→8に変更(以前のバージョンでは16だったらしい)
 diff=sum(|X-y|) y=i,j,k,..p
 avr=sum(y)/8 y=i,j,k,..p

■funcion[]という差分→係数の変換テーブルを持っている
funcion[i]=A*atan((i-giro)/curv)+S;  i=0..255
 giro=thresh(フィルタオプションの)
 curv=30(内部係数)
 A,S:(atanMIN,atanMAX) →(MIN,MAX)の線形写像の係数
 MIN= -SMOOTH-1;
 MAX= SHARPSTR+1;


>>>>>>>>>>>>>>>>>>>>>>>>>>> Translate
mod by 299792458m

mod 181224 Various
mod 190119 Fixed loop range
Correction weight changed from 4 to 8 (this causes the output to change slightly even in mode0)
Corrected the correction weight in mode1 so that the difference between the center point and the vicinity of 8 becomes 1 when THRESHOLD.
mod 200816 Avisynth 2.6+
HBD (8-16 YUV only) compatible + AVX2 optimization
Disable show during HBD
asm intrinsic

mod notes
* MODE: 0 (should be equivalent to conventional)
The effect of the additional parameters changes in the 1 mod version, so they are separated.
* SHOW: I don't know how to use it, so HBD doesn't support it properly.
* OPT: 0 = auto 1 = compiler optimazation 2: SSE2 3: AVX2
.
Original specification description
■ 8 Filter from nearby points
- - i - -
- j - k -
l - X - m
- n - o -
- - p - -
dst = org + funcion [diff] * (org-avr) / ocho ;
(More precisely, dst = (org * (ocho + funcion [diff]) --avr * funcion [diff])) / ocho;)
 ocho: 4 is used inside the weight → changed to 8 (it seems that it was 16 in the previous version)
 diff = sum (| X-y |) y = i, j, k, ..p
 avr = sum (y) / 8 y = i, j, k, ..p


■ It has a conversion table of difference → coefficient called funcion []
funcion [i] = A * atan ((i-giro) / curv) + S; i = 0.255
 giro = thresh (filter option)
 curv = 30 (internal coefficient)
 A, S: (atanMIN, atanMAX) → (MIN, MAX) linear map coefficient
 MIN = -SMOOTH-1;
 MAX = SHARPSTR + 1;
EDIT: Fixed formatting in above like so [Spaces had been converted to hyphens by translate]
Code:
■ 8 Filter from nearby points
- - i - -
- j - k -
l - X - m
- n - o -
- - p - -

README.md [ Edit: I dont know that *.md (markup description, maybe), It may not display correctly in md viewer ]
Code:
# UnsharpHQmod
a fork of list's UnsharpHQ  
  UnsharpHQ is a video plugin for Avisynth

## PARAMETERS
(All parameters are optional).
* THRESHOLD: (Default = 20)  The value to determine whether or not to sharp a pixel based on the luminance change between their neighbors. Any value >0 can be used.
* SHARPSTR : (Default = 4.0) The sharp strength for the pixels to be sharped. Values from 2 to 10 are recommended.
* SMOOTH   : (Default = 0.5) The smooth strength to pixels not sharped. Use this with 0 if you don't want any smooth, or just leave it with default.

	EXAMPLES
Unsharphq()           #All by default, this is useful in most cases.
Unsharphq(20,15.0)    #Very strong sharp.
--------------------------------------------------------------------------
### modのメモ
UnsharpHQ(THRESHOLD=64,SHARPSTR=2.5,SMOOTH=0,mode=1) #weak sharp I use like this
#### added and changed parameters
* MODE	:0 default(従来相当)  
	:1 addded in mod(threshold, sharpstr,smooth parameter effects are little bit changed in this mode)  
	at this mode,  SMOOTH=0 is good choice!  
	mod版で追加 パラメータの効果が変わるので分けてる
* SHOW	:may not work... いまいち使い方がわからないのでHBDではちゃんとした対応をしていない opt=1の時のみ対応
* OPT	:optimization 最適化 0=auto 1=C 2:SSE2 3:AVX2
		
### 変更履歴 mod by 299792458m
- mod 200816
  - Avisynth2.6+化
  - HBD(8-16 YUVのみ)対応+AVX2最適化、パラメータにopt追加
  - asmのintrinsic化
- mod 190119
  - ループの範囲を修正
  - 補正重みを4→8に(これによりmode0でも出力が微妙に変更される)
  - Mode1での補正重みを中央点と8近傍の差分がTHRESHOLDの時に1になるように修正
- mod 181224	いろいろ


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Translation

### mod notes
UnsharpHQ (THRESHOLD = 64, SHARPSTR = 2.5, SMOOTH = 0, mode = 1) #weak sharp I use like this
#### added and changed parameters
* MODE: 0 default (conventional equivalent)
1 addedded in mod (threshold, sharpstr, smooth parameter effects are little bit changed in this mode)
at this mode, SMOOTH = 0 is good choice!
Since the effect of the additional parameter changes in the mod version, it is divided
* SHOW: may not work ... I don't know how to use it, so HBD doesn't support it properly. Only when opt = 1.
* OPT: optimization optimization 0 = auto 1 = C 2: SSE2 3: AVX2

### Change history mod by 299792458m
--mod 200816
  --Avisynth 2.6+ conversion
  --HBD (8-16 YUV only) compatible + AVX2 optimization, opt added to parameters
  --asm intrinsic
--mod 190119
  --Fixed loop range
  --Correction weight changed from 4 to 8 (This slightly changes the output even in mode0)
  --Corrected the correction weight in Mode 1 so that the difference between the center point and the vicinity of 8 becomes 1 when THRESHOLD.
--mod 181224 Various
EDIT: Method:- https://forum.doom9.org/showthread.p...07#post1899507
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 10th March 2021 at 21:36.
StainlessS is offline   Reply With Quote
Old 10th March 2021, 21:11   #27  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by Reel.Deel View Post
About the plugin or the binaries that Asd uploaded?.
About the fact that he took care of it. Though yes, one can check Asd's repo if it's ready yet. Luckily Asd is very a productive developer.
pinterf is offline   Reply With Quote
Old 10th March 2021, 22:25   #28  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by pinterf View Post
About the fact that he took care of it. Though yes, one can check Asd's repo if it's ready yet. Luckily Asd is very a productive developer.
Asd has updated a few plugins that are not on GitHub. I just happen to be fixing a few links on the wiki earlier and checked recent changes and saw that he added a link to UnsharpHQmod on the x64 page. Asd updated the link once again, now UnsharpHQmod passes frame properties .

Side note: Asd also compiled an updated Deblock from 299792458m that includes optimized code for 8-16bit input. Link to download is on the the wiki x64 plugins page.

Last edited by Reel.Deel; 10th March 2021 at 22:35.
Reel.Deel is offline   Reply With Quote
Old 10th March 2021, 23:16   #29  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by Reel.Deel View Post
Asd has updated a few plugins that are not on GitHub. I just happen to be fixing a few links on the wiki earlier and checked recent changes and saw that he added a link to UnsharpHQmod on the x64 page. Asd updated the link once again, now UnsharpHQmod passes frame properties .

Side note: Asd also compiled an updated Deblock from 299792458m that includes optimized code for 8-16bit input. Link to download is on the the wiki x64 plugins page.
I remember 299792458m who added some interesting SIMD parts to TIVTC which I did not have time to backport and reorganize a bit and test. Eventually, I forgot about it. Now I have put it in the queue for myself. The repo has been shown to me before probably by you?
pinterf is offline   Reply With Quote
Old 11th March 2021, 02:57   #30  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by pinterf View Post
I remember 299792458m who added some interesting SIMD parts to TIVTC which I did not have time to backport and reorganize a bit and test. Eventually, I forgot about it. Now I have put it in the queue for myself. The repo has been shown to me before probably by you?
Yep, back in April 2019.

I used to find a lot of the Japanese authors on 2ch, back when I started the x64 page on the wiki, a handful of plugins I found on 2ch, MVTools, NNEDI3, AWarpSharp2, etc.

Last edited by Reel.Deel; 11th March 2021 at 06:21.
Reel.Deel is offline   Reply With Quote
Reply

Tags
unsharphq filter avisynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:52.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.