View Single Post
Old 19th February 2019, 05:00   #12  |  Link
spoRv
Registered User
 
Join Date: Nov 2016
Posts: 151
I've made two simple function to shuffle video... they are quite basic, but do the job; indeed, I'd prefer something more "dramatic"!

Code:
function deconstruct(clip clip) {
w=clip.width/4
h=clip.height/4
clip
a01=crop(0  ,0  ,w,h).fliphorizontal
a02=crop(w  ,0  ,w,h).turn180
a03=crop(w*2,0  ,w,h).fliphorizontal
a04=crop(w*3,0  ,0,h).invert("br")
a05=crop(0  ,h  ,w,h).invert
a06=crop(w  ,h  ,w,h).flipvertical
a07=crop(w*2,h  ,w,h).swapuv
a08=crop(w*3,h  ,0,h).turn180
a09=crop(0  ,h*2,w,h).swapuv
a10=crop(w  ,h*2,w,h).invert("rg")
a11=crop(w*2,h*2,w,h).turn180
a12=crop(w*3,h*2,0,h).invert
a13=crop(0  ,h*3,w,0).swapuv
a14=crop(w  ,h*3,w,0).flipvertical
a15=crop(w*2,h*3,w,0).invert("gb")
a16=crop(w*3,h*3,0,0).invert

stackvertical(\
stackhorizontal(a12,a05,a08,a15),\
stackhorizontal(a06,a10,a01,a09),\
stackhorizontal(a11,a16,a14,a04),\
stackhorizontal(a03,a07,a13,a02))\
.Invert("BG").turn180.SwapUV
}

function reconstruct(clip clip) {
w=clip.width/4
h=clip.height/4
clip.SwapUV.turn180.Invert("GB")
a12=crop(0  ,0  ,w,h).invert
a05=crop(w  ,0  ,w,h).invert
a08=crop(w*2,0  ,w,h).turn180
a15=crop(w*3,0  ,0,h).invert("bg")
a06=crop(0  ,h  ,w,h).flipvertical
a10=crop(w  ,h  ,w,h).invert("gr")
a01=crop(w*2,h  ,w,h).fliphorizontal
a09=crop(w*3,h  ,0,h).swapuv
a11=crop(0  ,h*2,w,h).turn180
a16=crop(w  ,h*2,w,h).invert
a14=crop(w*2,h*2,w,h).flipvertical
a04=crop(w*3,h*2,0,h).invert("rb")
a03=crop(0  ,h*3,w,0).fliphorizontal
a07=crop(w  ,h*3,w,0).swapuv
a13=crop(w*2,h*3,w,0).swapuv
a02=crop(w*3,h*3,0,0).turn180

stackvertical(\
stackhorizontal(a01,a02,a03,a04),\
stackhorizontal(a05,a06,a07,a08),\
stackhorizontal(a09,a10,a11,a12),\
stackhorizontal(a13,a14,a15,a16))
}
spoRv is offline   Reply With Quote