Can I set input and output allocations on Renderscript to be of different sizes/dimensions?

前端 未结 2 1705
陌清茗
陌清茗 2021-01-23 00:53

Background

I\'m trying to learn Renderscript, so I wish to try to do some simple operations that I think about.

The problem

I thought of rotating a b

2条回答
  •  抹茶落季
    2021-01-23 01:34

    This should solve your problem

    RS

    rs_allocation *in;  
    uchar4 attribute((kernel)) rotate90CW(uint32_t x, uint32_t y){
    ...
    uchar4 curIn =rsGetElementAt_uchar4(in, x, y); 
    
    return curIn; 
     }
    

提交回复
热议问题