digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Computers (http://www.digitalfaq.com/archives/computers/)
-   -   Video Screen Capture (http://www.digitalfaq.com/archives/computers/14346-video-screen-capture.html)

nicksteel 08-15-2006 11:53 AM

Video Screen Capture
 
Would like to try a screen capture of one of my screensavers (Marine Aquarium) to DVD. (Moving fish in an aquarium) Need recommendations for screen capture software to try (if it is even feasible).

kwag 08-15-2006 11:56 AM

Hi nicksteel,

Doesn't the "Print Screen" key work, followed py a "Paste" into Windows Paint?

-kwag

nicksteel 08-15-2006 12:15 PM

No, this is an animated screensaver. You should try it if you haven't. It's Sachs Marine Aquarium (Serenescreen) if you ever want to look at it. Many stores have it running on their demos. The guy is one hell of an animator (used to write Atari games). His company has a DVD also, but I wanted to pick my own scenes/fish. Just something to play with.

nicksteel 08-15-2006 12:16 PM

I suppose I could pick up a tv out video card for one computer and capture it with the PVR-250. Just wondering if there's another way.

Boulder 08-15-2006 12:58 PM

If it's a DirectX screensaver, Fraps might be able to capture a video out of it.

nicksteel 08-15-2006 01:21 PM

Thanks.

I saw fraps. I just downloaded CamStudio from SourceForge to try first. Nothing serious, just want to see if I can do it. Have found reference to several freebie programs so far.

nicksteel 08-15-2006 03:03 PM

Could someone scan this and advise some settings? Kinda over my head.

students.uwsp.edu/ebude998/Files/CamStudio User Manual.pdf

Need maximum quality (don't care about size) for final KDVD.

nicksteel 08-15-2006 07:33 PM

Tried

Camstudio (free) best of the lot.
ScreenVirtuoso Pro 2.40
HyperCam 2

All were jerky. It was worth a try, but none can capture without dropping frames. Given, the screensavers I tested with are very detailed and high tech.

nicksteel 08-19-2006 11:14 AM

Have started to get smoother captures with Fraps. Need an avi to kdvd script and can't find with search (so many posts).

Haven't ever worked with avi, so starting at ground zero. I do remember Phil and Boulder had some scripts once, but can't find. This is a 29.97 capture (frame rate on jpg is output rate from saver).

(The capture is much better that the jpg shows, just wanted to give an idea)

Any help would be appreciated.

http://www.digitalfaq.com/archives/error.gif

Dialhot 08-20-2006 12:51 PM

Quote:

Originally Posted by nicksteel
I do remember Phil and Boulder had some scripts once, but can't find. This is a 29.97 capture (frame rate on jpg is output rate from saver).

Is it interlaced or progressive ?
The script you are looking for are there, but this is for progressive :
http://www.kvcd.net/forum/viewtopic.php?t=7223

nicksteel 08-20-2006 02:20 PM

These captures are intelaced (sorry, I certainly should have mentioned that!).

Am also looking at video cards with video out. Very confusing.

Both of my computers have onboard intel graphics which perform very well. The Gateway has an ATI HDTV capture board and has a 16x PCI Express socket. Am considering an "Add2" board with a s-video out.

The HP has a PVR-150 capture board and has an AGP 4X socket. Not all that fast an option. Am considering a Ratheon 9000 or 9250 board for the HP with s-video out.

A lot of trouble to capture screensavers, but, what the hell!

I can either put an add2 board out into the Gateway and feed into the Hp or put a s-video board into the HP and feed back into the PVR-250.

Quite a mess, but tv software capture programs are just too slow. I'm going to get something that will output 1024x768, as this will exceed NTSC.

Have to start looking on Ebay!

nicksteel 09-01-2006 10:01 AM

Out of options
 
Tried

XFX GeForce 6200 256MB AGP w/DVI/TV-OUT
NTSC S-Video out into PVR-150

Ultimate XP Pro: PC to TV Component (VGA out Scan converter)
NTSC S-Video out into PVR-150

Both fuzzy.

I have found no input boards that will capture above TV resolution, nor screen capture programs that will support smooth 30fps at 1024x768. Some graphics boards have MPEG-2 encoders, but no way to use for capture. :(

Have tried different codecs, trying to trade off capture quality with compression speed. Just can't write to disk fast enough (SATA drives, fast processor).

Dialhot 09-01-2006 10:23 AM

Hight velocity capture, in DV mode for instance, sometimes claim to use RAID-? discs for faster writing.
I do not remember the level of Raid needed :oops:

kwag 09-01-2006 06:10 PM

Quote:

Originally Posted by Dialhot
Hight velocity capture, in DV mode for instance, sometimes claim to use RAID-? discs for faster writing.
I do not remember the level of Raid needed :oops:

"Stripe set". RAID 0 ;)

-kwag

nicksteel 09-01-2006 06:51 PM

Think RAID is a little outside my skills level. 8O I noticed that the boards were not all that high, but setting it up would be a challenge.

Just wish someone would come out with a hardware encoder (like PVR-150 for TV) accepting VGA (monitor) input at higher resolutions. Seems like there would be a market among gamers, as they are always trying to screen capture their high res games and scan converters are just not all that great.

kwag 09-02-2006 10:35 PM

Hi nicksteel,

Are you aware that most new motherboards have SATA RAID controlers built in :?:
Just put a couple of SATA drives, configured as RAID 0, and you'll have a screamer machine :)

-kwag

Dialhot 09-03-2006 10:18 AM

Quote:

Originally Posted by kwag
Are you aware that most new motherboards have SATA RAID controlers built in :?:

Exactly, and that is why I mentioned to use RAID :)

gamma 09-04-2006 04:15 AM

I've just seen this post, I have worked with Camtasia Studio from Techsmith, to transfer Powerpoint presentations to DVD. Worked very well, and at high resolutions. Maybe you can give it try :D

nicksteel 09-11-2006 12:15 PM

Quote:

Originally Posted by kwag
Hi nicksteel,

Are you aware that most new motherboards have SATA RAID controlers built in :?:
Just put a couple of SATA drives, configured as RAID 0, and you'll have a screamer machine :)

-kwag

My computer has two sata drives. Does this mean I have Raid?

Boulder 09-11-2006 12:49 PM

You need to build the RAID array, see your motherboard's manual on how to do that. You'll lose all existing data on those two drives though.

nicksteel 09-11-2006 01:06 PM

Quote:

Originally Posted by Boulder
You need to build the RAID array, see your motherboard's manual on how to do that. You'll lose all existing data on those two drives though.

Thanks, Boulder. Think I'll back off that idea ("You'll lose all existing data on those two drives though.").

nicksteel 12-08-2006 05:43 AM

Finally upgraded my dual core with GeForce 7600GT and bought full version of Fraps (now enhanced for dual core). Capturing aquarium (Dream Aquarium) screensaver at 29.97fps at 1280x1024 - smooth.

Intend to make DVD. Tried Phil's:
http://www.kvcd.net/forum/viewtopic.php?t=7223. Results are pretty blurred.

Have attached jpg of original avi capture. The actual frames are clearer. Need some ideas to try.

http://www.digitalfaq.com/archives/error.gif

Boulder 12-08-2006 06:09 AM

Why filter at all as there is no noise? I would just resize and encode, possibly do light deblocking (the blue areas look as if they had some blocking).

nicksteel 12-08-2006 06:13 AM

Quote:

Originally Posted by Boulder
Why filter at all as there is no noise? I would just resize and encode, possibly do light deblocking (the blue areas look as if they had some blocking).

How should I deblock? I did notice the blue areas.

Boulder 12-08-2006 06:44 AM

With BlindPP(CPU=4,quant=x), raising the value x till the result satisfies you. Another option is to use Deblock_QED (leave the settings at default):
Code:

function Deblock_QED_MT2 ( clip clp, int "quant1", int "quant2",
 \                    int "aOff1", int "bOff1", int "aOff2", int "bOff2", int "uv" )
{
quant1 = default( quant1, 20 )
quant2 = default( quant2, 24 )

aOff1  = default( aOff1, 2 )  #  I've no clue if these are clever values or not!
bOff1  = default( bOff1, 4 )  #  So:
aOff2  = default( aOff2, 4 )  #  Also try all these 4 values @ 0 (zero),
bOff2  = default( bOff2, 8 )  #  and quant1=30, quant2=40~45 instead.
uv    = default( uv,      3 )      #  u=3 -> use proposed method for chroma deblocking
                                    #  u=2 -> no chroma deblocking at all (fastest method)
ox    = clp.width()                #  u=1|-1 -> directly use chroma debl. from the normal|strong deblock()
oy    = clp.height()               

# With avisynth scripting, there is no information available about the position of the  currently
# processed pixel ... there simply is no such thing like an "actual" processed pixel.
# So first I've to build up a grid covering the transitions between all 8x8 blocks,
# and make some LUTmania with it later. Yes, this is cumbersome.

block = blankclip(clp,width=6*4,height=6*4,color=$000000).addborders(4,4,4,4,color=$FFFFFF)
block = stackhorizontal( block,block,block,block)
block = stackvertical(  block,block,block,block) .pointresize(32,32) .mt_binarize(upper=false)
block = stackhorizontal( block,block,block,block,block,block,block,block)
block = stackvertical(  block,block,block,block,block,block)
block = stackhorizontal( block,block,block)
block = stackvertical(  block,block,block)
block = stackhorizontal( block,block,block)
block = stackvertical( block,block)
#return clp.subtitle(string(block.width)+"x"+string(block.height))
block = block .crop(0,0,ox,oy)
block = (uv!=3) ? block
 \    : YtoUV(block.crop(0,0,ox/2,oy/2),block.crop(0,0,ox/2,oy/2),block)
block = block.trim(1,1) .loop(framecount(clp))


# create normal deblocking (for block borders) and strong deblocking (for block interiour)
normal  = clp.deblock(quant=quant1,aOffset=aOff1,bOffset=bOff1)
strong  = clp.deblock(quant=quant2,aOffset=aOff2,bOffset=bOff2)

# build difference maps of both
normalD  = mt_makediff(clp,normal,chroma=uv>2?"process":"ignore")
strongD  = mt_makediff(clp,strong,chroma=uv>2?"process":"ignore")

# separate border values of the difference maps, and set the interiours to '128'
strongD2 = mt_lutxy(StrongD,block,expr="y 255 == x 128 ?",U=uv,V=uv)
normalD2 = mt_lutxy(normalD,block,expr="y 255 == x 128 ?",U=uv,V=uv)

# interpolate the border values over the whole block: DCTFilter can do it. (Kiss to Tom Barry!)
# (Note: this is not fully accurate, but a reasonable approximation.)
strongD3 = strongD2.mt_lut(expr="x 128 - 1.01 * 128 +",U=uv,V=uv).dctfilter(1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0)# .yv12lut("x 128 - 2 / 128 +")

# apply compensation from "normal" deblocking to the borders of the full-block-compensations calculated
# from "strong" deblocking ...
strongD4 = mt_lutxy(strongD3,normalD2,expr="y 128 == x y ?",U=uv,V=uv)

# ... and apply it.
deblocked= mt_makediff(clp,strongD4,chroma=uv>2?"process":"ignore")

# simple decisions how to treat chroma
deblocked = (uv<0) ? deblocked.mergechroma(strong) : uv<2 ? deblocked.mergechroma(normal) : deblocked

deblocked
return( last )
}

You'll need the latest MaskTools v2 alpha, DCTFilter and Deblock.

http://manao4.free.fr/
http://avisynth.org.ru/mvtools/deblock.html

Important : deblock before any resizing!

nicksteel 12-08-2006 07:33 AM

Tested with:

AVISource("E:\cap\04.avi",false)
converttoyv12()
LanczosResize(704,480,0,0,1184,1024)
Deblock_QED_MT2()
ConverttoRGB24()

Cleared up the "blue" area. FInal is not as sharp as the original, but pretty good.

Thanks :D

Boulder 12-08-2006 07:34 AM

Move the deblocking before resizing, it's very important. The sharp block edges will not be there after resizing so deblocking is not efficient.

nicksteel 12-20-2006 09:30 PM

This working pretty good, but one capture could be better. Any suggestions? I have attached a jpg frame from the avi source and a bmp frame from the encoded mpg. (A bmp frame from the source AVI is almost 4MB - but about perfect!

AVISource("E:\cap\m01.avi")

converttoyv12()
Deblock_QED_MT2()

LanczosResize(656,480,2,0,1276,1024)
AddBorders(32,0,32,0)
#FadeOut(150)
ConverttoRGB24()

http://www.digitalfaq.com/archives/error.gif

http://www.digitalfaq.com/archives/error.gif

Boulder 12-21-2006 04:10 AM

What do you mean the mpeg file doesn't look fine? The original file is super-sharp (if not oversharp) and that's always a problem for the encoder. Try using Spline36Resize instead of Lanczos. If you need more sharpness, there's SeeSaw.

Boulder 12-21-2006 07:24 AM

And another point : if you encode to MPEG2, ditch TMPGEnc and use HC instead. You can avoid that one (actually two) extra colorspace conversion and HC provides better quality anyway.

nicksteel 12-21-2006 07:41 AM

Boulder,
Which of the following should I use? :?:

[v2.56]
Spline36Resize (clip, int target_width, int target_height) [v2.56]
Spline36Resize (clip, int target_width, int target_height, float "src_left", float "src_top", float "src_width", float "src_height")

What will my resize line look like? :?:

Quote:

a=AVISource("E:\cap\m01.avi")
b=AVISource("E:\cap\m02.avi")
a+b
converttoyv12()
Deblock_QED_MT2()

LanczosResize(656,480,2,0,1276,1024)
AddBorders(32,0,32,0)
#FadeOut(150)
ConverttoRGB24()
Do I need to use clip=a+b (I'm joining Fraps avi files)? :?:

Could you recommend some parameters for seesaw? :?:

SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)

Lots of questions and my low skills level. :?
I certainly appreciate your advice so far. The results are outstanding. :!:

Boulder 12-21-2006 07:45 AM

Just put Spline36Resize instead of LanczosResize. The parameters are exactly the same.

What comes to SeeSaw, first try with the default values, just use SeeSaw(). All the fine tuning depends on your source and you must choose what you like and dislike.

Use a++b to keep the a/v sync.

nicksteel 12-21-2006 09:17 AM

:D Thanks as usual, Boulder, and:

Quote:

Originally Posted by Boulder
Use a++b to keep the a/v sync.

a++b instead of a+b? New to me, shows how little I know. :oops:

Just downloaded HCenc. Want to try it out!

So many settings. Can't find detailed instructions. :?:

Dialhot 12-21-2006 10:49 AM

Quote:

Originally Posted by nicksteel
Can't find detailed instructions. :?:

Delivered with the encoder itself, in a PDF document.

nicksteel 12-21-2006 11:30 AM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by nicksteel
Can't find detailed instructions. :?:

Delivered with the encoder itself, in a PDF document.

:oops: My extractor failed to extract this (and other) files. Will extract with another program.

:D Thanks. There are so many settings that I really need something!

nicksteel 12-21-2006 12:07 PM

Having read the PDF, need to know anything I should change from defaults. Am encoding NTSC DVD's.

Like
"constant Quantization"
"autogop"
"matrix"

Boulder 12-21-2006 12:40 PM

Constant quant should be disabled.

If you are unsure of the settings, just load the avs file in HC and click the "make DVD compliant" button. Then set the average and maximum bitrates according to your wishes and choose the quant matrix you wish to use.

Dialhot 12-21-2006 01:25 PM

Quote:

Originally Posted by Boulder
Constant quant should be disabled.

Why ?
I encode this way. This is the only "1pass quality"-like mode provided by HC. Are you using it only in 2-pass VBR ?

Thats is Autogop that should be disable IMHO.

Boulder 12-21-2006 02:00 PM

I don't like to use a lot of time predicting a correct quant so I'm using 2-pass as the rate control is very good. AutoGOP is useful especially with high-motion video. Most of the time the GOP is the maximum length even with autoGOP.

nicksteel 12-21-2006 04:23 PM

Trying to use seesaw(). Can't find yv12lutxy()

AVISource("E:\cap\m01.avi")

converttoyv12()
Deblock_QED_MT2()

Spline36Resize(656,480,2,0,1276,1024)
Seesaw()

#AddBorders(32,0,32,0)
#FadeOut(150)
ConverttoRGB24()


function Deblock_QED_MT2 ( clip clp, int "quant1", int "quant2",
\ int "aOff1", int "bOff1", int "aOff2", int "bOff2", int "uv" )
{
quant1 = default( quant1, 20 )
quant2 = default( quant2, 24 )

aOff1 = default( aOff1, 2 ) # I've no clue if these are clever values or not!
bOff1 = default( bOff1, 4 ) # So:
aOff2 = default( aOff2, 4 ) # Also try all these 4 values @ 0 (zero),
bOff2 = default( bOff2, 8 ) # and quant1=30, quant2=40~45 instead.
uv = default( uv, 3 ) # u=3 -> use proposed method for chroma deblocking
# u=2 -> no chroma deblocking at all (fastest method)
ox = clp.width() # u=1|-1 -> directly use chroma debl. from the normal|strong deblock()
oy = clp.height()

# With avisynth scripting, there is no information available about the position of the currently
# processed pixel ... there simply is no such thing like an "actual" processed pixel.
# So first I've to build up a grid covering the transitions between all 8x8 blocks,
# and make some LUTmania with it later. Yes, this is cumbersome.

block = blankclip(clp,width=6*4,height=6*4,color=$000000). addborders(4,4,4,4,color=$FFFFFF)
block = stackhorizontal( block,block,block,block)
block = stackvertical( block,block,block,block) .pointresize(32,32) .mt_binarize(upper=false)
block = stackhorizontal( block,block,block,block,block,block,block,block)
block = stackvertical( block,block,block,block,block,block)
block = stackhorizontal( block,block,block)
block = stackvertical( block,block,block)
block = stackhorizontal( block,block,block)
block = stackvertical( block,block)
#return clp.subtitle(string(block.width)+"x"+string(block. height))
block = block .crop(0,0,ox,oy)
block = (uv!=3) ? block
\ : YtoUV(block.crop(0,0,ox/2,oy/2),block.crop(0,0,ox/2,oy/2),block)
block = block.trim(1,1) .loop(framecount(clp))


# create normal deblocking (for block borders) and strong deblocking (for block interiour)
normal = clp.deblock(quant=quant1,aOffset=aOff1,bOffset=bOf f1)
strong = clp.deblock(quant=quant2,aOffset=aOff2,bOffset=bOf f2)

# build difference maps of both
normalD = mt_makediff(clp,normal,chroma=uv>2?"process":"igno re")
strongD = mt_makediff(clp,strong,chroma=uv>2?"process":"igno re")

# separate border values of the difference maps, and set the interiours to '128'
strongD2 = mt_lutxy(StrongD,block,expr="y 255 == x 128 ?",U=uv,V=uv)
normalD2 = mt_lutxy(normalD,block,expr="y 255 == x 128 ?",U=uv,V=uv)

# interpolate the border values over the whole block: DCTFilter can do it. (Kiss to Tom Barry!)
# (Note: this is not fully accurate, but a reasonable approximation.)
strongD3 = strongD2.mt_lut(expr="x 128 - 1.01 * 128 +",U=uv,V=uv).dctfilter(1.0,1.0,0.0,0.0,0.0,0.0,0. 0,0.0)# .yv12lut("x 128 - 2 / 128 +")

# apply compensation from "normal" deblocking to the borders of the full-block-compensations calculated
# from "strong" deblocking ...
strongD4 = mt_lutxy(strongD3,normalD2,expr="y 128 == x y ?",U=uv,V=uv)

# ... and apply it.
deblocked= mt_makediff(clp,strongD4,chroma=uv>2?"process":"ig nore")

# simple decisions how to treat chroma
deblocked = (uv<0) ? deblocked.mergechroma(strong) : uv<2 ? deblocked.mergechroma(normal) : deblocked

deblocked
return( last )
}

function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.

Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )

ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )

denoised = defined(denoised) ? denoised : yv12lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)

