Sunday 15 February 2015

java - RenderScript Error Combination Usage -



java - RenderScript Error Combination Usage -

i'm trying create function gets renderscript rgba image , returns matrix byte value.

the problem returns me next error, searched info can not find , alternative find output same type , save results 1 of channels (eg red).

error:

10-15 16: 34: 35.006: e / androidruntime (771): android.support.v8.renderscript.rsillegalargumentexception: invalid combination usage.

renderscript code:

void roottable(const uchar4 *v_in, uchar *v_out){ *v_out = (int)rsgetelementat_uchar(params, getindexparams_table(v_in->r>>3, v_in->g>>3, v_in->b>>3)); }

java code:

allocation imageinalloc = allocation.createfrombitmap(r, bmp, allocation.mipmapcontrol.mipmap_none, allocation.usage_script); byte[] arrayparams = this.readparambyte(r.raw.params_table); byte[] arraycolor = new byte[bmp.getwidth()*bmp.getheight()]; allocation params_table = allocation.createsized(r, element.i8(r), arrayparams.length); allocation dataout = allocation.createsized(r, element.u8(r), bmp.getwidth(), bmp.getheight()); params_table.copyfrom(arrayparams); script.set_params(params_table); script.foreach_roottable(imageinalloc, dataout); dataout.copyto(arraycolor);

the function correct, failure rate of entry , exit distitnos there no way this?

thank lot!!

is there other stack trace info error study above? also, did alter order of words? can't find "invalid combination usage" anywhere in our codebase, find "invalid usage combination" (which unfortunately still doesn't create sense else seeing). there @ to the lowest degree 1 error spot immediately. "params" allocation of type i8, pulling uchar. doesn't work, need phone call rsgetelementat_int() instead, lets rid of int cast well.

java android renderscript

No comments:

Post a Comment