[RESOLVED] The better way to deal with an i/p mixed MBAFF source?

Support forum for DGDecNV
Post Reply
DAE avatar
misami
Posts: 2
Joined: Tue Nov 05, 2013 10:50 pm

[RESOLVED] The better way to deal with an i/p mixed MBAFF source?

Post by misami »

Hi.

I have an m2ts stream from Blu-ray, which is reported as MBAFF(TFF) at the frame rate of 29.97 in DGIndexNV v2046. I have generally checked the video, and found it almost progressive and only with some short interlaced parts. So maybe the best way to deal with this stream is to find all interlaced parts and deinterlace these parts ONLY. And my question is:

1. I've tried to use "deinterlace=1, use_pf=true" on the whole stream, and the output seems good(I mean the progressive frames looks still like what they should be and all interlaced frames are deinterlaced.) And then I tried use_pf=false but the output seems to be the same. So what the NVIDIA deinterlacer have done to the progressive frames? I mean, what will happen to the deinterlacer if both progressive and interlaced frames are flagged as interlaced?

2. What about no deinterlace when encoding and generate a x264 MBAFF output directly from an i/p mixed MBAFF source?

Thanks in advance.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: The better way to deal with an i/p mixed MBAFF source?

Post by admin »

Hello misami.

When you say "seems to be the same" that leaves two possibilities: 1) the pf flags are not implemented properly and the results are identical, or 2) they are implemented correctly but when you do not use them the deinterlacer has only an imperceptible effect on already progressive frames. I would have to see a stream sample to distinguish these two. Or you can use a script with Subtract() and Levels() to see if the results really are identical.

Another option is to use an external deinterlacer in your script that is capable of not touching progressive frames. FieldDeinterlace() and TDeint() come to mind.

As you mentioned, you always have the option to encode it interlaced and allow the display device to deinterlace. But again, you will have to wonder what the deinterlacer is doing to the progressive frames.

I hope it is helpful.
DAE avatar
misami
Posts: 2
Joined: Tue Nov 05, 2013 10:50 pm

Re: The better way to deal with an i/p mixed MBAFF source?

Post by misami »

admin wrote:Hello misami.

When you say "seems to be the same" that leaves two possibilities: 1) the pf flags are not implemented properly and the results are identical, or 2) they are implemented correctly but when you do not use them the deinterlacer has only an imperceptible effect on already progressive frames. I would have to see a stream sample to distinguish these two. Or you can use a script with Subtract() and Levels() to see if the results really are identical.

Another option is to use an external deinterlacer in your script that is capable of not touching progressive frames. FieldDeinterlace() and TDeint() come to mind.

As you mentioned, you always have the option to encode it interlaced and allow the display device to deinterlace. But again, you will have to wonder what the deinterlacer is doing to the progressive frames.

I hope it is helpful.
I followed your instructions to do the "Subtract" and "Levels":

Code: Select all

src1 = DGSource("XXX.dgi", deinterlace=1, use_pf=true)
src2 = DGSource("XXX.dgi", deinterlace=1, use_pf=false)
src3 = DGSource("XXX.dgi", fieldop=0)
return Subtract(src1, src2).Levels(127, 1, 129, 0, 255)
And the result shows that src1 is exactly the same with src2, and obviously not with src3, which I guess means the first possibility you mentioned(The flag is invalid and always implies an interlaced frame). So, with quite a lot interlaced parts in this stream, maybe I should try the interlaced encoding.

Thanks very much for your help.
DAE avatar
Nick007
Posts: 38
Joined: Wed Sep 29, 2010 12:20 pm

Re: [RESOLVED] The better way to deal with an i/p mixed MBAFF source?

Post by Nick007 »

I use this for partially interlaced 25/25.97 fps sources:

#ShowCombedTIVTC(cthresh=7, MI=70, metric=0)
TFM(pp=2, clip2=QTGMC(preset="slow").SelectEven(), cthresh=7, MI=70)

The thresholds may need some tweaking, that's where ShowCombedTIVTC comes in handy.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: [RESOLVED] The better way to deal with an i/p mixed MBAFF source?

Post by admin »

Thank you for the script, Nick007.

The decision to use or not use that script or any other similar one versus encoding interlaced and letting your TV do the deinterlacing depends on whether the script can do a better job (usually it can), whether you can accept the longer processing time, and whether you can accept the reduced compression from interlaced encoding.
Post Reply