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 19th July 2019, 09:42   #21  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by hello_hello View Post
Does anyone else have a problem with FastBlur crashing when the width is not mod8, at least for YV12 video. The height mod doesn't seem to matter.
I'm running XP and Avisynth 2.6, if it matters.

Thanks for a nice plugin!
Possibly an unaligned Crop issue.
pinterf is offline   Reply With Quote
Old 19th July 2019, 10:23   #22  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Yes, it definitely could be that, because Avisynth+ keeps everything aligned (and FastBlur, a little lazily, relies on it), but older versions of Avisynth don't.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 19th July 2019, 10:40   #23  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by wonkey_monkey View Post
Yes, it definitely could be that, because Avisynth+ keeps everything aligned (and FastBlur, a little lazily, relies on it), but older versions of Avisynth don't.
It's not lazyness, no other use case produces unaligned frames in classic Avisynth, unaligned crop just adjusts internal frame pointers.
It should be used with precaution.
Speed gain is marginal (if any, because next filter would fall back to C version internally if frame is not well aligned), scripts should do the Crop with "align"=true. This parameter is kept in Avisynth+ only for compatibility reasons.
pinterf is offline   Reply With Quote
Old 19th July 2019, 12:41   #24  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
All I can report at this stage is this will crash every time:

Spline36Resize(704,396)
Crop(2,0,-2,0,Align=true)
FastBlur(50)

Whereas this does not:

Spline36Resize(704,396)
Crop(4,0,-4,0)
FastBlur(50)
hello_hello is offline   Reply With Quote
Old 19th July 2019, 12:50   #25  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Tried the first example above with colorbars YV12, no problems with avs+, avs 2.60, avs v2.61alpha, avs Neo.

EDIT: Same with 2nd example script.
__________________
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; 19th July 2019 at 12:54.
StainlessS is offline   Reply With Quote
Old 19th July 2019, 12:52   #26  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
That's not fair. It crashes reliably for me.

Could you try it without Align=true? Just out of curiosity.

Cheers.
hello_hello is offline   Reply With Quote
Old 19th July 2019, 12:57   #27  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Later, gotta leave right now.
__________________
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   Reply With Quote
Old 19th July 2019, 12:59   #28  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by hello_hello View Post
That's not fair. It crashes reliably for me.

Could you try it without Align=true? Just out of curiosity.

Cheers.
No crash here, either.

What does "crash" means? Exit? Error message?
When fed into Avsmeter it would show the Exception text whether it is C0000005 or illegal instruction, whatever.
pinterf is offline   Reply With Quote
Old 19th July 2019, 14:20   #29  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Same with Align=False

What player ?
Also, Vdub2 would show error message properly (usually).
__________________
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   Reply With Quote
Old 19th July 2019, 15:33   #30  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
SSE4.1 is used but hello_hello's processor does not support it.

Tried Intel SDE emulator with --mrm option
I'm using this tool to emulate either pre-historic or too modern (= not available for me, e.g. AVX512) instruction sets.

This --mrm emulates Merom architecture.

Code:
AVSMeter 2.9.0 (x86) - Copyright (c) 2012-2019, Groucho2004
AviSynth 2.60, build:Aug 28 2012 [18:17:07] (2.6.0.3)
TID 16 SDE-ERROR: Executed instruction not valid for specified chip (CORE2): 0x16512cb7: pextrb byte ptr [ecx], xmm0, 0x0
Image: C:\Program Files (x86)\AviSynth+\plugins\FastBlur.dll+0x2cb7
Instruction bytes are: 66 0f 3a 14 01 00

TID 20 SDE-ERROR: Executed instruction not valid for specified chip (CORE2): 0x16512cb7: pextrb byte ptr [ecx], xmm0, 0x0
Image: C:\Program Files (x86)\AviSynth+\plugins\FastBlur.dll+0x2cb7
Instruction bytes are: 66 0f 3a 14 01 00

TID 19 SDE-ERROR: Executed instruction not valid for specified chip (CORE2): 0x16512cb7: pextrb byte ptr [ecx], xmm0, 0x0
Image: C:\ProTID 23 SDE-ERROR: Executed ig
pinterf is offline   Reply With Quote
Old 19th July 2019, 16:48   #31  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
That makes sense. Pixels are written out in groups of four using older SSE instructions, but any stragglers get dealt with using newer instructions. For YV12 that means you have to be mod8 so that the chroma channels are mod4.

