Overview

The concepts relating to field pairing in the AVC/H.264 standard are for coding purposes and not really for display purposes.  It is certainly possible for a field picture to be non-paired (dangling). The pairing in the standard is primarily only for purposes of determining how pairs of fields can be referenced by subsequent coded frames and how to model the memory consumption for DPB capacity measurements relating to profile and level constraints. How to display a dangling field is a separate issue beyond AVC/H.264 scope. Generally speaking, from the perspective of the AVC/H.264 standard, the display is completely outside the scope.

So we don’t specify in the present document how dangling fields should be displayed. We specify how to detect dangling fields.

There are several situations when an encoder can generate dangling fields:

  • If 3:2 cadence material is non-seamlessly spliced with progressive material then the splice point can be a dangling field.
  • Non-seamless splice between two streams where the first stream is bottom-first and the second is top-first.
  • Some encoders can decide to discard field picture in order to keep bit-rate constant. For example, if a top-field is discarded then the following bottom field is considered as dangling field.

 

Moreover, dangling fields can be a result of stream errors.

 

The standard specifies dangling picture issue as follows:

  • non-paired non-reference field: A decoded non-reference field that is not part of a complementary non-reference field pair.
  • non-paired reference field: A decoded reference field that is not part of a complementary reference field pair.

 

In turn the complementary reference/non-reference field pair is specified as follow:

  • complementary non-reference field pair: Two non-reference fields that are in consecutive access units in decoding order as two coded fields of opposite parity where the first field is not already a paired field.
  • complementary reference field pair: Two reference fields that are in consecutive access units in decoding order as two coded fields and share the same value of the frame_num syntax element, where the second field in decoding order is not an IDR picture and does not include a memory_management_control_operation syntax element equal to 5.

 

Detection Automaton (FSM)

The following code outlines the above automaton.

Fsm =0  // start state is zero

Dangling_found=0

For each picture

Dangling_found=0

            If fsm=0

                        If frame

                                    Fsm=0

                        Else if top

                                    If unused_for_ref

                                                Fsm=1

                                    Else {used for ref}

                                                Fsm=2

                        Else {bottom}

                                    If unused_for_ref

                                                Fsm=3

                                    Else {used for ref}

                                                Fsm=4

            EndIf { fsm=0}

            If fsm=1 {previous is non-reference top}

                        Fsm = 0 { next state is always 0}

                        If bottom & unused_for_ref

                                           Dangling_found=0

                             Else {frame, top or referenced bottom}

                                    Dangling_found=1

            EndIf

           If fsm=2 {previous is referenced top}

                        Fsm = 0 { next state is always 0}

                        If frame

                                           Dangling_found=1

                             ElseIf  field & unused_for_ref

                                    Dangling_found=1

                        ElseIf  IDR picture or  mmco==5

                                    Dangling_found=0

                        ElseIf frame_num!=prev_frame_num

                                    Dangling_found=1

                        Else

                                    Dangling_found=0

        EndIf {fsm=2}

        If fsm=3 {previous is non-reference bottom}

                        Fsm = 0 { next state is always 0}

                        If top & unused_for_ref

                                           Dangling_found=0

                             Else {frame, bottom or referenced top}

                                    Dangling_found=1

     EndIf

      If fsm=4 {previous is referenced bottom}

                        Fsm = 0 { next state is always 0}

                        If frame

                                           Dangling_found=1

                             ElseIf  field & unused_for_ref

                                    Dangling_found=1

                        ElseIf  IDR picture or  mmco==5

                                    Dangling_found=0

                        ElseIf frame_num!=prev_frame_num

                                    Dangling_found=1

                        Else

                                    Dangling_found=0

        EndIf {fsm=4}

  

8 Responses

  1. Hello, Neat post. There is a problem with your site in internet explorer, may check this… IE nonetheless is the market leader and a large portion of other people will pass over your excellent writing due to this problem.

  2. Hey there, I think your blog might be having browser compatibility issues. When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, excellent blog!

Leave a Reply

Your email address will not be published. Required fields are marked *