summaryrefslogtreecommitdiffstats
path: root/media/base/yuv_convert.cc
diff options
context:
space:
mode:
authorvigneshv@chromium.org <vigneshv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 23:43:32 +0000
committervigneshv@chromium.org <vigneshv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 23:43:32 +0000
commit6ac955b41814da1eebf56244a147f3fad00f5aa7 (patch)
tree9671f7731055aa027d63e56290722d7ec012756f /media/base/yuv_convert.cc
parente69198bfdb89c4658a023c05c4929e9617ac2828 (diff)
downloadchromium_src-6ac955b41814da1eebf56244a147f3fad00f5aa7.zip
chromium_src-6ac955b41814da1eebf56244a147f3fad00f5aa7.tar.gz
chromium_src-6ac955b41814da1eebf56244a147f3fad00f5aa7.tar.bz2
media: Add support for playback of VP8 Alpha video streams
BUG=147355 TEST=VP8 Alpha video streams play TBR=sky Review URL: https://chromiumcodereview.appspot.com/13886011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/yuv_convert.cc')
-rw-r--r--media/base/yuv_convert.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc
index 85b0699..1d09a24 100644
--- a/media/base/yuv_convert.cc
+++ b/media/base/yuv_convert.cc
@@ -603,4 +603,34 @@ void ConvertYUVToRGB32(const uint8* yplane,
#endif
}
+void ConvertYUVAToARGB(const uint8* yplane,
+ const uint8* uplane,
+ const uint8* vplane,
+ const uint8* aplane,
+ uint8* rgbframe,
+ int width,
+ int height,
+ int ystride,
+ int uvstride,
+ int astride,
+ int rgbstride,
+ YUVType yuv_type) {
+#if defined(ARCH_CPU_ARM_FAMILY) || defined(ARCH_CPU_MIPS_FAMILY)
+ ConvertYUVAToARGB_C(yplane, uplane, vplane, aplane, rgbframe,
+ width, height, ystride, uvstride, astride, rgbstride,
+ yuv_type);
+#else
+ static ConvertYUVAToARGBProc convert_proc = NULL;
+ if (!convert_proc) {
+ base::CPU cpu;
+ if (cpu.has_mmx())
+ convert_proc = &ConvertYUVAToARGB_MMX;
+ else
+ convert_proc = &ConvertYUVAToARGB_C;
+ }
+ convert_proc(yplane, uplane, vplane, aplane, rgbframe,
+ width, height, ystride, uvstride, astride, rgbstride, yuv_type);
+#endif
+}
+
} // namespace media