Expose ABGRToI420 in YuvHelper.

Bug: None
Change-Id: I59947339a3a4bb683211ec3c00713ccfbf35bc40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160182
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29855}
This commit is contained in:
Sami Kalliomäki
2019-11-21 11:08:54 +01:00
committed by Commit Bot
parent e835fc01b1
commit b86a1770ee
2 changed files with 34 additions and 0 deletions

View File

@ -102,6 +102,13 @@ public class YuvHelper {
nativeCopyPlane(src, srcStride, dst, dstStride, width, height);
}
/** Converts ABGR little endian (rgba in memory) to I420. */
public static void ABGRToI420(ByteBuffer src, int srcStride, ByteBuffer dstY, int dstStrideY,
ByteBuffer dstU, int dstStrideU, ByteBuffer dstV, int dstStrideV, int width, int height) {
nativeABGRToI420(
src, srcStride, dstY, dstStrideY, dstU, dstStrideU, dstV, dstStrideV, width, height);
}
public static void I420Copy(ByteBuffer srcY, int srcStrideY, ByteBuffer srcU, int srcStrideU,
ByteBuffer srcV, int srcStrideV, ByteBuffer dstY, int dstStrideY, ByteBuffer dstU,
int dstStrideU, ByteBuffer dstV, int dstStrideV, int width, int height) {
@ -136,4 +143,7 @@ public class YuvHelper {
int srcStrideU, ByteBuffer srcV, int srcStrideV, ByteBuffer dstY, int dstStrideY,
ByteBuffer dstU, int dstStrideU, ByteBuffer dstV, int dstStrideV, int srcWidth, int srcHeight,
int rotationMode);
private static native void nativeABGRToI420(ByteBuffer src, int srcStride, ByteBuffer dstY,
int dstStrideY, ByteBuffer dstU, int dstStrideU, ByteBuffer dstV, int dstStrideV, int width,
int height);
}