gecko/media/liboggplay/bug488951_yuv_fix_2.patch
Matthew Gregan 1714093f21 Bug 488951 - Fix YUV conversion of odd height videos. Add a reftest for offset and odd sized videos. rs=roc
--HG--
extra : rebase_source : f011d4841fa506bcdd19a0adb81b63bbdf0aa643
2009-05-20 17:20:56 +12:00

23 lines
947 B
Diff

diff --git a/media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h b/media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h
--- a/media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h
+++ b/media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h
@@ -85,17 +85,17 @@ static void
pu += 1; pv += 1; \
} \
} \
} \
\
ptro += rgb->rgb_width * 4; \
ptry += yuv->y_width; \
\
- if (i & 0x1) \
+ if (i & 0x1 && !(i+1==h-1 && h&1)) \
{ \
ptru += yuv->uv_width; \
ptrv += yuv->uv_width; \
} \
} \
CLEANUP \
}