diff options
author | Miao Wang <miaowang@google.com> | 2015-01-23 09:41:04 -0800 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2015-01-23 19:15:57 +0000 |
commit | 8a1265384b0409ea0245d53e665c69426f6b7b2f (patch) | |
tree | 6d92bd4e20d71e773a6f71f2531e630aa2b00bb9 /rs/java/android/renderscript/ScriptIntrinsicHistogram.java | |
parent | 73500edb42d9270437e41ff2ddaa0cd6eacb422b (diff) | |
download | frameworks_base-8a1265384b0409ea0245d53e665c69426f6b7b2f.zip frameworks_base-8a1265384b0409ea0245d53e665c69426f6b7b2f.tar.gz frameworks_base-8a1265384b0409ea0245d53e665c69426f6b7b2f.tar.bz2 |
[RenderScript] Allow U8_2 & U8_3 input allocation for Histogram
Intrinsic
Bug: 19035242
Bug: 19124958
Change-Id: I9e806d7a0786e728c5f23607dc67ca5d755e12ed
Diffstat (limited to 'rs/java/android/renderscript/ScriptIntrinsicHistogram.java')
-rw-r--r-- | rs/java/android/renderscript/ScriptIntrinsicHistogram.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java index 4ecac99..f8c0c16 100644 --- a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java +++ b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java @@ -92,8 +92,10 @@ public final class ScriptIntrinsicHistogram extends ScriptIntrinsic { "Input vector size must be >= output vector size."); } if (!ain.getType().getElement().isCompatible(Element.U8(mRS)) && + !ain.getType().getElement().isCompatible(Element.U8_2(mRS)) && + !ain.getType().getElement().isCompatible(Element.U8_3(mRS)) && !ain.getType().getElement().isCompatible(Element.U8_4(mRS))) { - throw new RSIllegalArgumentException("Input type must be U8 or U8_4."); + throw new RSIllegalArgumentException("Input type must be U8, U8_1, U8_2 or U8_4."); } forEach(0, ain, null, null, opt); @@ -188,8 +190,10 @@ public final class ScriptIntrinsicHistogram extends ScriptIntrinsic { throw new RSIllegalArgumentException("Output vector size must be one."); } if (!ain.getType().getElement().isCompatible(Element.U8(mRS)) && + !ain.getType().getElement().isCompatible(Element.U8_2(mRS)) && + !ain.getType().getElement().isCompatible(Element.U8_3(mRS)) && !ain.getType().getElement().isCompatible(Element.U8_4(mRS))) { - throw new RSIllegalArgumentException("Input type must be U8 or U8_4."); + throw new RSIllegalArgumentException("Input type must be U8, U8_1, U8_2 or U8_4."); } forEach(1, ain, null, null, opt); |