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 22nd July 2019, 02:29   #21  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by BetA13 View Post
Performance wise? Well, for an i5 or i7 it should be unsicnificant.
But for me, with an ancient Q9550 Core2Quad (@4Ghz)
I got a Q9550 @ 2.83 GHz, you must be overclocking a little. [EDIT: liquid cooled ?]

EDIT: To below, yep looks like you musta got lucky,
dont scrap it if you get a new one, keep it as rendering machine, then you dont care how long it takes.
Cheers.
__________________
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; 22nd July 2019 at 02:58.
StainlessS is offline   Reply With Quote
Old 22nd July 2019, 02:38   #22  |  Link
BetA13
cosmic entity
 
BetA13's Avatar
 
Join Date: May 2011
Location: outside the Box
Posts: 258
Quote:
Originally Posted by StainlessS View Post
I got a Q9550 @ 2.83 GHz, you must be overclocking a little.
jup, quite a little Tweaked it the first Day i got it, its still doing its job at that OC...(dialing in the right voltages and stuff did take me a good junk of Time.)
That Thing is 11 years old allready but still a good Chip for most stuff.. i guess i was lucky in the silicon lottery (for once) since i manage that OC at 1.26 vcore under full load.. Stays under 60C° no matter what i throw at him.

anyway, im off topic

greetz


EDIT:

nope, all AIR cooled..
And i should mention that im using a modded Bios.



Good old times...

Last edited by BetA13; 22nd July 2019 at 02:59.
BetA13 is offline   Reply With Quote
Old 26th March 2020, 07:37   #23  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Updated the FrostyBorders function and added the ImageBorders function to the thread. Both are dated 2020-03-26. There's links in the opening post.
hello_hello is offline   Reply With Quote
Old 9th March 2021, 09:38   #24  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Hi Hello Hello, what happened to Frosty Borders? The links are gone, as it redirects to Video Help saying that the file no longer exists.
Anyway, in case anyone is looking for this script, here is my backup copy from 26-03-2020:

