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. |
17th December 2016, 23:10 | #1 | Link |
Registered User
Join Date: Dec 2005
Posts: 110
|
Chromashift
Q1: Is there an easier way to kick chroma around?
Code:
sl = 0 sr = 2 chroma_u = core.std.ShufflePlanes(video, planes=[1], colorfamily=vs.GRAY) chroma_u = core.std.CropRel(chroma_u, left=sl) chroma_u = core.std.AddBorders(chroma_u, right=sl) chroma_u = core.std.CropRel(chroma_u, right=sr) chroma_u = core.std.AddBorders(chroma_u, left=sr) chroma_v = core.std.ShufflePlanes(video, planes=[2], colorfamily=vs.GRAY) chroma_v = core.std.CropRel(chroma_v, left=sl) chroma_v = core.std.AddBorders(chroma_v, right=sl) chroma_v = core.std.CropRel(chroma_v, right=sr) chroma_v = core.std.AddBorders(chroma_v, left=sr) video = core.std.ShufflePlanes(clips=[video, chroma_u, chroma_v], planes=[0, 0, 0], colorfamily=vs.YUV) |
18th December 2016, 01:08 | #2 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,588
|
Q1:
Mildly inefficient since luma gets shifted too but much shorter: Code:
sl = 0 sr = 2 video = core.std.ShufflePlanes(clips=[video, core.std.CropRel(video, left=sl, right=sr).std.AddBorders(right=sl, left=sl)], planes=[0, 1, 2], colorfamily=vs.YUV) Q2: Yes
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
Tags |
chromashift, colormatrix, vapoursynth |
Thread Tools | Search this Thread |
Display Modes | |
|
|