mWidth = mInPixelsAllocation.getType().getX();
mHeight = mInPixelsAllocation.getType().getY();
float f[] = new float[9];
f[0] = 0.f; f[1] = -1.f; f[2] = 0.f;
f[3] = -1.f; f[4] = 5.f; f[5] = -1.f;
f[6] = 0.f; f[7] = -1.f; f[8] = 0.f;
if (mUseIntrinsic) {
mIntrinsic = ScriptIntrinsicConvolve3x3.create(mRS, Element.U8_4(mRS));
mIntrinsic.setCoefficients(f);
mIntrinsic.setInput(mInPixelsAllocation);
} else {
mScript = new ScriptC_ip2_convolve3x3(mRS);
mScript.set_gCoeffs(f);
mScript.set_gIn(mInPixelsAllocation);
mScript.set_gWidth(mWidth);
mScript.set_gHeight(mHeight);
}