hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.rockchip.gpadc.demo.rga;
 
import android.util.Log;
 
public class RGA {
    static {
        System.loadLibrary("rknn4j");
    }
 
    public static int colorConvert(byte[] src, int srcFmt, byte[] dst, int dstFmt,
                                   int width, int height, int flip) {
 
        if (src == null || dst == null) {
            Log.w("rkyolo.RGA", "src or dst is null");
            return -1;
        }
 
        return color_convert(src, srcFmt, dst, dstFmt, width, height, flip);
    }
 
    private static native int color_convert(byte[] src, int srcFmt, byte[] dst, int dstFmt,
                                            int width, int height, int flip);
}