waka
28th April 2003, 13:03
I've come across some stuff that appears to be 25fps that was brought up to 30 by blending. Original frames A B C D E became A B B/C C/D D/E E. Actually its on a field level and the offsets are different but you get the idea. Now since we know one part of the frames B/C and D/E we should be able to get C and D by removing some portion of B and E from those frames. I tried this awhile ago with levels and layer, but it didn't work out too well. Trying it again with coloryuv and layer I was able to get fairly decent results.
function removeblend(clip clip, float str, int order)
{
base=trim(clip,(abs(order)-order)/2,0)
subt=trim(clip,(abs(order)+order)/2,0)
lstr=round(256*float(str)/(str+100))
cstr=((256/(1-2*(float(str)/(str+100))))-256)
ostr=round((cstr+256)/256)
layer(base,subt,"subtract",lstr)
coloryuv(cont_y=cstr,cont_u=cstr,cont_v=cstr)
coloryuv(off_y=ostr,off_u=ostr,off_v=ostr)
}
Order controls which frame is removed from the blended frame, -1 for the previous and 1 for the following. Str is the percentage of the known frame in the blend.
Before (http://mywebpages.comcast.net/jczimmerman/source.avi) and after (http://mywebpages.comcast.net/jczimmerman/25fps.avi) mjpegs using the following script:
src=source("source.avi")
srce=src.separatefields().selecteven()
srco=src.separatefields().selectodd()
newe1=interleave(srce,srce.removeblend(20,-1),
\srce.removeblend(40,1)).selectevery(18,0,3,6,7,17)
newe2=interleave(srce,srce.removeblend(35,-1),
\srce.removeblend(20,1)).selectevery(18,2,3,6,9,10)
newe=newe1.trim(2,23)+newe2.trim(24,0)
newo=interleave(srco,srco.removeblend(20,-1),
\srco.removeblend(20,1)).selectevery(18,8,9,12,15,16)
interleave(newe,newo).weave()
Pay no attention to source() its just a function I made to take care of some apparent mjpeg problems.
Since it is essentially amplifying a weak signal, there is a marked increase of noise in four of every five frames. This is mitigated somewhat because each frame only has one noiser field. It's still rather noticable, especially with a high str. So any ideas on how to improve this? Also the coloryuv offsets seem to be needed, but I have no idea why?
At this point I think I prefer telecide and decimate, but I found this interesting in a proof of concept sorta way and perhaps useful for those extra special clips.
function removeblend(clip clip, float str, int order)
{
base=trim(clip,(abs(order)-order)/2,0)
subt=trim(clip,(abs(order)+order)/2,0)
lstr=round(256*float(str)/(str+100))
cstr=((256/(1-2*(float(str)/(str+100))))-256)
ostr=round((cstr+256)/256)
layer(base,subt,"subtract",lstr)
coloryuv(cont_y=cstr,cont_u=cstr,cont_v=cstr)
coloryuv(off_y=ostr,off_u=ostr,off_v=ostr)
}
Order controls which frame is removed from the blended frame, -1 for the previous and 1 for the following. Str is the percentage of the known frame in the blend.
Before (http://mywebpages.comcast.net/jczimmerman/source.avi) and after (http://mywebpages.comcast.net/jczimmerman/25fps.avi) mjpegs using the following script:
src=source("source.avi")
srce=src.separatefields().selecteven()
srco=src.separatefields().selectodd()
newe1=interleave(srce,srce.removeblend(20,-1),
\srce.removeblend(40,1)).selectevery(18,0,3,6,7,17)
newe2=interleave(srce,srce.removeblend(35,-1),
\srce.removeblend(20,1)).selectevery(18,2,3,6,9,10)
newe=newe1.trim(2,23)+newe2.trim(24,0)
newo=interleave(srco,srco.removeblend(20,-1),
\srco.removeblend(20,1)).selectevery(18,8,9,12,15,16)
interleave(newe,newo).weave()
Pay no attention to source() its just a function I made to take care of some apparent mjpeg problems.
Since it is essentially amplifying a weak signal, there is a marked increase of noise in four of every five frames. This is mitigated somewhat because each frame only has one noiser field. It's still rather noticable, especially with a high str. So any ideas on how to improve this? Also the coloryuv offsets seem to be needed, but I have no idea why?
At this point I think I prefer telecide and decimate, but I found this interesting in a proof of concept sorta way and perhaps useful for those extra special clips.