ChiDragon
27th January 2016, 20:17
I capture 480p60 from the HDMI output of some devices that won't do 480i over HDMI. The original content they're displaying is 480i60, which I retrieve manually with a nearly-typical reinterlace script.
# Reinterlace v1.1
#
# Takes progressive input and re-interlaces it, outputting TFF. Specify input field order: TFF=1 & BFF=0.
#
function Reinterlace(clip c, int "order")
{
order = Default(order,1)
T = (order == 1) ? c : c.Trim(1,0) # Changes BFF to TFF, matching all my other devices
return T.AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
}
It's easy to see which fields are needed from the source visually. They have lines with a height of 1 pixel instead of "0.5 px", if you will... Looking at the captured progressive frames, it isn't clear to me, but I've included them for completeness.
Reinterlace(1) vs Reinterlace(0)
http://s18.postimg.org/wqe5asmd5/DVDR3575_H_JVC_Menu_Reinterlace0.jpg http://s18.postimg.org/dzc80mrsp/DVDR3575_H_JVC_Menu_Reinterlace1.jpg
Fields 0 & 1:
http://s18.postimg.org/isvz5hoah/DVDR3575_H_JVC_Menu_field0.jpg http://s18.postimg.org/6fj4ykym1/DVDR3575_H_JVC_Menu_field1.jpg
Frames 0 & 1:
http://s18.postimg.org/va2msnjg9/DVDR3575_H_JVC_Menu_f0.jpg http://s18.postimg.org/qk83qb321/DVDR3575_H_JVC_Menu_f1.jpg
For the purposes of easier detection, I can start all of my captures off with sharp text like this, or even pure noise from a disconnected TV tuner. But how do I go about scripting up a function to check the first few fields and pick the one that looks less-interpolated?
# Reinterlace v1.1
#
# Takes progressive input and re-interlaces it, outputting TFF. Specify input field order: TFF=1 & BFF=0.
#
function Reinterlace(clip c, int "order")
{
order = Default(order,1)
T = (order == 1) ? c : c.Trim(1,0) # Changes BFF to TFF, matching all my other devices
return T.AssumeTFF().SeparateFields().SelectEvery(4,0,3).Weave()
}
It's easy to see which fields are needed from the source visually. They have lines with a height of 1 pixel instead of "0.5 px", if you will... Looking at the captured progressive frames, it isn't clear to me, but I've included them for completeness.
Reinterlace(1) vs Reinterlace(0)
http://s18.postimg.org/wqe5asmd5/DVDR3575_H_JVC_Menu_Reinterlace0.jpg http://s18.postimg.org/dzc80mrsp/DVDR3575_H_JVC_Menu_Reinterlace1.jpg
Fields 0 & 1:
http://s18.postimg.org/isvz5hoah/DVDR3575_H_JVC_Menu_field0.jpg http://s18.postimg.org/6fj4ykym1/DVDR3575_H_JVC_Menu_field1.jpg
Frames 0 & 1:
http://s18.postimg.org/va2msnjg9/DVDR3575_H_JVC_Menu_f0.jpg http://s18.postimg.org/qk83qb321/DVDR3575_H_JVC_Menu_f1.jpg
For the purposes of easier detection, I can start all of my captures off with sharp text like this, or even pure noise from a disconnected TV tuner. But how do I go about scripting up a function to check the first few fields and pick the one that looks less-interpolated?