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 5th April 2017, 01:02   #3201  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
I have Avisynth+ 1576 in my SysWOW64 directory. I open a script with just Version() in it in VirtualDub. It opens fine. I replace Avisynth.dll with the x86 DLL from Avisnth+ 2455. Now VirtualDub says import error. What stupid mistake am I making?

Win10 64

Thank you.
videoh is offline  
Old 5th April 2017, 02:09   #3202  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by videoh View Post
I have Avisynth+ 1576 in my SysWOW64 directory. I open a script with just Version() in it in VirtualDub. It opens fine. I replace Avisynth.dll with the x86 DLL from Avisnth+ 2455. Now VirtualDub says import error. What stupid mistake am I making?

Win10 64

Thank you.
Did you update the plugins with the new ones from the latest release?
Reel.Deel is offline  
Old 5th April 2017, 11:24   #3203  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
I just did now and it still fails.

Do you know how to do a clean install of 2455, i.e., what installer version should I use before copying over all the files.

Last edited by videoh; 5th April 2017 at 11:48.
videoh is offline  
Old 5th April 2017, 11:44   #3204  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
I cleaned everything out and installed Groucho's last installer for 2294, checking both x32 and x64. Loading version.avs in VirtualDub 64 works, loading it in VirtualDub 32 fails. Then, just replacing the x32 avisynth.dll with the r1576 makes x32 work again. Any ideas?

Last edited by videoh; 5th April 2017 at 11:47.
videoh is offline  
Old 5th April 2017, 11:48   #3205  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
videoh!
Try
https://forum.doom9.org/showthread.p...08#post1585008
and post log.
yup.
yup is offline  
Old 5th April 2017, 12:26   #3206  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
yup, you're my hero, thank you so much!

I didn't have the 32-bit runtime installed, only the x64 one.

EDIT: AOK now.

Last edited by videoh; 5th April 2017 at 20:34.
videoh is offline  
Old 5th April 2017, 12:40   #3207  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
videoh!
Installing avisynth tricky process .
yup.
yup is offline  
Old 5th April 2017, 18:13   #3208  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
@videoh, you might want to thank Groucho2004 too, is theguy that provided the app that sorted you, and same guy that you not so long ago barred from your forum for no concrete reason.

Mobile.
__________________
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 ???
StainlessS is offline  
Old 5th April 2017, 19:12   #3209  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
I try load 16 bit image (grey scale) to Avisynth+.
1. I prepare stacked version of image:
Code:
"C:\Program Files\ImageMagick-7.0.5-Q16\magick" "film7 1.tif" -depth 16 ( +clone -evaluate and 255 -evaluate multiply 256 ) -append stacked001.png
2. try load to Avisynth:
Code:
ImageSource("stacked001.png", start=1, end=1, use_DevIL=true, pixel_type ="RGB24")
ConvertToYV24()
ConvertFromStacked()
And do not see my image, if remove ConvertFromStacked I see stacked image.
yup.
yup is offline  
Old 6th April 2017, 07:56   #3210  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Converting each significant bit part in RGB representation to YUV does not result in each significant bits for the YUV representation. This is caused by the specific PC-affine color representation in different YUV color space matrices (8 bit integer per component, instead of floating point values).

Trivial case: You create an RGB image in 8 bit depth for the more significant half, and the less significant half is kept at $000000 (black in RGB). Converting this to YCbCr (Rec.601, TV scale) will return (16, 128, 128) as "TV black". Combining LSB and MSB to a 16-bit value now will result in garbage colors.

To do the conversion correctly, I believe you would first need to ConvertFromStacked(), and then ConvertToYUV... with 16 bit depth. But I am not sure if that is supported, and which functions are available if.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 6th April 2017 at 08:00.
LigH is offline  
Old 6th April 2017, 11:16   #3211  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Quote:
Originally Posted by LigH View Post
Converting each significant bit part in RGB representation to YUV does not result in each significant bits for the YUV representation. This is caused by the specific PC-affine color representation in different YUV color space matrices (8 bit integer per component, instead of floating point values).

