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.
Unified · Split
| @@ -93,7 +93,8 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context · 92 unmodified lines | |||
| 93 | pp->num_ref_frames = h->sps.ref_frame_count; | 93 | pp->num_ref_frames = h->sps.ref_frame_count; |
| 94 | 94 | ||
| 95 | pp->wBitFields = ((s->picture_structure != PICT_FRAME) << 0) | | 95 | pp->wBitFields = ((s->picture_structure != PICT_FRAME) << 0) | |
| 96 | (h->sps.mb_aff << 1) | | 96 | ((h->sps.mb_aff && |
| 97 | (s->picture_structure == PICT_FRAME)) << 1) | | ||
| 97 | (h->sps.residual_color_transform_flag << 2) | | 98 | (h->sps.residual_color_transform_flag << 2) | |
| 98 | /* sp_for_switch_flag (not implemented by FFmpeg) */ | 99 | /* sp_for_switch_flag (not implemented by FFmpeg) */ |
| 99 | (0 << 3) | | 100 | (0 << 3) | |