package kr.co.icontrols.ilp300_700.call;

/**
 * Created by raomengyang on 24/12/2016.
 */

public class YuvUtil {

    static {
        System.loadLibrary("yuv");
        System.loadLibrary("yuvutil");
    }
    public static native void yuvCompress(byte[] nv21Src, int width, int height, byte[] i420Dst, int dst_width, int dst_height, int mode, int degree, boolean isMirror);

    public static native void yuvCropI420(byte[] i420Src, int width, int height, byte[] i420Dst, int dst_width, int dst_height, int left, int top);

    public static native void yuvMirrorI420(byte[] i420Src, int width, int height, byte[] i420Dst);

    public static native void yuvScaleI420(byte[] i420Src, int width, int height, byte[] i420Dst, int dstWidth, int dstHeight, int mode);

    public static native void yuvRotateI420(byte[] i420Src, int width, int height, byte[] i420Dst, int degree);

    public static native void yuvNV21ToI420(byte[] nv21Src, int width, int height, byte[] i420Dst);

    public static native void yuvI420ToNV21(byte[] i420Src, int width, int height, byte[] nv21Src);

    public static native void yuvNV12ToI420(byte[] nv21Src, int width, int height, byte[] i420Dst);

    public static native void yuvI420ToNV12(byte[] i420Src, int width, int height, byte[] nv21Src);
}
