Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-02-27 20:21:16 +0400
committerMartin Storsjö <martin@martin.st>2012-06-26 12:59:24 +0400
commitea1c5011b34287aaad8c4fdc9100c3fe6b167134 (patch)
treecf39b1c27728227ca9ff40cfc0521f6870f3e100 /libavcodec/dxva2_h264.c
parent059533489250e58f1726ed2d1cb61869b2e00ed0 (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. Signed-off-by: Martin Storsjö <martin@martin.st>
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 ffe71a9656..5cdf5dea5c 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 Libav) */
(0 << 3) |