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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 15th March 2017, 02:19   #3141  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Motenai Yoda View Post
Looks like someone has to add Is400()/IsYXX or mod IsY() to return true with 8+ Y-only clips too.
there are already isy()
__________________
See My Avisynth Stuff
real.finder is offline  
Old 15th March 2017, 21:35   #3142  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
Quote:
Originally Posted by real.finder View Post
there are already isy()
Code:
converttoy()
converttofloat()
subtitle(PixelType().string()+" "+isY().string())
convertbits(32)
subtitle(PixelType().string()+" "+isY().string(),y=16)
convertbits(16)
subtitle(PixelType().string()+" "+isY().string(),y=32)
convertbits(14)
subtitle(PixelType().string()+" "+isY().string(),y=48)
convertbits(12)
subtitle(PixelType().string()+" "+isY().string(),y=64)
convertbits(10)
subtitle(PixelType().string()+" "+isY().string(),y=80)
convertbits(8)
subtitle(PixelType().string()+"   "+isY().string(),y=96)
what did it return to you?

I'll give you an hint...
__________________
powered by Google Translator

Last edited by Motenai Yoda; 15th March 2017 at 21:43.
Motenai Yoda is offline  
Old 15th March 2017, 23:42   #3143  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Motenai Yoda View Post
Code:
converttoy()
converttofloat()
subtitle(PixelType().string()+" "+isY().string())
convertbits(32)
subtitle(PixelType().string()+" "+isY().string(),y=16)
convertbits(16)
subtitle(PixelType().string()+" "+isY().string(),y=32)
convertbits(14)
subtitle(PixelType().string()+" "+isY().string(),y=48)
convertbits(12)
subtitle(PixelType().string()+" "+isY().string(),y=64)
convertbits(10)
subtitle(PixelType().string()+" "+isY().string(),y=80)
convertbits(8)
subtitle(PixelType().string()+"   "+isY().string(),y=96)
what did it return to you?

I'll give you an hint...
there are bug then
__________________
See My Avisynth Stuff
real.finder is offline  
Old 16th March 2017, 08:49   #3144  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Thanks for the report. Fix will come soon. Only the script function was affected, VideoInfo::IsY was O.K.
pinterf is offline  
Old 16th March 2017, 13:33   #3145  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by pinterf View Post
- Dithering: Floyd-Steinberg
Use ConvertBits with parameter dither=1: Floyd-Steinberg (was: dither=0 for ordered dither)
- Dithering: parameter "dither_bits"
For dithering to lower bit depths than the target clip format
Usage: ConvertBits(x, dither=n [, dither_bits=y])
- ordered dither: dither_bits 2, 4, 6, ... but maximum difference between target bitdepth and dither_bits is 8
- Floyd-Steinberg: dither_bits 1, 2, 4, 6, ... up to target bitdepth - 2
(Avisynth+ low bitdepth, Windows 3.1 16 bit feeling I was astonished that dither_bits=6 still resulted in a quite usable image)
- Dithering is allowed from 10-16 -> 10-16 bits (was: only 8 bit targets)
- Dithering is allowed while keeping original bit-depth. clip10 = clip10.ConvertBits(10, dither=0, dither_bits=8)
(you still cannot dither from 8 or 32 bit source)
@real.finder is it of any use in SMDegrain instead of Dither dll?
__________________
@turment on Telegram
tormento is offline  
Old 16th March 2017, 16:37   #3146  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
New Avisynth build.

Avisynth+ r2455-MT

Code:
v2455 (20170316), changes since v2440
-------------------------------------
# Fixes
  IsY() script function returned IsY8() (VideoInfo::IsY was not affected)

# other modification, additions
  ConvertBits, dither=1 (Floyd-Steinberg): allow any dither_bits value between 0 and 8 (0=b/w)
Thanks to Motenai Yoda for the IsY bug report.

Last edited by pinterf; 16th March 2017 at 17:37. Reason: Edit: Quick 2454->2455, dither_bits=0 for 10->10 bits now work
pinterf is offline  
Old 16th March 2017, 17:05   #3147  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
err... I don't know if it's a bug but
dither=1 to ie 2 bits give 0-64-128-192-255 -> 5 shades
__________________
powered by Google Translator
Motenai Yoda is offline  
Old 16th March 2017, 17:39   #3148  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Sorry, quickly replaced 2454 to 2455, dither=1, dither_bits=any_less_than_8 did not work for 10 bits->10 bits conversion.
pinterf is offline  
Old 16th March 2017, 17:55   #3149  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by Motenai Yoda View Post
err... I don't know if it's a bug but
dither=1 to ie 2 bits give 0-64-128-192-255 -> 5 shades
Yes, I was also expecting exactly 2^N levels for Floyd, and don't know the reason yet. I extended dither_bits for any <8 bit values to experiment what it looks like after seeing that dither_bits=1 gave me three histogram spikes.
dither_bits=0 -> 2 levels
dither_bits=1 -> 3 levels
dither_bits=2 -> 5 levels
dither_bits=3 -> 9 levels
pinterf is offline  
Old 16th March 2017, 22:47   #3150  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
@real.finder is it of any use in SMDegrain instead of Dither dll?
no, no convert will done, input = output, but you can do it by your self, there are no need for dither dll without lsb in first place
__________________
See My Avisynth Stuff
real.finder is offline  
Old 16th March 2017, 23:25   #3151  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
I HATE YOU ALL

