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

Derek Buitenhuis derek.buitenhuis at gmail.com
Fri Jun 22 18:02:28 CEST 2012


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?

> 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?

Otherwise, it seems reasonable to me. H.264 experts, feel
free to chime in.

- Derek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120622/91228250/attachment.asc>


More information about the ffmpeg-devel mailing list