Code:
function FrostyBorders(clip Source, int "OutWidth", int "OutHeight", val "InDAR", val "InSAR", int "Mod", \
float "Bright", float "BrightL", float "Cont", float "ContL", float "Sat", float "SatL", \
float "Blend", float "BlendL", float "Blur", float "BlurL", float "VBlur", float "VBlurL", \
Int "Iterations", Int "IterationsL", float "Texture", float "TextureL", val "BColor", val "BColorL", \
string "Resizer", bool "Frosty", bool "Info")     {

Source_Width = width(Source)
F_Source_Width = float(Source_Width)
Source_Height = height(Source)
F_Source_Height = float(Source_Height)

assert(HasVideo(Source) && (Source_Width > 48), " ImageBorders " + chr(10) + " No video found " + chr(10))

IsAvisynthPlus = \
(FindStr(LCase(VersionString), "avisynth+") > 0) || (FindStr(LCase(VersionString), "avisynth neo") > 0)

Color_Format = PixelType(Source)
Chroma420 = IsAvisynthPlus ? Is420(Source) : IsYV12(Source)
Chroma422 = IsAvisynthPlus ? Is422(Source) : IsYV16(Source)
Chroma444 = IsAvisynthPlus ? Is444(Source) : IsYV24(Source)
ModTwoWidth = Chroma420 || Chroma422 || IsYUY2(Source)
ModFourWidth = IsYV411(Source)
ModTwoHeight = Chroma420

Crop_WMod = ModFourWidth ? 4 : ModTwoWidth ? 2 : 1
Crop_HMod = ModTwoWidth ? 2 : 1

InDAR = default(InDAR, 0.0)
InSAR = default(InSAR, 0.0)
Bright = default(Bright, 0.0)
BrightL = default(BrightL, -25.0)
Cont = default(Cont, 1.0)
ContL = default(ContL, 0.66)
Sat = default(Sat, 0.85)
SatL = default(SatL, 0.66)
Blend = default(Blend, 0.20)
BlendL = default(BlendL, Blend)
Blur = default(Blur, 50)
BlurL = default(BlurL, Blur)
VBlur = default(VBlur, Blur)
VBlurL = default(VBlurL, BlurL)
Iterations = default(Iterations, 3)
IterationsL = default(IterationsL, Iterations)
Texture = default(Texture, 5.0)
TextureL = default(TextureL, Texture)
BColor = default(BColor, $000000)
BColorL = default(BColorL, BColor)
Resizer = default(Resizer, "Spline36")
Frosty = default(Frosty, true)
Info = default(Info, false)
WidthTest = false
HeightTest = false

WMod = default(Mod, (Crop_WMod == 2) ? 4 : (Crop_WMod == 4) ? 8 : 2)
HMod = default(Mod, (Crop_HMod == 2) ? 4 : 2)
F_WMod = float(WMod)
F_HMod = float(HMod)

IsResizeAppended = (RightStr(Resizer, 6) == "Resize")
Resizer = !IsResizeAppended ? Resizer : LeftStr(Resizer, StrLen(Resizer) - 6)
IsAvisynthResizer = (Resizer == "Bilinear") || (Resizer == "Bicubic") || (Resizer == "Blackman") || \
(Resizer == "Gauss") || (Resizer == "Lanczos") || (Resizer == "Lanczos4") || (Resizer == "Point") || \
(Resizer == "Spline16") || (Resizer == "Spline36") || (Resizer == "Spline64") || (Resizer == "Sinc")
Resizer = IsAvisynthResizer || (!IsAvisynthResizer && IsResizeAppended) ? Resizer + "Resize" : Resizer

Source_Sample_Aspect = (InSAR > 0) ? InSAR : (InDAR > 0) ? (F_Source_Height * InDAR / F_Source_Width) : 1.0
Source_Display_Aspect = (Source_Sample_Aspect == 1.0) ? F_Source_Width / F_Source_Height : \
(InDAR > 0) ? InDAR : (F_Source_Width * Source_Sample_Aspect / F_Source_Height)

Mod_Source_Width = \
(Source_Sample_Aspect == 1.0) ? floor(F_Source_Width / F_WMod) * WMod : \
(InDAR > 0) ? floor(F_Source_Height * InDAR / F_WMod) * WMod : \
floor(F_Source_Width * Source_Sample_Aspect / F_WMod) * WMod

Mod_Source_Storage_Aspect = float(Mod_Source_Width) / F_Source_Height

OutWidth = default(OutWidth, 0)
OutWidth = (OutWidth == 0) ? Mod_Source_Width : OutWidth
OutHeight = default(OutHeight, 0)
OutHeight = (OutHeight == 0) ? Source_Height : OutHeight
F_OutWidth = float(OutWidth)
F_OutHeight = float(OutHeight)

Output_Storage_Aspect = (F_OutWidth / F_OutHeight)

assert((InDAR == 0) || ((InDAR > 0) && !IsInt(InDAR) && IsFloat(InDAR)), " FrostyBorders " + chr(10) + \
" InDAR must be a positive floating point number " + chr(10) + " (15.0/11.0 or 1.363636 etc) " + chr(10))
assert((InSAR == 0) || ((InSAR > 0) && !IsInt(InSAR) && IsFloat(InSAR)), " FrostyBorders " + chr(10) + \
" InSAR must be a positive floating point number " + chr(10) + " (10.0/11.0 or 0.909091 etc) " + chr(10))
assert((InDAR == 0) || (InSAR == 0), \
" FrostyBorders " + chr(10) + " InDAR & InSAR can't be specified at the same time " + chr(10))

assert((WMod == 1) || (WMod == 2) || (WMod == 4) || (WMod == 8) || (WMod == 16), \
" ImageBorders " + chr(10) + " Mod must be 1, 2, 4, 8 or 16 " + chr(10))

(abs(Output_Storage_Aspect - Source_Display_Aspect) >= 0.000033) ? Eval("""

assert(!ModTwoWidth || (WMod % 2 == 0) || (Output_Storage_Aspect < Mod_Source_Storage_Aspect), \
" ImageBorders " + chr(10) + " " + Color_Format + " requires mod2 picture width resizing " + chr(10))
assert(!ModFourWidth || (WMod % 4 == 0) || (Output_Storage_Aspect < Mod_Source_Storage_Aspect), \
" ImageBorders " + chr(10) + " " + Color_Format + " requires mod4 picture width resizing " + chr(10))
assert(!ModTwoHeight || (HMod % 2 == 0) || (Output_Storage_Aspect >= Mod_Source_Storage_Aspect), \
" ImageBorders " + chr(10) + " " + Color_Format + " requires mod2 picture height resizing " + chr(10))

""", "Mod Eval") : nop()

assert(-255 <= Bright <= 255, " FrostyBorders " + chr(10) + " The valid range for Bright is -255 thru 255 ")
assert(-255 <= BrightL <= 255, " FrostyBorders " + chr(10) + " The valid range for BrightL is -255 thru 255 ")
assert(0 <= Cont <= 10, " FrostyBorders " + chr(10) + " The valid range for Cont is 0.0 thru 10.0 ")
assert(0 <= ContL <= 10, " FrostyBorders " + chr(10) + " The valid range for ContL is 0.0 thru 10.0 ")
assert(0 <= Sat <= 10, " FrostyBorders " + chr(10) + " The valid range for SatL is 0.0 thru 10.0 ")
assert(0 <= SatL <= 10, " FrostyBorders " + chr(10) + " The valid range for Sat is 0.0 thru 10.0 ")
assert(0 <= Blend <= 1, " FrostyBorders " + chr(10) + " The valid range for Blend is 0.0 to 1.0 ")
assert(0 <= BlendL <= 1, " FrostyBorders " + chr(10) + " The valid range for BlendL is 0.0 to 1.0 ")

(abs(Output_Storage_Aspect - Source_Display_Aspect) < 0.000033) ? Eval("""

Resized_Picture = (OutWidth == Source_Width) && (OutHeight == Source_Height) ? Source : \
Eval("Source." + Resizer + "(OutWidth, OutHeight)")

""", "Resizing 1 Eval") : (Output_Storage_Aspect >= Mod_Source_Storage_Aspect) ? Eval("""

F_New_Width = \
(Source_Sample_Aspect == 1.0) ? (F_OutHeight * F_Source_Width / F_Source_Height) : \
(InDAR > 0) ? (F_OutHeight * InDAR) : \
(F_OutHeight * F_Source_Width * Source_Sample_Aspect / F_Source_Height)

Resizing_Width = floor(F_New_Width / F_WMod) * WMod
F_Resizing_Width = float(Resizing_Width)

F_Width_Cropping = \
max(0, (Source_Width - (F_Source_Height * F_Resizing_Width / F_OutHeight / Source_Sample_Aspect)) / 2.0)

Resizer_Crop_LR = max(0, F_Width_Cropping - (floor(F_Width_Cropping / F_WMod) * WMod))
Crop_LR = max(0, round(F_Width_Cropping - Resizer_Crop_LR))

Resized_Picture = \
Eval("Source.Crop(Crop_LR, 0, -Crop_LR, 0)." + Resizer + "(Resizing_Width, OutHeight, \
src_left=Resizer_Crop_LR, src_top=0, src_width=-Resizer_Crop_LR, src_height=0)")

Additional_Width = OutWidth - Resizing_Width
BL = min(Additional_Width, floor(float(Additional_Width) / 2.0 / float(Crop_WMod)) * Crop_WMod)
BR = Additional_Width - BL

WidthTest = (BL >= 16) && (BR >= 16) && Frosty

""", "Resizing 2 Eval") : Eval("""

F_New_Height = (Source_Sample_Aspect == 1.0) ? (F_OutWidth * F_Source_Height / F_Source_Width) : \
(InDAR > 0) ? (F_OutWidth / InDAR) : \
(F_OutWidth * F_Source_Height / F_Source_Width / Source_Sample_Aspect)

Resizing_Height = floor(F_New_Height / F_HMod) * HMod
F_Resizing_Height = float(Resizing_Height)

F_Height_Cropping = \
max(0, (Source_Height - (F_Source_Width * F_Resizing_Height * Source_Sample_Aspect / F_OutWidth)) / 2.0)

Resizer_Crop_TB = max(0, F_Height_Cropping - (floor(F_Height_Cropping / F_HMod) * HMod))
Crop_TB = max(0, round(F_Height_Cropping - Resizer_Crop_TB))

Resized_Picture = \
Eval("Source.Crop(0, Crop_TB, 0, -Crop_TB)." + Resizer + "(OutWidth, Resizing_Height, \
src_left=0, src_top=Resizer_Crop_TB, src_width=0, src_height=-Resizer_Crop_TB)")

Additional_Height = OutHeight - Resizing_Height
BT = min(Additional_Height, floor(float(Additional_Height) / 2.0 / float(Crop_HMod)) * Crop_HMod)
BB = Additional_Height - BT

HeightTest = (BT >= 16) && (BB >= 16) && Frosty

""", "Resizing 3 Eval")

(abs(Output_Storage_Aspect - Source_Display_Aspect) < 0.000033) ? Eval("""

Output = Resized_Picture

""", "Add Borders 1 Eval") : WidthTest && (Output_Storage_Aspect >= Mod_Source_Storage_Aspect) ? Eval("""

W_Crop = Resizing_Width - 64

PillarBox_Background = \
StackHorizontal(Resized_Picture.crop(0, 0, -W_Crop, 0), Resized_Picture.crop(W_Crop, 0, 0, 0))\
.TemporalSoften(7, 255, 255, 20, 2).Tweak(bright=Bright, cont=Cont, sat=Sat)

PB_Crop = width(PillarBox_Background) - 16

Left = PillarBox_Background.crop(0, 0, -PB_Crop, 0)
Right = PillarBox_Background.crop(PB_Crop, 0, 0, 0)

Blend_Left = \
(Blend == 0) ? Left : (Blend == 1) ? FlipHorizontal(Right) : Overlay(Left, FlipHorizontal(Right), Opacity=Blend)
Blend_Right = \
(Blend == 0) ? Right : (Blend == 1) ? FlipHorizontal(Left) : Overlay(Right, FlipHorizontal(Left), Opacity=Blend)

Frosty_Left = Blend_Left.GaussResize(BL, OutHeight)\
.FastBlur(Blur, y_blur=VBlur, iterations=Iterations, dither=true).AddGrain(var=Texture, constant=true)
Frosty_Right = Blend_Right.GaussResize(BR, OutHeight)\
.FastBlur(Blur, y_blur=VBlur, iterations=Iterations, dither=true).AddGrain(var=Texture, constant=true)

Output = StackHorizontal(StackHorizontal(Frosty_Left, Resized_Picture), Frosty_Right)

""", "Add Borders 2 Eval") : (Output_Storage_Aspect >= Mod_Source_Storage_Aspect) ? Eval("""

Output = Resized_Picture.AddBorders(BL, 0, BR, 0, color=BColor)

""", "Add Borders 3 Eval") : HeightTest && (Output_Storage_Aspect < Mod_Source_Storage_Aspect) ? Eval("""

H_Crop = Resizing_Height - 64

LetterBox_Background = \
StackVertical(Resized_Picture.crop(0, 0, 0, -H_Crop), Resized_Picture.crop(0, H_Crop, 0, 0))\
.TemporalSoften(5, 255, 255, 20, 2).Tweak(bright=BrightL, cont=ContL, sat=SatL)

LB_Crop = height(LetterBox_Background) - 16

Top = LetterBox_Background.crop(0, 0, 0, -LB_Crop)
Bottom = LetterBox_Background.crop(0, LB_Crop, 0, 0)

Blend_Top = \
(BlendL == 0) ? Top : (BlendL == 1) ? FlipVertical(Bottom) : Overlay(Top, FlipVertical(Bottom), Opacity=BlendL)
Blend_Bottom = \
(BlendL == 0) ? Bottom : (BlendL == 1) ? FlipVertical(Top) : Overlay(Bottom, FlipVertical(Top), Opacity=BlendL)

Frosty_Top = Blend_Top.GaussResize(OutWidth, BT)\
.FastBlur(BlurL, y_blur=VBlurL, iterations=IterationsL, dither=true).AddGrain(var=TextureL, constant=true)
Frosty_Bottom = Blend_Bottom.GaussResize(OutWidth, BB)\
.FastBlur(BlurL, y_blur=VBlurL, iterations=IterationsL, dither=true).AddGrain(var=TextureL, constant=true)

Output = StackVertical(StackVertical(Frosty_Top, Resized_Picture), Frosty_Bottom)

""", "Add Borders 4 Eval") : Eval("""

Output = Resized_Picture.AddBorders(0, BT, 0, BB, color=BColor)

""", "Add Borders 5 Eval")

Info ? Eval("""

Info_Text = \
((abs(Output_Storage_Aspect - Source_Display_Aspect) < 0.000033) ? \
string(OutWidth, "Output Dimensions\n%.0f x ") + string(OutHeight, "%.0f\n\nNo Borders") : \
(Output_Storage_Aspect >= Mod_Source_Storage_Aspect) ? \
string(Resizing_Width, "Picture Dimensions\n%.0f x ") + string(OutHeight, "%.0f") + \
string(BL, "\n\nLeft Border   %.0f") + string(BR, "\nRight Border   %.0f") + \
string(OutWidth, "\n\nOutput Dimensions\n%.0f x ") + string(OutHeight, "%.0f") : \
string(OutWidth, "Picture Dimensions\n%.0f x ") + string(Resizing_Height, "%.0f") + \
string(BT, "\n\nTop Border   %.0f") + string(BB, "\nBottom Border   %.0f") + \
string(OutWidth, "\n\nOutput Dimensions\n%.0f x ") + string(OutHeight, "%.0f")) + \
"\n\n" + Resizer

Sub_Size = min(OutWidth * 0.04, OutHeight * 0.042)
Sub_Y = (OutHeight * 0.5) - (Sub_Size * 4.75)

Output = Output.subtitle(Info_Text, y=Sub_Y, size=Sub_Size, text_color=$F0FFFF, align=5, lsp=20)

""", "Info Eval") : nop()

return Output     }