The baked code related to PClip doesn't error out if AVS_Linkage is null. Instead it does nothing. This means that if a PClip (and probably most other objects too) is constructed with null linkage it'll consist of uninitialized memory and will most likely crash if the linkage is set later.

Just crash immediately if this happens, you'll save the world a lot of bugs that way.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now  
Old 17th March 2017, 07:26   #3152  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by real.finder View Post
no, no convert will done, input = output, but you can do it by your self, there are no need for dither dll without lsb in first place
A bit cryptic to me.
__________________
@turment on Telegram
tormento is offline  
Old 17th March 2017, 07:42   #3153  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by tormento View Post
A bit cryptic to me.
convertbits(16)
SMDegrain()
convertbits(10,dither=1,dither_bits=8)
__________________
See My Avisynth Stuff
real.finder is offline  
Old 17th March 2017, 08:46   #3154  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Suddenly I am reminded of working in CoolEdit / Audition with Noise Shaping. Just visually now.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 17th March 2017, 09:51   #3155  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I just find this by chance https://github.com/DJATOM/TCPDeliver/releases I put the link since there are no TCPDeliver in avs+
__________________
See My Avisynth Stuff
real.finder is offline  
Old 17th March 2017, 17:06   #3156  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
Quote:
Originally Posted by tormento View Post
A bit cryptic to me.
Sta senza pensieri. (cit)
__________________
powered by Google Translator
Motenai Yoda is offline  
Old 18th March 2017, 07:31   #3157  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 98
Quote:
Originally Posted by LigH View Post
Suddenly I am reminded of working in CoolEdit / Audition with Noise Shaping. Just visually now.
You could try fft3dfilter with "noise pattern" (shape). From the description of the filter:

Using noise pattern

Since v1.5 it is possible to get noise pattern (shape) by spectrum analysis of some empty block (without any objects), and then to reduce the noise with the same pattern in whole frame and in whole clip. It may be useful for removal of film (especially amateur 8 mm) grain and analog TV capture interference.
  • pframe - noise pattern frame number (default=false)
  • px - noise pattern block horizontal X position (default=0)
  • py - noise pattern block vertical Y position (default=0)
  • if px=px=0, then the pattern block is defined automatically with minimal power spectral density.
  • pshow - show noise pattern block and its properties (default=false)
  • pcutoff - noise pattern cutoff frequency (relative to max) (default=0.1)
  • pfactor - noise pattern denoise strength (0 to 1.0, default=0, this method disabled)

In order to use noise pattern method in place of ordinary (blind) method you must:
Firstly switch show mode pshow=true, and set some non-zero value pfactor=1.0.
Then select frame number and some block position, thus the block shown must not contain any objects beside typical noise pattern.
The switch off show mode pshow=false,
and set noise reduction strength, recomended value pfactor= 0.5 to 1.0.
The best windows type for this method is wintype=2.
The sigma and beta parameters are not used in this denoising method, but you can use this method in show mode pshow=true to estimate sigma value for ordinary denoising method (it is not strictly the same, but similar value).

Last edited by VS_Fan; 18th March 2017 at 07:36.
VS_Fan is offline  
Old 18th March 2017, 08:31   #3158  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Well, I just referred to working in high bit depth and finalizing with dithering.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 18th March 2017, 10:51   #3159  |  Link
videoFred
Registered User
 
videoFred's Avatar
 
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 689
Quote:
Originally Posted by pinterf View Post
Hi Fred, welcome to Avisynth+! I hope we'll solve your problems.
That's very kind, thank you in advance

Quote:
Can you check that you don't have another Prefetch somewhere else (for example in an imported avsi)?
No other Prefetch in the script itself and also not in imported avsi files, but I have found the problem. My script is using a function to select the different results with a AvsPmod slider. And here is the problem: with MT enabled I get the "prefetch" error message when selecting another result. So I have to disable MT, then select another result, then enable MT again.

Please try this script and you will get the error message too.

Code:
result = (selectresult([<"select result", 0, 3, 1>])) #function selectresult() see end of script

SetFilterMTMode("DEFAULT_MT_MODE", 2)

source= AviSource("Z:\VDP\VdP_Sp2.avi")

A = source
B = source.tweak(sat=2.0)
C = source.converttoRGB().GamMac()
D = source.sharpen(1.0)

eval(result)

[Multi Tasking=0]
Prefetch(4)
[/Multi Tasking]


function selectresult(int index)
{
return Select(index,"A","B","C","D")
}
For some reason prefetch must be called twice when switching results. But only with the r452 version of AvsPmod. It works fine with AvsPmod v2.5.1

Fred.
__________________
About 8mm film:
http://www.super-8.be
Film Transfer Tutorial and example clips:
https://www.youtube.com/watch?v=W4QBsWXKuV8
More Example clips:
http://www.vimeo.com/user678523/videos/sort:newest
videoFred is offline  
Old 21st March 2017, 10:27   #3160  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Fred, I cannot help you with that at the moment.

Is there anybody out there who can tell that the compilation of the existing AvsPmod project is easy and straightforward?

Now I have some work with masktools, then it seems that there are still a couple of things to investigate.
- Scriptclip mt behaviour
- vdubfilter (deshaker issue at exit)
- PClip thing, that Myrsloik has kindly noticed and possibly presented him some happy hours and turned his hair grey.
- avspmod
...zimg
pinterf is offline  
Closed Thread

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 19:37.


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