NRdiff = yv12lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = yv12lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.maskedmerge(tame,tame.prewitt(multiplier=1.0) .expand().removegrain(20))

(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,Sdamp Hi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,S power,Szp,SdampLo,SdampHi,Smode),head.bicubicresiz e(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)

Soothe(last,tame,sootheT,sootheS)
sharpdiff= yv12lutxy(tame,last,"x y - 128 +",U=1,V=1)

(NRlimit==0) ? clp : \
yv12lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)

Slimit>=0 ? yv12lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : yv12lutxy(last,sharpdiff,"y 128 = x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)

return( last )
}


# ======= Modified sharpening function =======

function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"

yv12lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y = x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",U=2,V=2)
return( last )
}


# ======= Soothe() function to stabilze sharpening =======

function Soothe(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))

yv12lutxy(orig,sharp,"x y - 128 +","x y - 128 +","x y - 128 +", U=1,V=1)

(sootheS==0) ? last
\ : yv12lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", U=1,V=1)

(sootheT==0) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)

(sootheT > -1) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)

yv12lutxy(orig,last,"x y 128 - -","x y 128 - -","x y 128 - -",U=1,V=1)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}


# ======= MOD4-and-atleast-16 helper function =======

function m4(float x) {x<16?16:int(round(x/4.0)*4)}


All times are GMT -5. The time now is 02:16 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.