PDA

View Full Version : Top field as reference for Bottom field


zeeman_88
20th November 2008, 00:22
Is there a way to predict bottom filed form the top filed in the h.264 standard? I mean can the top filed be used as reference the bottom field?

neuron2
20th November 2008, 00:26
You can achieve it by encoding with field pictures.

Dark Shikari
20th November 2008, 00:37
PAFF allows this. This is the one major advantage of PAFF over MBAFF.

neuron2
20th November 2008, 00:43
I mentioned "field pictures" rather than PAFF because the latter is not a syntax element of AVC (look for it in the spec!). It is an encoder strategy. The base syntax element is field pictures versus frame pictures.

zeeman_88
20th November 2008, 05:07
Thanks for the prompt answer...

Does x.264 does that?

So, in field mode, the reference list the bottom filed has the top field of the same picture listed?

Dark Shikari
20th November 2008, 05:42
Thanks for the prompt answer...

Does x.264 does that?

So, in field mode, the reference list the bottom filed has the top field of the same picture listed?x264 doesn't have a field mode; it uses MBAFF.

neuron2
20th November 2008, 06:18
Correct, it doesn't do field picture encoding.

zeeman_88
21st November 2008, 17:55
I tried this and it works well on P fields.

Now how should I make it work for B fields? I know, in h.264, B picture can be marked as reference for other Bs.

So the question is how to mark the top filed as reference B for the bottom filed B?

neuron2
21st November 2008, 18:58
You need hierarchical B pictures, i.e., your encoder must know how to use B pictures as references.

zeeman_88
21st November 2008, 20:59
Is that possible with Main profile? Or the encoder has to support higher profile? I don’t see anything in the slice header that can change the B to reference B.

Can anybody point me to where I should read in the standard for this? I searched the standard for reference B and couldn’t find what I want…

Sergey A. Sablin
21st November 2008, 21:32
Is that possible with Main profile? Or the encoder has to support higher profile? I don’t see anything in the slice header that can change the B to reference B.

Can anybody point me to where I should read in the standard for this? I searched the standard for reference B and couldn’t find what I want…

that's because there is no difference for P and B on how they're specified to be reference or not. it is same nal_ref_idc syntax element.

zeeman_88
22nd November 2008, 04:14
Are you saying that to change B to B reference, all I need to change is the NAL priority!

How to add a reference B to the “reference list”? Don’t you need to that?

Also Sergey, this is an off topics qustion, do you work for Elecard?

Dark Shikari
22nd November 2008, 04:29
Are you saying that to change B to B reference, all I need to change is the NAL priority!

How to add a reference B to the “reference list”?The frame gets implicitly added to the reference list in the case that its referenced. Any further reordering has to be done explicitly, of course.

zeeman_88
22nd November 2008, 05:04
thanks Shikari.... And I assume, having b-ref is still vaild with Main profile.

Dark Shikari
22nd November 2008, 05:09
thanks Shikari.... And I assume, having b-ref is still vaild with Main profile.Yes; I know of no profile limitations on references (in terms of reordering, MMCO, and various creative applications of the above).

Sergey A. Sablin
22nd November 2008, 14:25
Are you saying that to change B to B reference, all I need to change is the NAL priority!
yes, exactly.

How to add a reference B to the “reference list”? Don’t you need to that?

if it's your encoder - make sure the frame you want to be reference will go to DPB. If it's not yours - check the code of the encoder you use. How it is done depends on specific implementation - this is just a piece of code.

Also Sergey, this is an off topics qustion, do you work for Elecard?
send your off topic questions through private messages.

zeeman_88
24th November 2008, 16:13
Thanks, Sergey, Shikari and neuron2 for the help...