If you pad the video to the right by repeating the final column of pixels, the FastBlur result (after cropping again) should be identical.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 19th July 2019 at 16:51.
wonkey_monkey is offline   Reply With Quote
Old 19th July 2019, 17:53   #32  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Source available yet so as I can recompile, I am unlikely to use if not OK on my other machines [well once in a blue moon I might use it on No1 m/c].
(one a P4 with hyperthreading, no SSE4.1 , I'm pretty sure.
My core2 Q6600 has SSE4 I think but not SSE4.1, cant check at moment, I knocked it off a table a coupla days back and CPU + heatsink is currently detached from Motherboard).

That Emulator sounds pretty nifty.
EDIT: From The emulator FAQ:
Quote:
Q: What are the system requirements?
Intel® SDE will run on IA-32 or Intel® 64 processors running Windows or Linux or OS X operating systems.
Quote:
Q: What are the CPUID requirements?
Pin, and thus Intel SDE requires a Pentium 4 or later processor.
EDIT: Emulator [Windows] Downloads 17MB + 1.2MB. [Req:- Intel devs account (not so difficult to sign up, Free and pretty quick IIRC + access to loads of Intel stuff)]

EDIT: Looks like Q6600 only has SSE3/SSSE3, no SSE4.
__________________
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; 20th July 2019 at 08:16.
StainlessS is offline   Reply With Quote
Old 20th July 2019, 06:55   #33  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Sorry, I was gone for a while but I see pinterf found the cause. It's nice to know I wasn't going mad.
hello_hello is offline   Reply With Quote
Old 20th July 2019, 07:58   #34  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by hello_hello View Post
It's nice to know I wasn't going mad.
A rather large conclusion to jump to based on Pinterf comment.
__________________
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   Reply With Quote
Old 20th July 2019, 14:45   #35  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
Here's what AVS meter shows when it crashes. Usually the program opening the script simply vanishes, so that's as close as I get to an error message. Is there a way to dig out more info?


Last edited by hello_hello; 20th July 2019 at 14:51.
hello_hello is offline   Reply With Quote
Old 20th July 2019, 16:12   #36  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Easiest way to see invisible error message is to right click on avs and Open with VDub2.

Here result of loading empty avs file info VD2 (I was kinda curious what it would produce):-

MPC-HC just gives a "Scripts return was not a video clip (is the undefined value)".
__________________
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; 20th July 2019 at 16:15.
StainlessS is offline   Reply With Quote
Old 20th July 2019, 21:30   #37  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
It looks like Pinterf was correct.



For the function I'm using FastBlur for (blurring borders), I originally did something like this:

Quote:
Left = Blend_Left.GaussResize(BorderL, Total_Height)\
.FastBlur(50, dither=true)\
.AddGrain(var=5.0, constant=true)
I worked around it by following wonkey_monkey's advice. Inside a function it's not a big hassle.

Quote:
LMod = ((BorderL % 8) == 0) ? 0 : 8 - (BorderL - (floor(float(BorderL) / 8.0) * 8))

Left = Blend_Left.GaussResize(BorderL, Total_Height)\
.PointResize(BorderL+LMod, Total_Height, -LMod, 0, BorderL+LMod, 0)\
.FastBlur(50, dither=true)\
.Crop(LMod, 0,0, 0)\
.AddGrain(var=5.0, constant=true)
hello_hello is offline   Reply With Quote
Old 25th December 2019, 01:40   #38  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Updated to fix a rounding/accumulation bug with floating point clips.

http://horman.net/avisynth/download/FastBlur.zip
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 30th December 2019, 20:11   #39  |  Link
Adrammelech
Registered User
 
Join Date: Jan 2016
Posts: 2
How does this compare with `Dither_box_filter16()` when using iterations=1
and gamma=false?

I tried matching the output between the two but I couldn't get the equivalent
radius from one to the other.

And since I'm on it, would you be willing to add the usual `y, u, v`
parameters from MaskTools/DitherTools, for convenience?
Adrammelech is offline   Reply With Quote
Old 31st December 2019, 12:07   #40  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
FastBlur(9, iterations = 1, gamma = false) is pretty close. In general multiplying by 9/16 seems to work for other radiuses.

There seems to be a border bug in the version I recently uploaded which I'll sort out later. EDT: never mind, there was no bug, it was a dithertools misunderstanding.

Copying all the functionality of y/u/v seems more trouble than its worth at the moment.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 31st December 2019 at 18:30.
wonkey_monkey 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 16:15.


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