mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
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
This commit is contained in:
parent
cb30f65532
commit
4b25722e83
BIN
layout/reftests/ogg-video/black29x19offset.ogv
Normal file
BIN
layout/reftests/ogg-video/black29x19offset.ogv
Normal file
Binary file not shown.
6
layout/reftests/ogg-video/offset-1-ref.html
Normal file
6
layout/reftests/ogg-video/offset-1-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body style="background:white;">
|
||||
<div style="width:29px; height:29px; background:black;"></div>
|
||||
</body>
|
||||
</html>
|
14
layout/reftests/ogg-video/offset-1.xhtml
Normal file
14
layout/reftests/ogg-video/offset-1.xhtml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
version="1.1">
|
||||
<!-- use an empty g to force filters.svg to load before onload -->
|
||||
<use xlink:href="../filters.svg#empty" />
|
||||
<foreignObject filter="url(../filters.svg#ThresholdRGB)" x="0" y="0" height="100%" width="100%">
|
||||
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body style="background:white;">
|
||||
<video src="black29x19offset.ogv"></video>
|
||||
</body>
|
||||
</html>
|
||||
</foreignObject>
|
||||
</svg>
|
After Width: | Height: | Size: 537 B |
@ -11,6 +11,7 @@ HTTP(..) == canvas-1b.xhtml basic-1-ref.html
|
||||
== empty-1b.html empty-1-ref.html
|
||||
HTTP(..) == object-aspect-ratio-1a.xhtml aspect-ratio-1-ref.html
|
||||
HTTP(..) == object-aspect-ratio-1b.xhtml aspect-ratio-1-ref.html
|
||||
HTTP(..) == offset-1.xhtml offset-1-ref.html
|
||||
skip-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == object-aspect-ratio-2a.xhtml aspect-ratio-2-ref.html
|
||||
skip-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == object-aspect-ratio-2b.xhtml aspect-ratio-2-ref.html
|
||||
skip-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == zoomed-1.xhtml zoomed-1-ref.html
|
||||
|
@ -31,3 +31,6 @@ bug488951: Fix for YUV conversion for odd sized frames. Cherrypicked from
|
||||
|
||||
bug488951_fix_yuv: Additional fixes to YUV conversion that have not been
|
||||
upstreamed yet.
|
||||
|
||||
bug488951_fix_yuv_2: Additional fix to YUV conversion for odd height videos
|
||||
that has not been upstreamed yet.
|
||||
|
22
media/liboggplay/bug488951_yuv_fix_2.patch
Normal file
22
media/liboggplay/bug488951_yuv_fix_2.patch
Normal file
@ -0,0 +1,22 @@
|
||||
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 \
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ static void \
|
||||
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; \
|
||||
|
@ -53,6 +53,6 @@ patch -p3 < aspect_ratio.patch
|
||||
patch -p3 < bug493678.patch
|
||||
patch -p1 < bug493224.patch
|
||||
patch -p3 < seek_to_key_frame.patch
|
||||
|
||||
patch -p3 < bug488951.patch
|
||||
patch -p3 < bug488951_yuv_fix.patch
|
||||
patch -p3 < bug488951_yuv_fix_2.patch
|
||||
|
Loading…
Reference in New Issue
Block a user