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

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th May 2018, 17:37   #4041  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
I found a bug, when I was trying to minimize rounding errors of resize.blur.blur.blur.resize.sharpen.sharpen.sharpen.sharpen kind of script.

source


source.Spline16Resize(512,384)


source.ConvertTo16bit().Spline16Resize(512,384).ConvertTo8bit()


All resizers and all target resolutions are the same.

Last edited by bxyhxyh; 10th May 2018 at 17:46.
bxyhxyh is offline   Reply With Quote
Old 10th May 2018, 17:53   #4042  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
Quote:
Originally Posted by bxyhxyh View Post
source.ConvertTo16bit().Spline16Resize(512,384).ConvertTo8bit()
I get different results than you. They are the same (or very similar) for me. What version of avisynth+?
poisondeathray is offline   Reply With Quote
Old 10th May 2018, 17:57   #4043  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Avisynth+ 0.1 r2636.
Ok I checked the release page. It was 2664.
I'm gonna see that.
bxyhxyh is offline   Reply With Quote
Old 10th May 2018, 17:59   #4044  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
Try updating?
I'm using r2664 x64
poisondeathray is offline   Reply With Quote
Old 10th May 2018, 18:05   #4045  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Ok. Checked it, it was the same for r2664 x86. Maybe something might be wrong with my end.
I'll try full installer.
bxyhxyh is offline   Reply With Quote
Old 10th May 2018, 18:06   #4046  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
The other difference is x86 vs x64 ?
poisondeathray is offline   Reply With Quote
Old 10th May 2018, 18:26   #4047  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Switched to x64 version, still same.
Updated all in one microsoft redistributable, no change.
bxyhxyh is offline   Reply With Quote
Old 10th May 2018, 22:39   #4048  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
Quote:
Originally Posted by bxyhxyh View Post
Switched to x64 version, still same.
Updated all in one microsoft redistributable, no change.
can you confirm with version() ?
poisondeathray is offline   Reply With Quote
Old 10th May 2018, 23:07   #4049  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,288
I can reproduce it. Adding a simple "ConvertToYV12()" (or YV16/YV24) after the source filter (I used "ImageSource()") fixes it.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 10th May 2018, 23:18   #4050  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
Quote:
Originally Posted by Groucho2004 View Post
I can reproduce it. Adding a simple "ConvertToYV12()" (or YV16/YV24) after the source filter (I used "ImageSource()") fixes it.
But that's a problem...

I used ImageSource() too , and it returns RGB24 on the source PNG (as expected)

And I can't reproduce it in RGB24, or YV12, or YV16, or YV24
poisondeathray is offline   Reply With Quote
Old 10th May 2018, 23:26   #4051  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Quote:
Originally Posted by poisondeathray View Post
can you confirm with version() ?


Quote:
Originally Posted by Groucho2004 View Post
I can reproduce it. Adding a simple "ConvertToYV12()" (or YV16/YV24) after the source filter (I used "ImageSource()") fixes it.
Same for me too.
But I need to convert it to YV24/YV12 after the resizing, so it's really problematic for me.

Well, I can live with converting the source to the YV24 for now I guess.
BTW I'm on Windows 8.1

Last edited by bxyhxyh; 10th May 2018 at 23:36.
bxyhxyh is offline   Reply With Quote
Old 11th May 2018, 00:30   #4052  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
I'm on Win8.1 too . Haswell (only AVX2) ; maybe some instruction issue ? what CPU ?

What about ConvertTo16Bit only ? or ConvertTo16Bit and the resize only (RGB48) ?
poisondeathray is offline   Reply With Quote
Old 11th May 2018, 00:44   #4053  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,813
Or use avsresize (zimg/z.lib) as a workaround

But I'm curious why I can't reproduce bug

Code:
ConvertToPlanarRGB()
z_ConvertFormat(512,384,resample_filter="spline16",pixel_type="RGBP16")
poisondeathray is offline   Reply With Quote
Old 11th May 2018, 00:53   #4054  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Quote:
Originally Posted by poisondeathray View Post
I'm on Win8.1 too . Haswell (only AVX2) ; maybe some instruction issue ? what CPU ?

What about ConvertTo16Bit only ? or ConvertTo16Bit and the resize only (RGB48) ?
ConvertTo16Bit and the resize only. Even if I insert some filters before resize, it still is the same.
CPU is Ivy Bridge

Last edited by bxyhxyh; 11th May 2018 at 00:58.
bxyhxyh is offline   Reply With Quote
Old 11th May 2018, 07:57   #4055  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,218
I'll check it soon

EDIT: cannot reproduce. Tested with AVX2, AVX-only, SSE4.1 only builds. (Win10)

Code:
Function Diff(clip src1, clip src2)
{
  return Subtract(src1.ConvertBits(8),src2.ConvertBits(8)).Levels(120, 1, 255-120, 0, 255, coring=false)
}
source=ImageSource("test.png").Info().trim(0, 100) # 256x224 RGB24
c8=source.Spline16Resize(512,384)
c16=source.ConvertTo16Bit().Spline16Resize(512,384).ConvertTo8Bit()
StackVertical(c8,c16,Diff(c8,c16))

Last edited by pinterf; 11th May 2018 at 08:35.
pinterf is offline   Reply With Quote
Old 11th May 2018, 10:09   #4056  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,288
Quote:
Originally Posted by poisondeathray View Post
But that's a problem...

I used ImageSource() too , and it returns RGB24 on the source PNG (as expected)

And I can't reproduce it in RGB24, or YV12, or YV16, or YV24
I tested again with this script:
Code:
imagesource("3ZWGafM.png", pixel_type = "RGBXX") #XX to be substituted with 24/32/48/64
ConvertTo16bit().Spline16Resize(512,384).ConvertTo8bit()
The resulting image is corrupted for RGB32 and RGB64 but looks fine for RGB24 and RGB48, tested with r2664 and pinterf's test build r2671 on XP32 (no AVX optimization).
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 11th May 2018, 10:22   #4057  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,030
Quote:
Originally Posted by Groucho2004 View Post
pinterf's test build r2671
Can we play with it too?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 11th May 2018, 10:32   #4058  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,288
Quote:
Originally Posted by tormento View Post
Can we play with it too?
I suppose pinterf won't object:
http://www.mediafire.com/file/kmq3po...us_r2671tst.7z
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 11th May 2018, 10:45   #4059  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,218
Quote:
Originally Posted by Groucho2004 View Post
I tested again with this script:
Code:
imagesource("3ZWGafM.png", pixel_type = "RGBXX") #XX to be substituted with 24/32/48/64
ConvertTo16bit().Spline16Resize(512,384).ConvertTo8bit()
The resulting image is corrupted for RGB32 and RGB64 but looks fine for RGB24 and RGB48, tested with r2664 and pinterf's test build r2671 on XP32 (no AVX optimization).
Ahh, RGB32. Reproduced.
EDIT: RGB64 Turnleft / Turnright issue (which is used in RGB64 resize)
EDIT2: Bug found and fixed. I'll prepare a release in the near future.

Last edited by pinterf; 11th May 2018 at 12:03. Reason: bugfix
pinterf is offline   Reply With Quote
Old 11th May 2018, 14:21   #4060  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,218
x86 test (mediafire link) (not a release)
(see also readme_history.txt for other interesting changes)
http://www.mediafire.com/file/een9bf...r2671_test2.7z
pinterf is offline   Reply With Quote
Reply

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 06:46.


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