function iFrostyBorders(clip Source, int "OutWidth", int "OutHeight", val "InDAR", val "InSAR", int "Mod", \
float "Bright", float "BrightL", float "Cont", float "ContL", float "Sat", float "SatL", \
float "Blend", float "BlendL", float "Blur", float "BlurL", float "VBlur", float "VBlurL", \
Int "Iterations", Int "IterationsL", float "Texture", float "TextureL", val "BColor", val "BColorL", \
string "Resizer", bool "Frosty", bool "Info")     {

Info = default(Info, true)

return Source.FrostyBorders(OutWidth, OutHeight, InDAR, InSAR, Mod, \
Bright, BrightL, Cont, ContL, Sat, SatL, \
Blend, BlendL, Blur, BlurL, VBlur, VBlurL, \
Iterations, IterationsL, Texture, TextureL, BColor, BColorL, \
Resizer, Frosty, Info)     }

function Borders(clip Source, int "OutWidth", int "OutHeight", val "InDAR", val "InSAR", int "Mod", \
float "Bright", float "BrightL", float "Cont", float "ContL", float "Sat", float "SatL", \
float "Blend", float "BlendL", float "Blur", float "BlurL", float "VBlur", float "VBlurL", \
Int "Iterations", Int "IterationsL", float "Texture", float "TextureL", val "BColor", val "BColorL", \
string "Resizer", bool "Frosty", bool "Info")     {

Frosty = default(Frosty, false)

return Source.FrostyBorders(OutWidth, OutHeight, InDAR, InSAR, Mod, \
Bright, BrightL, Cont, ContL, Sat, SatL, \
Blend, BlendL, Blur, BlurL, VBlur, VBlurL, \
Iterations, IterationsL, Texture, TextureL, BColor, BColorL, \
Resizer, Frosty, Info)     }

