Log in

View Full Version : MBAFF / PAFF interlaced question


madhatter300871
18th September 2011, 10:51
Hope this is in the correct place.

If a bluray h264 or VC1 stream is tagged as MBAFF or PAFF, as oppossed to progressive, is it interlaced ?

I have checked out the video visually using avisynth 'separatefields' and the content is progressive, just encoded as interlaced like I have also seen on many DVDs.

Can I just re-encode as progressive or do I have to re-encode as interlaced ?

nm
18th September 2011, 11:37
If a bluray h264 or VC1 stream is tagged as MBAFF or PAFF, as oppossed to progressive, is it interlaced ?

I think the terms MBAFF and PAFF only apply to H.264. In MBAFF coding, each picture could have macroblocks encoded as either progressive or interlaced. In PAFF, each picture could be coded as either progressive or interlaced. So even if a video is encoded as MBAFF or PAFF, it could be entirely progressive.

I have checked out the video visually using avisynth 'separatefields' and the content is progressive, just encoded as interlaced like I have also seen on many DVDs.

Can I just re-encode as progressive or do I have to re-encode as interlaced ?

Encode as progressive if the content looks progressive.

Shevach
18th September 2011, 12:36
The choice between MBAFF and PAFF is not a simple task for an encoder.
Thre is a common heuristics:

If several objects are moving while background remains still then it's beneficial to encode the current frame as MBAFF.

If everything is moving (e.g. camera panning or zooming) then it's beneficial to encode the frame as two pictures - top and bottom.

madhatter300871
18th September 2011, 18:39
Thanks for the replies.

OK, so the decision on whether to use MBAFF or PAFF is a complex one, understood, thanks. I have been reading up on the two methods and it is indeed a complex topic. I didn't realise this was for H264 only, thanks for pointing this out.

In my case the fields are not true interlaced fields (i.e., a top field from one frame and a bottom field from a consecutive frame) they are in fact a top field from one frame and a bottom field from the same frame.

Ignoring, if I may, the methods used for encoding originally I think I will encode as progressive when I re-encode to x264, nm thinks the same as well. I take this approach with DVDs and so far have had no problems at all.

Thanks again for replying, feel a bit more confident now I'm not doing something stupid !

