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 Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th June 2021, 15:26   #321  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Does anyone know what kind of convolution this theory applies to? It sounds to me as repair(mode=2) but I don't know, he also talks about a 2x2 window, how is that, should conv kernels be odd?

Quote:
Originally Posted by madshi View Post
First of all the contributors need to be sorted. The contributor which is nearest to the "center" (usually gets the highest weight) should be first in the list etc. The list should be sorted for distance to the center and not for weight. The sorted contributor list makes it easy to apply special processing to the "main contributors".
(...)
Hmmmmm... I didn't know the "Repair" filter. Seems that it uses the same concept, but it's not as well optimized for the specific case, I think. E.g. from what I've just read, "Repair" always compares 3x3 pixels. From my tests that's a good general purpose solution, but maybe not the best solution specifically for scaling. For upscaling I'm only comparing 2x2 pixels (those which are nearer to the "center"). For downscaling it can be more than 3x3 pixels, depending on the scale factor.

Or in short: The algorithm I described is custom tailored to "contributor" based resampling algorithms, by making use of the information in the contributor list. I think this should result in slightly superior quality because exactly those pixels are compared which are the main contributors to the final destination pixel. If we compare too many or not enough pixels, the algorithm should get a bit less effective (e.g. miss some ringing or misdetect ringing).
Here my attempt:

Code:
str = Format("y[-1,1] A^ y[0,1] B^ y[1,1] C^ y[-1,0] D^ y[1,0] F^ y[-1,-1] G^ y[0,-1] H^ y[1,-1] I^ x[0,0] J^"  \
            +" J 1 - K^ K A - abs K B - abs < A B ? L^ K C - abs K D - abs < C D ? M^ K F - abs K G - abs < F G ? N^ K H - abs K I - abs < H I ? O^" \
            +"                                         K L - abs K M - abs < L M ? P^ K N - abs K O - abs < N O ? Q^                               " \
            +"                                                   K P - abs K Q - abs < P Q ? R^                                                    " \
            +" J 1 + K^ K A - abs K B - abs < A B ? L^ K C - abs K D - abs < C D ? M^ K F - abs K G - abs < F G ? N^ K H - abs K I - abs < H I ? O^" \
            +"                                         K L - abs K M - abs < L M ? P^ K N - abs K O - abs < N O ? Q^                               " \
            +"                                                   K P - abs K Q - abs < P Q ? S^                                                    " \
            +"                                                             J R S clip                                                              " )
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th June 2021, 15:29   #322  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
Also is there any jpeg source filter for avs+ x64 like jpegsource that lets you load the image in original format (YUV) rather than convert it to RGB?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 7th June 2021, 21:06   #323  |  Link
zorr
Registered User
 
Join Date: Mar 2018
Posts: 447
Quote:
Originally Posted by Dogway View Post
he also talks about a 2x2 window, how is that, should conv kernels be odd?
Not sure but 2x2 and scaling reminds me of bilinear interpolation.
zorr is offline   Reply With Quote
Old 7th June 2021, 21:38   #324  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
Quote:
Originally Posted by Dogway View Post
Also is there any jpeg source filter for avs+ x64 like jpegsource that lets you load the image in original format (YUV) rather than convert it to RGB?
FFImageSource and LWLibavVideoSource can.
Reel.Deel is offline   Reply With Quote
Old 9th June 2021, 01:48   #325  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
SmoothUV2 now add back SSHiQ from old SmoothUV
https://github.com/Asd-g/AviSynth-SmoothUV2/releases
kedautinh12 is offline   Reply With Quote
Old 13th July 2021, 14:03   #326  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 744
Hello, the tritical's TUnsharp plugin does not work in HBD, is there a possibility to solve this situation?
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 13th July 2021 at 14:10.
GMJCZP is offline   Reply With Quote
Old 13th July 2021, 14:42   #327  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
TUnsharp now don't support HBD. Need some one add support HBD
kedautinh12 is offline   Reply With Quote
Old 25th July 2021, 00:12   #328  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,361
I'm not sure that TemporalRepair is working as expected. modes 1, 2, and 3 barely do anything. I ported them to ex_repair and visually they clearly try to recover detail, unless I got the source code wrong.

Code:
RG_FORCEINLINE void get_lu_c(int& lower, int& upper, int src_prev, int src_curr, int src_next)
{
  auto max_np = std::max(src_next, src_prev);
  auto min_np = std::min(src_next, src_prev);
  upper = subs_c(max_np, src_curr);
  lower = subs_c(src_curr, min_np);
}

RG_FORCEINLINE int SmoothTRepair1_c(int dest, int lower, int upper, const int src_prev, const int src_curr, const int src_next)
{
  auto src_dest = dest;

  auto tmp_u = adds_c(upper, src_curr);
  auto tmp_l = subs_c(src_curr, lower);

  auto tmp_max = std::max(std::max(tmp_u, src_prev), src_next);
  auto tmp_min = std::min(std::min(tmp_l, src_prev), src_next);

  auto result = clip(src_dest, tmp_min, tmp_max);

  return result;
}

