[FFmpeg-cvslog] dxva2_h264: fix signaling of mbaff frames
Hendrik Leppkes
git at videolan.org
Sun Jun 24 03:44:04 CEST 2012
ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Mon Feb 27 17:21:16 2012 +0100| [b5e6aa6c3337dc740d67aa68116530fe604bae76] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5e6aa6c3337dc740d67aa68116530fe604bae76
---
libavcodec/dxva2_h264.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 3bda097..6114a77 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) |
More information about the ffmpeg-cvslog
mailing list