2011年3月18日金曜日

deltterl cx対応暫定版

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

フジテレビL字に対応。

deletterl(100, 200, "cx")

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

MX, フジテレビはL字消し後にロゴ消し
テレ東はロゴ消し後にL字消し

MX ,フジテレビでは元映像が大きく欠けるためL字消し後もL字が少し残ります。残った部分を誤魔化す方法として新しい手法(といっても陳腐なごまかしだけど)を追記予定。

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+53) ? 1 + f - s :
\ ((f >= e-53 && 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 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()
}

deltterl tx対応暫定版

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


パート2も中途半端だったり編集ミスで正常に動作しない内容になっていたことがあったりと問題が多くてごめんなさい、な状態でしたがテレビ東京L字に対応した暫定版。不適切な部分もMX版の欠点そのままで不備も多いので少し整理して(みどり)に移動する予定。

テレビ東京の場合、

deletterl(100, 200, "tx")

と最後に"tx"を追加して指定する以外はMXと同じ。

function deletterl_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+53) ? 1 + f - s :
\ ((f >= e-53 && 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 deletterl_sz(clip c, int s, int e, string "tp") {
ft = "deletterl_f(" + String(s) + "," +
\ String(e) + ",current_frame)"
return c.ConvertToRGB24().ScriptClip(
\ ((tp == "tx") ? "deletterltx_f(" : "deletterl_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()
}