[FFmpeg-devel] [PATCH] dxva2_h264: fix signaling of mbaff frames

Hendrik Leppkes h.leppkes at gmail.com
Fri Jun 22 19:41:07 CEST 2012


On Fri, Jun 22, 2012 at 6:02 PM, Derek Buitenhuis <
derek.buitenhuis at gmail.com> wrote:

> On 21/06/2012 3:38 AM, Hendrik Leppkes wrote:
> > attached patch fixes decoding of certain MBAFF H264 streams with DXVA2 on
> > some GPUs (most notably NVIDIA cards, iirc).
>
> Does it break any / change behavior of any which weren't
> problematic before?
>

Not to my knowledge, which includes tests i did myself on NVIDIA and AMD.
I also did not receive any complaints about H264 DXVA anymore after this
fix.


>
> > The MBAFF flag may only be signaled if we're actually dealing with a full
> > frame, and not singular fields, as it can happen in mixed content.
>
> This should probably be put in the commit message, either by
> whoever pushes it, or if it needs a 2nd revision.
>
> >      pp->wBitFields                    = ((s->picture_structure !=
> PICT_FRAME) <<  0) |
> > -                                        (h->sps.mb_aff
>        <<  1) |
> > +                                        ((h->sps.mb_aff &&
> (s->picture_structure == PICT_FRAME)) <<  1) |
> >
>  (h->sps.residual_color_transform_flag <<  2) |
> >                                          /* sp_for_switch_flag (not
> implemented by FFmpeg) */
> >                                          (0
>        <<  3) |
>
> Is it possible to keep this 'pretty' and aligned?
>

I can split it into two lines, that makes it aligned properly.
I'll ammend the commit message and send a new patch.


>
> Otherwise, it seems reasonable to me. H.264 experts, feel
> free to chime in.
>
> - Derek
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>


More information about the ffmpeg-devel mailing list