Trivial case: You create an RGB image in 8 bit depth for the more significant half, and the less significant half is kept at $000000 (black in RGB). Converting this to YCbCr (Rec.601, TV scale) will return (16, 128, 128) as "TV black". Combining LSB and MSB to a 16-bit value now will result in garbage colors.

To do the conversion correctly, I believe you would first need to ConvertFromStacked(), and then ConvertToYUV... with 16 bit depth. But I am not sure if that is supported, and which functions are available if.
Easy way do not exist?
Right?
New Devil.dll, ImageSeq.dll in last avs+ builds do not support 16 bit?
yup.
yup is offline  
Old 6th April 2017, 12:09   #3212  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by yup View Post
I try load 16 bit image (grey scale) to Avisynth+.
1. I prepare stacked version of image:
Code:
"C:\Program Files\ImageMagick-7.0.5-Q16\magick" "film7 1.tif" -depth 16 ( +clone -evaluate and 255 -evaluate multiply 256 ) -append stacked001.png
2. try load to Avisynth:
Code:
ImageSource("stacked001.png", start=1, end=1, use_DevIL=true, pixel_type ="RGB24")
ConvertToYV24()
ConvertFromStacked()
And do not see my image, if remove ConvertFromStacked I see stacked image.
yup.
ConvertFromStacked cannot have RGB input, we have to play with lossless format conversions (data is unchanged, planes are copied as-is). Once we have YUV, we can use ConvertFromStacked, than go back to planar RGB.
At this stage we have the original 16 bit RGB, in planar RGB format (RGBP16).

You can convert it further if you wish.

This works for me
Code:
stacked_rgb24 = ImageSource("stacked001.png", start=1, end=1, use_DevIL=true, pixel_type ="RGB24")
stacked_fakeyuv = CombinePlanes(stacked_rgb24,"YUV","RGB","YV24")
fakeyuv16 = ConvertFromStacked(stacked_fakeyuv)
rgbp_16=CombinePlanes(fakeyuv16,"RGB","YUV","RGBP16")
#here we have 16 bit planar RGB
rgbp_16.ConvertToYUV444() # convert to YUV444P16
# or rgbp_16.ConvertToRGB64() # convert to packed RGB64
pinterf is offline  
Old 6th April 2017, 12:14   #3213  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
FFImageSource should load HBD without hack
__________________
See My Avisynth Stuff
real.finder is offline  
Old 6th April 2017, 14:23   #3214  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by real.finder View Post
FFImageSource should load HBD without hack
Not necessarily, FFMS2 v2.23.1 used SWScale and could not load HBD images. This issue affected both AVS+ and VS. I told Myrloik about it some time ago: https://github.com/FFMS/ffms2/issues/277

I have not tried it yet but the latest test version of FFMS2000 might support it since it has FFmpeg compiled with zlib.


@pinterf

Any plans to add HDB support to ImageReader/Writer? If I understand correctly Wilbert said he had already written the code for that: http://forum.doom9.org/showthread.ph...88#post1773088
Reel.Deel is offline  
Old 6th April 2017, 15:49   #3215  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by Reel.Deel View Post
@pinterf

Any plans to add HDB support to ImageReader/Writer? If I understand correctly Wilbert said he had already written the code for that: http://forum.doom9.org/showthread.ph...88#post1773088
It was forgotten, that was at the very beginning.

