2011年3月20日日曜日

deltterl tvk対応暫定版

※この記事の処理は推奨しません。こちらを参照して下さい


tvkL字に暫定対応。ただ少し例外的な処理が必要な感じでこのままでは難あり。

deletterl(100, 200, "tvk")

放送局指定
"cx" フジテレビ, "tx" テレビ東京, "tvk" テレビ神奈川, "mx"(または指定なし) TOKYO MX

わかりにくい制約があったリ不要な劣化や無駄を削減するなど工夫すべき点も多い状態だけど、調整に時間もかかりそうなので、先に対処可能な局について一通り調べてから整理する予定。

function deletterlmx_f(clip c, int s, int e, int f) {
r = (f <> e ) ? 0 :
\ ((f >= s && f <= s+30) ? 1 + f - s :
\ ((f >= e-30 && f <= e) ? 1 + e - f : 31))
w=5.809
h=2.178
return c.Lanczos4Resize(
\ 1440, 540, w*r, 0, 1440-w*r, 540-h*r)
}
function deletterltx_f(clip c, int s, int e, int f) {
r = (f <> e ) ? 0 :
\ ((f >= s && f <= s+54) ? 1 + f - s :
\ ((f >= e-54 && f <= e) ? 1 + e - f : 55))
w=3.93
h=1.477
return c.Lanczos4Resize(
\ 1440, 540, w*r, 0, 1440-w*r, 540-h*r)
}
function deletterlcx_f(clip c, int s, int e, int f) {
r = (f <> e ) ? 0 :
\ ((f >= s && f <= s+60) ? 1 + f - s :
\ ((f >= e-60 && f <= e) ? 1 + e - f : 61))
w=2.93
h=1.10
return c.Lanczos4Resize(
\ 1440, 540, w*r, 0, 1440-w*r, 540-h*r)
}
function deletterltvk_f(clip c, int s, int e, int f) {
r = (f <> e ) ? 0 :
\ ((f >= s && f <= s+12) ? 1 + f - s :
\ ((f >= e-12 && f <= e) ? 1 + e - f : 13))
w=18.92
h=7.096
return c.Lanczos4Resize(
\ 1440, 540, w*r, 0, 1440-w*r, 540-h*r)
}
function deletterl_sz(clip c, int s, int e, string "tp") {
return c.ConvertToRGB24().ScriptClip(
\ "deletterl" + tp + "_f(" + String(s) + "," +
\ String(e) + ",current_frame)"
\ ).ConvertToYUY2()
}
function deletterl(clip c, int s, int e, string "tp") {
tp = default(tp, "mx")
return c.ConvertToYUY2(interlaced=true).
\ separatefields().
\ ApplyRange(s, e, "deletterl_sz", s, e, tp).
\ weave()
}