pinterf / TIVTC

TIVTC and TDeint
57 stars 9 forks source link

TDecimate wipes ALL frame properties when outputting hybrid (blended) frames #40

Closed flossy83 closed 1 year ago

flossy83 commented 1 year ago

I can imagine a reason for it working this way - hybrid frames are blended and so their properties would be blended too, which is kind of an invalid concept.

But I am writing my own custom frame properties into my clip before it arrives at TDecimate. I need to pass these properties further downstream but can't cause TDecimate deletes them.

It may be possible to do a bodge workaround of sidechaining a separate clip and merging its properties back in with the output of TDecimate.

flossy83 commented 1 year ago

This seems to be working...

global source      = TDecimate(hybrid=0)    
global destination = TDecimate(hybrid=1) 

ScriptClip(source, 
\ """
    sourceProps = propGetAll(source)    
    outClip     = destination

    for (i=0, ArraySize(sourceProps)-1) {   
        outClip = outClip.propSet(String(sourceProps[i,0]), sourceProps[i,1]) }

    outClip

\ """, after_frame=true )

But I think it's a fudge and I'm not confident in it's reliability. For instance replacing all instances of "outClip" with "destination" can cause it to crash.

pinterf commented 1 year ago

Yes, I can see cases in the code where blending of two frame occur, and the frame properties are not derived from either frame. I'm gonna fix it.

flossy83 commented 1 year ago

Thank you, I can confirm it works as expected.

I did notice the new TFM frame props are still getting deleted for hybrid blended frames - I presume this is intentional?

pinterf commented 1 year ago

I don't know it yet. Next week I go on with investigating. Maybe it's clear but I'm not in the picture with this plugin right now; regarding "New TFM frame props", which ones do you mean?

flossy83 commented 1 year ago

Sorry, false alarm - the TFM frame props (TFMMatch, TFMField etc) are deleted because I was using TFM(clip2=) and TFM doesn't pass those frame props to clip2 (understandably so). Clip2 happens to be used when TDec is outputting hybrid blended frames so I mistakenly thought it was TDec that was deleting them.

There seems to be a separate issue with the fieldmatching in the latest 1.0.27 version which doesn't occur in 1.0.26 - I'll open a new issue for that and mark this one as resolved.

Thank you