function iBorders(clip Source, int "OutWidth", int "OutHeight", val "InDAR", val "InSAR", int "Mod", \
float "Bright", float "BrightL", float "Cont", float "ContL", float "Sat", float "SatL", \
float "Blend", float "BlendL", float "Blur", float "BlurL", float "VBlur", float "VBlurL", \
Int "Iterations", Int "IterationsL", float "Texture", float "TextureL", val "BColor", val "BColorL", \
string "Resizer", bool "Frosty", bool "Info")     {

Frosty = default(Frosty, false)
Info = default(Info, true)

return Source.FrostyBorders(OutWidth, OutHeight, InDAR, InSAR, Mod, \
Bright, BrightL, Cont, ContL, Sat, SatL, \
Blend, BlendL, Blur, BlurL, VBlur, VBlurL, \
Iterations, IterationsL, Texture, TextureL, BColor, BColorL, \
Resizer, Frosty, Info)     }
FranceBB is offline   Reply With Quote
Old 5th April 2021, 21:10   #25  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
FranceBB,
Sorry, I missed your post. I stumbled across it just now while I was looking for something else.

I updated the function and meant to update the opening post, but I had to update the help file first which apparently led to forgetting.....

I'm not sure what happened to the old link but anyway......

FrostyBorders 2020-08-26 is the previous version so the one you posted above is the version before it. I can't remember what the difference is. Edit: Comparing the scripts there doesn't seem to be much difference, so maybe I just made a typo with the date or something..