RG_FORCEINLINE int temporal_repair_processor_mode1_8_c(
  BYTE* dp,
  const BYTE* previous, const intptr_t pfpitch,
  const BYTE* sp, const intptr_t ofpitch,
  const BYTE* next, const intptr_t nfpitch
)
{
  int lowermax, uppermax;
  int lower, upper;
  get_lu_c(lowermax, uppermax, previous[-1 * pfpitch - 1], sp[-1 * ofpitch - 1], next[-1 * nfpitch - 1]);
  get_lu_c(lower, upper, previous[-1 * pfpitch + 0], sp[-1 * ofpitch + 0], next[-1 * nfpitch + 0]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  get_lu_c(lower, upper, previous[-1 * pfpitch + 1], sp[-1 * ofpitch + 1], next[-1 * nfpitch + 1]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  get_lu_c(lower, upper, previous[1 * pfpitch - 1], sp[1 * ofpitch - 1], next[1 * nfpitch - 1]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  get_lu_c(lower, upper, previous[1 * pfpitch + 0], sp[1 * ofpitch + 0], next[1 * nfpitch + 0]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  get_lu_c(lower, upper, previous[1 * pfpitch + 1], sp[1 * ofpitch + 1], next[1 * nfpitch + 1]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  get_lu_c(lower, upper, previous[0 * pfpitch - 1], sp[0 * ofpitch - 1], next[0 * nfpitch - 1]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  get_lu_c(lower, upper, previous[0 * pfpitch + 1], sp[0 * ofpitch + 1], next[0 * nfpitch + 1]);
  uppermax = std::max(uppermax, upper);
  lowermax = std::max(lowermax, lower);
  return SmoothTRepair1_c(dp[0], lowermax, uppermax, previous[0 * pfpitch + 0], sp[0 * ofpitch + 0], next[0 * nfpitch + 0]);
I understand that "sp[-1 * ofpitch - 1]" means "x[-1,-1]" otherwise my (unoptimized) expression is wrong:
Code:
y[-1,-1] z[-1,-1] max x[-1,-1] - U^
x[-1,-1] y[-1,-1] z[-1,-1] min - L^
y[-1,0] z[-1,0] max x[-1,0] - V^
x[-1,0] y[-1,0] z[-1,0] min - M^
U V max U^ L M max L^
y[-1,1] z[-1,1] max x[-1,1] - V^
x[-1,1] y[-1,1] z[-1,1] min - M^
U V max U^ L M max L^
y[1,-1] z[-1,-1] max x[1,-1] - V^
x[1,-1] y[-1,-1] z[1,-1] min - M^
U V max U^ L M max L^
y[1,0] z[1,0] max x[1,0] - V^
x[1,0] y[1,0] z[1,0] min - M^
U V max U^ L M max L^
y[1,1] z[1,1] max x[1,1] - V^
x[1,1] y[1,1] z[1,1] min - M^
U V max U^ L M max L^
y[0,-1] z[0,-1] max x[0,-1] - V^
x[0,-1] y[0,-1] z[0,-1] min - M^
U V max U^ L M max L^
y[0,1] z[0,1] max x[0,1] - V^
x[0,1] y[0,1] z[0,1] min - M^
U V max U^ L M max L^

x[0,0] U + y[0,0] max z[0,0] max
x[0,0] L - y[0,0] min z[0,0] min
a swap2 clip
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 15th August 2021, 17:11   #329  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
EEDI2CUDA ported from Vapoursynth
https://github.com/AmusementClub/Vap...ment-899069883
kedautinh12 is offline   Reply With Quote
Old 16th August 2021, 13:14   #330  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
EEDI2CUDA now have x86 ver
https://github.com/AmusementClub/Vap...uns/1135300628
kedautinh12 is offline   Reply With Quote
Old 9th September 2021, 15:04   #331  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
New fork frfun7 from pinterf, but still don't have HBD
https://github.com/pinterf/Frfun7/releases
kedautinh12 is offline   Reply With Quote
Old 8th October 2021, 08:00   #332  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
since there are no issues tab in https://github.com/pinterf/Average I will report it here

as said here, Average seems not work with avs+ native array


don't know if it can be updated without break compatibility
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 8th October 2021, 11:44   #333  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
New version: Average.
https://github.com/pinterf/Average/releases/tag/0.95
Code:
v0.95 (20211008)
- add AVX2 routines
- accept parameter as a nested array stuffed into the first parameter (AVS 3.7.1)
- pass over frame properties if any
- Source: update to VS2019, clang-cl option, gcc friendly
- add CMake build environment, linux build instructions
pinterf is offline   Reply With Quote
Old 8th October 2021, 12:06   #334  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
thanks! seems work fine
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 29th June 2022, 05:40   #335  |  Link
Julek
Registered User
 
Julek's Avatar
 
Join Date: Dec 2020
Posts: 88
About Checkmate plugin: I wanted to point out that the wiki shows 5 as the default tthr2 but it seems that the correct is 0.
__________________
CPU: AMD 3700X | GPU: RTX 3070Ti | RAM: 32GB 3200MHz
GitHub
Julek is offline   Reply With Quote
Reply


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 20:27.


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