View Single Post
Old 3rd November 2008, 04:23   #10  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Try this (you'll need ColorMatrix, Yadifmod and TomsMoComp)

Code:
#########################
# INPUT
#########################

AviSource("signpost.avi")

AssumeTFF()
(isRGB()) ? ConvertToYUY2() : ColorMatrix(mode="Rec.709->Rec.601", clamp=false)

#########################
# DEINTERLACING (Bobbing)
#########################

# padding for mod16 width and height
w16 = ceil(float(width()) / 16.0) * 16
h16 = ceil(float(height()) / 16.0) * 16
bL = (w16 - width()) / 2
bR = (bL % 2 != 0) ? bL - 1 : bL
bL = (bL % 2 != 0) ? bL + 1 : bL
bT = (h16 - height()) / 2
bB = (bT % 2 != 0) ? bT - 1 : bT
bT = (bT % 2 != 0) ? bT + 1 : bT

(bL > 0 || bR > 0 || bT > 0 || bB > 0) ? AddBorders(bL, bT, bR, bB) : last

yadifmod(mode=1, edeint=Interleave(TomsMoComp(-1, 0, 0), DoubleWeave().SelectOdd().TomsMoComp(-1, 0, 0)))

(bL > 0 || bR > 0 || bT > 0 || bB > 0) ? Crop(bL, bT, bR * -1, bB * -1) : last

#########################
# CROP / RESIZE
#########################

# crop a little from the top and bottom to allow fullscreen with accurate PAR (assuming 1080i source)
Crop(0,14,0,-14)

Spline36Resize(720, 576)

######################
# OUTPUT OPTIONS
######################

# Uncomment only one of the lines below below

# This produces interlaced YV12 output
AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave().AssumeTFF().ConvertToYV12(interlaced=true)

# This produces progressive YV12 output, with blending
# Merge(SelectEven(), SelectOdd(), weight=0.5).ConvertToYV12(interlaced=false)

# This produces progressive YV12 output, without blending
# SelectEven().ConvertToYV12(interlaced=false)

Limiter(16, 235, 16, 240)

Last edited by vampiredom; 3rd November 2008 at 05:47.
vampiredom is offline   Reply With Quote