The current version is FrostyBorders 2021-04-06 (dated today).
- The argument names have been simplified. There's no longer separate arguments for pillarbox and letterbox borders. For example, previously there were arguments named "Bright" and "BrightL", but now there's only "Bright".
- Added TextureC argument for enabling chroma texture over the borders. It's disabled by default. The Texture argument for adding luma texture remains unchanged.
- Added GPlugin argument (Grain Plugin). The default is GPlugin=1, which uses AddGrainC to add the border texture as before. GPlugin=2 uses neo_f3kdb. The Texture and TextureC arguments should produce roughly the same result for either plugin. Actually they're so similar I'm not sure why I added neo_f3kdb now. Oh well.....

I'll update the links in the opening post shortly.

Last edited by hello_hello; 7th April 2021 at 14:32.
hello_hello is offline   Reply With Quote
Old 6th April 2021, 01:41   #26  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
I just added an update to FrostyBorders 2021-04-06 to ensure the borders are the same size when possible.
There was a bug causing the wrapper functions to not work. It's fixed.
I left the version number the same.

Last edited by hello_hello; 6th April 2021 at 01:43.
hello_hello is offline   Reply With Quote
Old 6th April 2021, 02:21   #27  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Thanks! I've downloaded the updated version now.
As a side note, have you considered opening a GitHub account?
It's very easy to deal with versioning, so that it allows you not only to keep the scripts there, but also to go "back in time" and check the commits the developers have made.

