From 948c3a1397709350e094a2aa0b4695f9d0962147 Mon Sep 17 00:00:00 2001 From: Roman Shaposhnik Date: Thu, 27 Feb 2003 23:26:31 +0000 Subject: support for PAL 4:1:1 SMPTE 314M DV streams patch by (Roman Shaposhnick ) Originally committed as revision 1612 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/dv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libavcodec/dv.c') diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 47ba8b631b..40bf5e4047 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -546,11 +546,13 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, if (buf_size < packet_size) return -1; - /* XXX: is it correct to assume that 420 is always used in PAL - mode ? */ - s->sampling_411 = !dsf; + /* NTSC[dsf == 0] is always 720x480, 4:1:1 + * PAL[dsf == 1] is always 720x576, 4:2:0 for IEC 68134[apt == 0] + * but for the SMPTE 314M[apt == 1] it is 720x576, 4:1:1 + */ + s->sampling_411 = !dsf || apt; if (s->sampling_411) { - mb_pos_ptr = dv_place_411; + mb_pos_ptr = dsf ? dv_place_411P : dv_place_411; avctx->pix_fmt = PIX_FMT_YUV411P; } else { mb_pos_ptr = dv_place_420; -- cgit v1.2.3