Wilbert's link needs authentication, anyway I have tried something quickly and this works fine for my 48 bit tiff sample.
Code:
ImageSource("img010.tif", start=1, end=1, use_DevIL=true, pixel_type ="RGB64") # or RGB48
A bit nicer that my previous stacked workaround.
pinterf is offline  
Old 6th April 2017, 17:51   #3216  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
pinterf!
I try Your first script:
Code:
stacked_rgb24 = ImageSource("stacked001.png", start=1, end=1, use_DevIL=true, pixel_type ="RGB24")
stacked_fakeyuv = CombinePlanes(stacked_rgb24,"YUV","RGB","YV24")
fakeyuv16 = ConvertFromStacked(stacked_fakeyuv)
rgbp_16=CombinePlanes(fakeyuv16,"RGB","YUV","RGBP16")
#here we have 16 bit planar RGB
rgbp_16.ConvertToYUV444() # convert to YUV444P16
# or rgbp_16.ConvertToRGB64() # convert to packed RGB64
Without success using shekh VirtualDub. Exist restriction for image size? My image (stacked) 6639x8062 pixels.
Second also not work, error about not support RGB48.
yup.

Last edited by yup; 6th April 2017 at 18:29.
yup is offline  
Old 6th April 2017, 18:28   #3217  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by yup View Post
pinterf!
I try Your first script:
[...]
Without success using shekh VirtualDub. Exist restriction for image size? My image (stacked) 6639x8062 pixels.
yup.
As a stress test, I set the a final size (not stacked) to 6640x8062. (my stacked size is 2320x6670)

One final frame (as RGB64) needs almost 500 MBytes.

I had to raise the default memory for 32 bit Avisynth+ (because Avisynth+ complained for low memory, default is 1GBytes), and when I have set it to 3000, then 32 bit Virtualdub was showing memory error (could not allocate x bytes)

In 64 bit virtualdub (and thus 64 bit Avisynth+), I was able to open and view the script (see below) producing rgb64 image.

Code:
SetMemoryMax(3000)
stacked_rgb24 = ImageSource("stacked001.png", start=1, end=1, use_DevIL=true, pixel_type ="RGB24").Loop(100)
stacked_fakeyuv = CombinePlanes(stacked_rgb24,"YUV","RGB","YV24")
fakeyuv16 = ConvertFromStacked(stacked_fakeyuv)
rgbp_16=CombinePlanes(fakeyuv16,"RGB","YUV","RGBP16")#.Histogram("levels",bits=11)
#here we have 16 bit planar RGB
rgbp_16.ConvertToRGB64()
#just to have a big input for virtualdub
Spline64Resize(6640,8062)
pinterf is offline  
Old 6th April 2017, 18:35   #3218  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
pinterf!
Work under avs+ 64 bit.
Problem loading 16 bit image solved.
How now organize conversion for KNLMeans plugin? ConvertToStacked?
yup.
yup is offline  
Old 6th April 2017, 18:52   #3219  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by yup View Post
pinterf!
Work under avs+ 64 bit.
Problem loading 16 bit image solved.
How now organize conversion for KNLMeans plugin? ConvertToStacked?
yup.
Probably yes, but you have to consider which format you are using.

Once you have the 16 bit/channel RGB clip, you can convert it to YUV444P16 with ConvertToYUV444(), then use ConvertToStacked, and you can feed it into KNLMeansCL (in YUV mode only Y channel is denoised by default).

Or you can leave the RGB clip in a fake_yuv format, convert to stacked, and request processing all Y, U and V planes. Then back to non-stacked, and back to RGB with CombinePlanes.

Remember that when using CombinePlanes we avoid the real RGB->YUV->RGB conversions (only format is changed), still we can feed the clip to the filter.

(I don't know if there is any difference in processing, depending on plane origin (Y or U or G, anything))
pinterf is offline  
Old 7th April 2017, 04:54   #3220  |  Link
yup
Registered User
 
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
Hi pinterf!

I am add code
Code:
ConvertToYUV444()
ConvertToStacked()
KNLMeansCL(device_type="GPU",h=6, lsb_inout=true)
ConvertFromStacked()
ConvertToRGB64()
to Your first script and now all work.

yup.
yup 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 17:36.


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