(just a "hint" to avoid links to disappear again in the future if the host closes).

Anyway, thanks for the new version.
FranceBB is offline   Reply With Quote
Old 6th April 2021, 05:29   #28  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
I'm pretty sure I have a GitHub account. I've just never used it. I'll try to do something about that soon.

Cheers.
hello_hello is offline   Reply With Quote
Old 6th April 2021, 22:14   #29  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Sorry about a quick update, but I reverted back to the old behaviour for FrostyBorders when a picture mod is specified. It once again only effects the picture mod, not the borders, so the script is free to make the size of the borders even, whenever possible. The new version is dated 2021-04-07. There's a link in the opening post.

Last edited by hello_hello; 6th April 2021 at 22:21.
hello_hello is offline   Reply With Quote
Old 6th April 2021, 22:33   #30  |  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
I just added an update to FrostyBorders 2021-04-06 to ensure the borders are the same size when possible.
With RT_QueryBorderCrop() [template for RoboCrop, but slightly different functionality], I had about 3 or 4 goes at equalizing borders before I got it right.
[Accounting for xmod, ymod [and interlacing] and WMod, HMod, CropMore, CropLess, and actual detected border coords].
Its a bit tricky.
__________________
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; 6th April 2021 at 22:38.
StainlessS is offline   Reply With Quote
Old 6th April 2021, 23:09   #31  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
The equalizing part wasn't hard for this script, but I tried to be more clever for the newer version, and it turned out not to be.

All I did was subtract the cropped width from the original width and divide the result by 2, then round it down to the appropriate mod if need be (ie mod2 for YV12). That's used for the left border and the right border is just the original width minus the cropped width minus the left border. I made the default cropped picture mod twice the minimum (ie mod4 for YV12), so as long as the total width is at least mod4 the borders have to be even (for YV12). The script can't "crop less" because it's purpose is to add borders to an already cropped source. It resizes too, so I get to assume the source is progressive.