sneaker_ger
18th September 2011, 19:06
As nm said above: "Encode as progressive if the content looks progressive". Shevach is talking about the decision of PAFF vs. MBAFF for interlaced sources (I can't verify his claim), but progressive sources (like your source, where top and bottom fields have been shot at the same point in time) should always be encoded as progressive. Very simple.

madhatter300871
19th September 2011, 00:05
Yep, thanks. So two people say encode as progressive if it looks progressive, my confidence grows yet again.

I raised this because although my video is progressive, in that the two fields are fields from the same point in time, mediainfo flags the content as MBAFF or PAFF (depending on movie) and the case displays 1080i. On other movies mediainfo flags the content as progressive and the case displays 1080p (or the word "progressive", I'll check next time I look at the back of a case).

I was just wondering if I had to treat the content as interlaced or I could just do what I have always done with DVD content and basically check it out manually.

Wonder why its not 1080p, seeing as each field is made up from the same point in time ? I suppose that's what I'm really asking.

sneaker_ger
19th September 2011, 00:18
Most likely the authoring house screwed up or just didn't care.

nm
19th September 2011, 01:03
Wonder why its not 1080p, seeing as each field is made up from the same point in time ? I suppose that's what I'm really asking.

The framerate of your movie is either 25 or 30000/1001 fps. Blu-ray spec doesn't allow those rates to be encoded as progressive, so there are two choices: encode as "fake-interlaced" (which you seem to have there), or in case of 25p, slow down to 24p and then encode as progressive.

A screw-up is also quite likely. The original framerate might have been 24p, but it was converted to PAL rate at some point.

madhatter300871
19th September 2011, 14:01
Thanks for more replies.

I think the frame rate is 23.976, but I'll check tonight. So looks like it's either fake interlaced or has been authored incorrectly.

It's interesting isn't it.

So, I'll probably check all movies in future by doing a separatefields, not just the ones that I think might be interlaced. It takes all of 60 seconds to do so nothing lost.

Thanks for all the help. I'll make one more post tonight with the frame rates for completeness.

Shevach
20th September 2011, 07:19
When I read the sentence "encode the content as progressive if it is progressive" I wonder how from raw data one can derive whether the content is progressive or not. One of methods to detect progressive or interlaced content is a measurement of bad-weaves artifacts. This method is sufficient reliable and it's used in the pre-processing stage prior to encoding together with noise reduction.
Indeed, knowing of video material type (progressive/interlaced) helps to the encoder to choose more optimal setting.

J_Darnley
20th September 2011, 09:09
Your eye can tell you if the content is interlaced.

madhatter300871
20th September 2011, 10:30
Indeed ,your eye can tell if the content is interlaced. I have been checking DVD,s this way for years and I'll carry on checking blu-rays in the same way.

What I will now do is if mediainfo flags the stream as progressive, I'll treat it as such. If mediainfo flags the stream as either MBAFF or PAFF I'll do a visual check to see if it is interlaced.

I'll also do a visual check if the frame rate is 29.97, and check for telecining.

In short, I'll do exactly what I have always done for DVD's, a quick visual check.

Many thanks for all the replies, I think I'm happy now.

Emulgator
20th September 2011, 12:49
What I will now do is if mediainfo flags the stream as progressive, I'll treat it as such.
If mediainfo flags the stream as either MBAFF or PAFF I'll do a visual check to see if it is interlaced.

Beware of the first conclusion. In AVC these flags can also be used to mask the nature of a stream.

For instance Panasonic uses that flag creatively in both ways to get data from a sensor delivering 25fps PsF into
various resolution/framerate sets. An example is the watertight FT3 camera with AVCHD.

1920x1080x"25" Streams from the FT3 are flagged as interlaced although being genuinely 25fps PsF,
just to match the requirement of AVCHD/Blu-ray that 1080@25/29.97 must be i.
1280x720x"50" Streams from the FT3 are flagged as frame-repeat although being the same 25fps PsF,
just to match the requirement of AVCHD/Blu-ray that any 720 must be p and not 25/29.97, but 23.976/24/50/59.94.

Still the old method of
SeparateFields().Spline36Resize(width, height)
and stepping through these fields manually in VirtualDub is the safer way.

nm
20th September 2011, 12:56
Beware of the first conclusion. In AVC these flags can also be used to mask the nature of a stream.
Panasonic uses that flag in both ways. An example is the watertight FT3 camera with AVCHD.
1920x1080x"25" Streams from the FT3 are flagged as interlaced although being genuinely 25fps PsF,
just to match the requirement of AVCHD that 1080@25/29.97 must be i.

That's exactly what we've been discussing here. If the stream is encoded as MBAFF or PAFF, it could be either interlaced or progressive. But if the stream is encoded as progressive, it most likely is just that.


I think the frame rate is 23.976, but I'll check tonight. So looks like it's either fake interlaced or has been authored incorrectly.
I'd be interested in hearing what the framerate was. If it's 23.976 fps encoded as MBAFF/PAFF, I'm surprised it has passed Blu-ray validation in the authoring software and at the replication facility.

Emulgator
20th September 2011, 13:00
Yes, I missed a bit, my case of frame repeat is still coming from progressively scanned sensor.
I meant to have seen a case where the "most likely" case falls, but I have forgotten where...

madhatter300871
20th September 2011, 21:05
nm -- I checked and the frame rate is 25fps, you where right. So it looks like it's fake interlaced like you pointed out.

I'm going to check details more closely for the next few encodes, make sure any flagged as MBAFF or PAFF are 25fps or 30fps just to be certain, although I'm sure your absolutely right.

This has been an education ... many thanks.

Shevach
22nd September 2011, 08:26
Indeed ,your eye can tell if the content is interlaced. I have been checking DVD,s this way for years and I'll carry on checking blu-rays in the same way.


You guys can consider to make a career in QA engineering.

But I meant the automatic detection of interlace video material.

madhatter300871
22nd September 2011, 11:47
You guys can consider to make a career in QA engineering.

Not sure what is meant by this ...... :)

Anyway ....

Was just saying I like to manually check for an interlaced source, or for that matter a telecined source.

pandy
22nd September 2011, 17:12
But I meant the automatic detection of interlace video material.

Thus You need analyze difference (motion between fields) to detect that they are identical and duplicated, after this You should know pattern for telecine - something like phase correlation motion estimation

Shevach
27th September 2011, 08:47
Thus You need analyze difference (motion between fields) to detect that they are identical and duplicated, after this You should know pattern for telecine - something like phase correlation motion estimation

Usually in preprocessing phase an encoder applies two different algorithms: one for interlaced video detection and another for 3:2 cadence detection. Indeed, 3:2 cadence detection is based on field comparision while interlace-video detection is based on finding weaves within a frame.

If input video material is detected as interlaced then the encoder codes frames either as MBAFF or as field. The decision depends on motion activity.

If 3:2 pattern is detected then the encoder discards corresponding fields and issue specific SEI messages (in order to instruct a decoder to duplicate discarded fields).

pandy
27th September 2011, 11:34
Some advanced encoders can use different than 3:2 pattern - sometimes cadence pattern is variable.

kieranrk
27th September 2011, 16:10
Much of the time pulldown reversal is not used because it breaks closed captioning on set top boxes.