Fix element handling. Add YUV support.

bug 10427951

Change-Id: I2c9cd4faca881e3fa05eb65ab5edaab9f1c6c140
diff --git a/cpp/ScriptIntrinsics.cpp b/cpp/ScriptIntrinsics.cpp
index e4bf907..2f52896 100644
--- a/cpp/ScriptIntrinsics.cpp
+++ b/cpp/ScriptIntrinsics.cpp
@@ -573,7 +573,7 @@
 }
 
 void ScriptIntrinsicYuvToRGB::setInput(sp<Allocation> in) {
-    if (!(in->getType()->getElement()->isCompatible(mElement))) {
+    if (!(in->getType()->getElement()->isCompatible(Element::YUV(mRS)))) {
         mRS->throwError(RS_ERROR_INVALID_ELEMENT, "Invalid element for input in YuvToRGB");
         return;
     }