summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_h264.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-02-27 17:21:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-06-24 03:22:31 +0200
commitb5e6aa6c3337dc740d67aa68116530fe604bae76 (patch)
treecf5e56d88ed4d447aca6a12dbd860ea5f541ec79 /libavcodec/dxva2_h264.c
parent1c600888857544986d6576bc164e0dc8f0f4b6c7 (diff)
dxva2_h264: fix signaling of mbaff frames
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. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r--libavcodec/dxva2_h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 3bda097cc4..6114a77f5a 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -93,7 +93,8 @@ static void fill_picture_parameters(struct dxva_context *ctx, const H264Context
pp->num_ref_frames = h->sps.ref_frame_count;
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) |