ScriptIntrinsicYuvToRGBpublic final class ScriptIntrinsicYuvToRGB extends ScriptIntrinsic Intrinsic for converting an Android YUV buffer to RGB.
The input allocation should be supplied in a supported YUV format
as a YUV element Allocation. The output is RGBA; the alpha channel
will be set to 255. |
Fields Summary |
---|
private Allocation | mInput |
Constructors Summary |
---|
ScriptIntrinsicYuvToRGB(long id, RenderScript rs)
super(id, rs);
|
Methods Summary |
---|
public static android.renderscript.ScriptIntrinsicYuvToRGB | create(RenderScript rs, Element e)Create an intrinsic for converting YUV to RGB.
Supported elements types are {@link Element#U8_4}
// 6 comes from RS_SCRIPT_INTRINSIC_YUV_TO_RGB in rsDefines.h
long id = rs.nScriptIntrinsicCreate(6, e.getID(rs));
ScriptIntrinsicYuvToRGB si = new ScriptIntrinsicYuvToRGB(id, rs);
return si;
| public void | forEach(Allocation aout)Convert the image to RGB.
forEach(0, (Allocation) null, aout, null);
| public Script.FieldID | getFieldID_Input()Get a FieldID for the input field of this intrinsic.
return createFieldID(0, null);
| public Script.KernelID | getKernelID()Get a KernelID for this intrinsic kernel.
return createKernelID(0, 2, null, null);
| public void | setInput(Allocation ain)Set the input yuv allocation, must be {@link Element#U8}.
mInput = ain;
setVar(0, ain);
|
|