StainlessS
14th April 2017, 00:31
FredAverage(), by StainlessS @ Doom9
Requires VS2008 CPP runtimes.
Prompted by this post here:- https://forum.doom9.org/showthread.php?p=1803528#post1803528
dll's for avs v2.58 + avs v2.60/+ x86 & x64.
A simple average filter for Avisynth standard colorspaces, only.
Returns a clip where each return frame is a single color average of input frame, same size and colorspace as input.
Does an invert on result if Bool Invert==true.
FredAverage, (not to be confused with RedAverage):- https://forum.doom9.org/showthread.php?t=174520
Requires VS2008 CPP runtimes.
dll's for avs v2.58 & avs v2.60/+ x86 & x64.
A simple average filter for Avisynth v2.60 standard colorspaces, only. (v2.58 colorspaces for v2.58 dll)
Returns a clip where each return frame is a single color average of input frame, same size and colorspace as input.
Does an invert on result if Bool Invert==true.
ColorSpace, YV12, YV16, YV24, YV411, Y8, YUY2, RGB24, RGB32, only.
Return clip Y, U and V, or R, G and B, will be channel averages, unless Invert==True, where channels averages will be inverted.
FredAverage(clip c, Bool "Invert"=false,Bool "TV_YUV"=False)
Invert, Default false == sampled average. Otherwise Inverted average.
TV_YUV, Default false, If True(And YUV), then photo negative invert around TV levels mid Y(125.5), rather than 127.5.
Returns clip same colorspace and size as input.
StainlessS.
FredAverageTest.avs
# WHEN YUV, RHS IMAGE, outer = Average : Left Inner = PC Levels Invert : Inner Right = TV Levels Invert
AviSource("D:\Parade.avi")
Crop(0,0,Width/8*8,Height/8*8)
ConvertToYV12
ORG=LAst
AVE=ORG.FredAverage
I_PC=ORG.FredAverage(Invert=true,TV_YUV=False).BilinearResize(ORG.Width/4,ORG.Height/2)
I_TV=ORG.FredAverage(Invert=true,TV_YUV=true ).BilinearResize(ORG.Width/4,ORG.Height/2)
I=Stackhorizontal(I_PC,I_TV)
AVE=AVE.Overlay(I,x=ORG.Width/4,y=ORG.height/4)
StackHorizontal(ORG,AVE)
https://i.postimg.cc/QFHyKz6k/Fredaverage-Test.jpg (https://postimg.cc/QFHyKz6k)
See MediaFire link in sig below this post.
Zip includes v2.58 + avs v2.60/+ x86 & x64 dll's, + Source + full VS2008 project files for easy rebuild. (~76KB)
Requires VS2008 CPP runtimes.
Prompted by this post here:- https://forum.doom9.org/showthread.php?p=1803528#post1803528
dll's for avs v2.58 + avs v2.60/+ x86 & x64.
A simple average filter for Avisynth standard colorspaces, only.
Returns a clip where each return frame is a single color average of input frame, same size and colorspace as input.
Does an invert on result if Bool Invert==true.
FredAverage, (not to be confused with RedAverage):- https://forum.doom9.org/showthread.php?t=174520
Requires VS2008 CPP runtimes.
dll's for avs v2.58 & avs v2.60/+ x86 & x64.
A simple average filter for Avisynth v2.60 standard colorspaces, only. (v2.58 colorspaces for v2.58 dll)
Returns a clip where each return frame is a single color average of input frame, same size and colorspace as input.
Does an invert on result if Bool Invert==true.
ColorSpace, YV12, YV16, YV24, YV411, Y8, YUY2, RGB24, RGB32, only.
Return clip Y, U and V, or R, G and B, will be channel averages, unless Invert==True, where channels averages will be inverted.
FredAverage(clip c, Bool "Invert"=false,Bool "TV_YUV"=False)
Invert, Default false == sampled average. Otherwise Inverted average.
TV_YUV, Default false, If True(And YUV), then photo negative invert around TV levels mid Y(125.5), rather than 127.5.
Returns clip same colorspace and size as input.
StainlessS.
FredAverageTest.avs
# WHEN YUV, RHS IMAGE, outer = Average : Left Inner = PC Levels Invert : Inner Right = TV Levels Invert
AviSource("D:\Parade.avi")
Crop(0,0,Width/8*8,Height/8*8)
ConvertToYV12
ORG=LAst
AVE=ORG.FredAverage
I_PC=ORG.FredAverage(Invert=true,TV_YUV=False).BilinearResize(ORG.Width/4,ORG.Height/2)
I_TV=ORG.FredAverage(Invert=true,TV_YUV=true ).BilinearResize(ORG.Width/4,ORG.Height/2)
I=Stackhorizontal(I_PC,I_TV)
AVE=AVE.Overlay(I,x=ORG.Width/4,y=ORG.height/4)
StackHorizontal(ORG,AVE)
https://i.postimg.cc/QFHyKz6k/Fredaverage-Test.jpg (https://postimg.cc/QFHyKz6k)
See MediaFire link in sig below this post.
Zip includes v2.58 + avs v2.60/+ x86 & x64 dll's, + Source + full VS2008 project files for easy rebuild. (~76KB)