I just thought I was being clever by applying the mod argument to the initial left border calculation as well as the picture, until I realised that'd be more likely to make them uneven.

Last edited by hello_hello; 6th April 2021 at 23:30.
hello_hello is offline   Reply With Quote
Old 7th April 2021, 06:03   #32  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
I fixed one problem and caused another. It hasn't been uploaded long so I haven't changed the version date, but I've fixed an oversight preventing the script from checking that any specified mod is correct for the source. If anyone has downloaded FrostyBorders 2021-04-07 before reading this post, please download it again.
hello_hello is offline   Reply With Quote
Old 18th August 2021, 11:33   #33  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
I've used the FrostyBorders function a bit myself lately, which made me aware of some areas that could be improved, most importantly ensuring the borders are fairly consistent regardless of resolution. Or to put it another way, the borders added to HD and SD versions of the same video should now look much the same.

There's also new arguments for adding plain borders with a dark to light gradient and a "frosty" look, for picking a frame from a video with normal FrostyBorders and using those borders for the entire video, and for adding a black 2 pixel divider between the picture and the borders.

Edit: Forget to mention, the multithreaded resizers from the ResampleMT plugin are supported and there's a "RStr" argument for specifying resizer options.

There's a link for the new version dated 2021-08-18 in the opening post.

Last edited by hello_hello; 18th August 2021 at 12:33.
hello_hello is offline   Reply With Quote
Old 18th August 2021, 13:24   #34  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Thanks for the update.
FranceBB is offline   Reply With Quote
Old 18th August 2021, 18:30   #35  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
No worries, but I always manage to find a problem after I've uploaded a function no matter how thoroughly I think I've checked it. Sigh....

Now Info=true displays the correct border dimensions when BDiviser=true
FrostyBorders will work with YV411.

New version dated 2021-08-19 in the opening post.
hello_hello is offline   Reply With Quote
Old 19th August 2021, 02:12   #36  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Oh, so another version, dang it, I've just replaced the other one ehehehehe
Anyway it's 2AM, I think I'm just gonna go to bed and I'll try it tomorrow
FranceBB is offline   Reply With Quote
Old 26th August 2021, 15:24   #37  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Well.... here's another new one. There's a link for FrostyBorders 2021-08-27 in the opening post.

Someone at VideoHelp requested an option for "feathering" the borders, (there's two arguments for that and I added a pic of what it looks like in the opening post), along with some other minor improvements. It'll be slower than the standard borders though because the blurring and temporal something has to be applied to the full size borders and part of the picture, then overlaid, rather than being applied to the borders before they're resized to the correct dimensions.
The feathering can be applied to plain black/colored borders as well as the frosty borders.

Last edited by hello_hello; 26th August 2021 at 15:33.
hello_hello is offline   Reply With Quote
Old 26th August 2021, 18:43   #38  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Thanks.
FranceBB is offline   Reply With Quote
Old 5th September 2021, 05:01   #39  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
And another update... although not exactly my choice.
Someone at VideoHelp requested the type of borders the "Frosty" look was designed to avoid, but it wasn't hard to do, so....

The new version is dated 2021-09-05. There's a link in the opening post.

The "Clone" argument takes picture from the sides or top/bottom of the frame to use as borders without stretching or resizing (unless the border width/height exceeds half the picture width/height). They're blurred and a little texture added (configurable as for FrostyBorders) but by default there's no temporal smoothing. The "Mirror" argument adds the same borders, only flipped.

There's now a "TSoft" argument for specifying the number of frames used for temporal smoothing. Fewer frames = Faster.

Info=true displays the correct border dimensions now. I'm certain this time. I thought I'd fixed that, but apparently I'm an idiot.

Clone=true



Clone=true, Feather2=true


Last edited by hello_hello; 5th September 2021 at 05:59.
hello_hello is offline   Reply With Quote
Old 5th September 2021, 19:58   #40  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Well it's nice to have, so thanks, but I'll stick with the original settings ehehehehehe
FranceBB 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 00:43.


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