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. |
28th February 2005, 15:09 | #221 | Link |
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
channel-mixer plug-in
http://e-rels.dyndns.org/downloads/chanmix.rar chanmix(float r, float g, float b) |
28th February 2005, 15:40 | #223 | Link |
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
i thought it was obviouse from the previouse posts and the photoshop guide
it creates a greyscale image from a rgb24 source, the 3 paramaters specify how much of each color-channel is used gray = (red*r + green*g + blue*b) / (r+g+b) i hope this resembles the photoshop feature well |
28th February 2005, 23:52 | #225 | Link | |||||
ReMember
Join Date: Nov 2003
Posts: 416
|
Quote:
Personally I didn't care for that so I left it out when I did the method in Photoshop, if you could figure it out in AVISynth, that'd be good for others. Quote:
Quote:
Quote:
Quote:
Also the blankclip and color I'll do tonight also. As is though, the script emulates what I did in PS just about to the T. Anything from here on is improving on the original method, IMO. |
|||||
1st March 2005, 01:20 | #226 | Link |
ReMember
Join Date: Nov 2003
Posts: 416
|
This crashes VDub when advancing one frame when replacing DETAIL, AVISynth didn't know what DETAIL meant on that line:
DETAIL=FILM.ConvertToYUY2() DETAIL=DETAIL.subtract(DETAIL.VariableBlur(6, 6, 3, 3, 3, false, false, false)) DETAIL=DETAIL.TweakColor(sat=.5)"" And can you give an example line for your channer mixer? |
14th March 2005, 06:28 | #230 | Link |
ReMember
Join Date: Nov 2003
Posts: 416
|
[V2F] Video2Film
Sony HD cam - Left Original, Right Filtered
Sony HD cam - Left Original, Right Filtered Sony DV cam - Left Filtered, Right Original Changes: Invert for Highpass No gaussian blur (wasn't happy with the end result) No blurring of UV channels (didn't seem to matter in the end) Blankclip() instead of loading BMPs Added some color values at the bottom of the script for reference AddGrain (in script for whoever wants to use it) ToDo: Use Tweak instead of Tweak color. What command would be for Saturation? Something so simple escapes me, but I can recreate this Photoshop method easily. Code:
#[V2F] Video2Film LoadPlugin("DGDecode.dll") LoadPlugin("Decomb521.dll") LoadPlugin("GiCoCU.dll") LoadPlugin("TweakColor.dll") LoadPlugin("FFT3DFilter.dll") LoadPlugin("WarpSharp.dll") LoadPlugin("AddGrain.dll") LoadPlugin("Chanmix.dll") BaseLayer=AVISource("...")#.FieldDeinterlace(blend=false).Lanczos4Resize(720,360) BaseLayer=MPEG2Source("...")#.FieldDeinterlace(blend=false).Lanczos4Resize(720,360) #FILM Layer FILM=BaseLayer.ConvertToRGB24().GiCoCU("film.amp",photoshop=true) #Sharpen & Gaussian Blur [Unsharp Mask on Luminance Layer + GB on A/B Channels] SG=FILM.ConvertToYUY2().unsharpmask(400,2,0) #Contrast Layer 1 [Dup FILM layer - (70% blue, 10% green, 20% red) Opacity 20%] CONT=SG.ConvertToRGB24().Chanmix(20, 10, 70) #Highlight Layer [Dup FILM Layer - Gaussian Blur Radius 5 pixels Layer blend Screen, Opacity 52%] HIGH=FILM.Blur(1.5) #Detail Layer [Dup FILM layer - Highpass Radius 6 pixels Image/Adjust/Desaturate Layer blend Soft Light, opacity 30%] DETAIL=FILM.Invert().ConvertToYUY2().TweakColor(sat=.25) #Color Cast [Fill with color cast choice; medium dark green or orange are good Layer blend Soft Light, Opacity 40%. Use lower opacity for less dramatic effect] COLORCAST=BlankClip(width=720,height=360,color=$C0C0C0) #Original Blend [Dup base (unmodified) layer. Layer blend normal, opacity 30%. Adjust this opacity to get a balance between contrast and smoothness.] OBLEND=BaseLayer #Shadow Pull-up [Layer blend Lighten, Opacity 15% - Base Layer] SHADOW=BaseLayer.ConvertToRGB24.GiCoCU("shadow.amp",photoshop=true) #Highlight Pull-Down [Layer blend Lighten, Opacity 20% - Base Layer] HIGHPD=BaseLayer.ConvertToRGB24.GiCoCU("highlight.amp",photoshop=true) #Contrast Layer 2 [Dup FILM Layer - Desaturate by 50% Layer blend Soft Light, Opacity 10%] CONT2=SG.ConvertToYUY2().TweakColor(sat=.5) a=Overlay(SG, CONT, mode="Blend", opacity=.2) b=Overlay(a,HIGH, mode="Add", opacity=0.52) c=Overlay(b, DETAIL, mode="SoftLight", opacity=.3) d=Overlay(c, COLORCAST, mode="SoftLight", opacity=.3) e=Overlay(d, OBLEND, mode="Blend", opacity=.3) f=Overlay(e, SHADOW, mode="Lighten", opacity=0.15) g=Overlay(f, HIGHPD, mode="Lighten", opacity=0.2) h=Overlay(g, CONT2, mode="SoftLight", opacity=0.1) LAST=Overlay(h, BaseLayer, mode="Blend", opacity=0.8) FINAL=LAST.AddBorders(0,60,0,60) Return(FINAL) #ConvertToYV12() #AddGrain(18,0,0) #ColorCast Color Values #blue,medium = 4F4FBD #blue,dark = 03036B #blue,pure = 0000FF #green,medium = 2E703F,22AC1C #grey,light = C0C0C0 #grey,dark = 808080 #orange,light = F7D6730 #purple, medium = AC4FBD #red,light = FF4646 #red, medium = A60505 #red, dark = 890101 |
16th April 2005, 14:39 | #232 | Link |
miau
Join Date: May 2002
Location: Lisbon
Posts: 594
|
Awesome work that is been done here, definitely worthy of going to avisynth shared functions.
__________________
"... but where are those missing pieces of eternal soul, I can feel them but I can't reach them with my vision" Petition for a software patent free Europe Another vision of what happened at 9/11
|
16th April 2005, 23:20 | #234 | Link |
ReMember
Join Date: Nov 2003
Posts: 416
|
Using Overlay really kills the speed of this process. If that was sped up or if a plugin that can do Overlay faster is made, that would be very productive. Now it doesn't seem to matter what you do to each layer, the resolution, or such...it still runs about the same speed.
Since my last post I did a couple changes to the script. I'm always using it and playing with it, so maybe so I'll post that update. I rather have a speed increase to show off. Maybe I should look into MaskTools...don't know as of now. |
17th April 2005, 08:46 | #235 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
yv12lutxy may be what you need. the syntax is a brain-killer though (reverse polish i think it's called). easy when you get the hang of it though.
__________________
sucking the life out of your videos since 2004 |
17th April 2005, 12:04 | #236 | Link |
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
that syntax isn't that hard once you got the basics
IIRC there are 2-3 plug-ins missing i'll do that when i got time i'll also look into a correct overlay function, that includes all the photoshop modes we need let's see how fast/slow i can make it |
17th April 2005, 19:01 | #237 | Link |
Registered User
Join Date: Jun 2003
Location: Land of the Noobs & the Home of the Brave
Posts: 349
|
Instead of using overlay use merge:
function merge(clip a,clip b,float "opacity"){ opacity=default(opacity,0.5) return a.MergeLuma(b,opacity).MergeChroma(b,opacity) } It is also faster than it's yv12overlay counterpart: function yv12overlay(clip a,clip b,float "opacity") { aExp="x "+string(opacity)+" * y 1 "+string(opacity)+" - * +" return yv12lutxy(a,b,yexpr=aExp,uexpr=aExp,vexpr=aExp) } Take a look at this thread for actual tested results: http://forum.doom9.org/showthread.php?s=&threadid=82127 Regards, joshbm
__________________
Tired of waiting for video encodes? Get a totally new P4 Desktop Computer for FREE. |
17th April 2005, 22:26 | #239 | Link |
ReMember
Join Date: Nov 2003
Posts: 416
|
-I'll look into merge, yv12overlay, and yv12lutxy today.
-Gaussian Blur is working with a script -Need to see if it's possible to apply a filter to UV and not the Y channel without using FFT3DFilter -Overlay's functions mimic Photoshop's exactly. Just with different names. I did comparisons. Other than that, I forget what else I changed. I'll do some speed tests and post samples tonight or tomorrow. Thanks for the suggestions. |
17th April 2005, 22:47 | #240 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
> we need different algos
... and you can put together just anything through yv12lutxy. Backwoods: You're doing 11 (eleven) Overlay()'s in a row. I can imagine speed is no big fun with that script. Using LUTs from MaskTools would increase the speed quite a bit. Plus, the overlay of "colorcast" would not be needed, as it could be packed into the preceeding "detail" overlay. BTW, you're generating three clips from "baselayer", and do ConvertToRGB24()all three times. One time would be enough: > baselayer24 = baselayer.ConvertToRGB24() > FILM=BaseLayer24.GiCoCU("film.amp",photoshop=true) > SHADOW=BaseLayer24.GiCoCU("shadow.amp",photoshop=true) > HIGHPD=BaseLayer24.GiCoCU("highlight.amp",photoshop=true) In similar manner, you could avoid one of those FILM.ConvertToYUY2() that are done two times. Overall, there are pretty much colorspace conversions going on. Cutting them down as far as possible, and doing all the processing with LUTs, speed should get in acceptable range. If only you all would come up with some processing description more specific than "PhotoShop Filter XYZ" ... edit: only thing that can *not* be done with yv12lut/xy is that weird "Hardlight" overlay of Photoshop (with transporting luma over/underflows to the chroma planes), since "inter-plane" operations are not available. I never understood why PS uses that weird sort of Hardlight'ing. Why not use a clean algo that floors down at 0 resp. 255 ... For me it's a strange dogma that something is "right", only because Photoshop is doing somthing just as it does
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 17th April 2005 at 22:57. |
|
|