Package tvi.webrtc

Class YuvHelper


  • public class YuvHelper
    extends java.lang.Object
    Wraps libyuv methods to Java. All passed byte buffers must be direct byte buffers.
    • Constructor Summary

      Constructors 
      Constructor Description
      YuvHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void ABGRToI420​(java.nio.ByteBuffer src, int srcStride, java.nio.ByteBuffer dstY, int dstStrideY, java.nio.ByteBuffer dstU, int dstStrideU, java.nio.ByteBuffer dstV, int dstStrideV, int width, int height)
      Converts ABGR little endian (rgba in memory) to I420.
      static void copyPlane​(java.nio.ByteBuffer src, int srcStride, java.nio.ByteBuffer dst, int dstStride, int width, int height)
      Helper method for copying a single colour plane.
      static void I420Copy​(java.nio.ByteBuffer srcY, int srcStrideY, java.nio.ByteBuffer srcU, int srcStrideU, java.nio.ByteBuffer srcV, int srcStrideV, java.nio.ByteBuffer dst, int width, int height)
      Helper method for copying I420 to tightly packed destination buffer.
      static void I420Copy​(java.nio.ByteBuffer srcY, int srcStrideY, java.nio.ByteBuffer srcU, int srcStrideU, java.nio.ByteBuffer srcV, int srcStrideV, java.nio.ByteBuffer dstY, int dstStrideY, java.nio.ByteBuffer dstU, int dstStrideU, java.nio.ByteBuffer dstV, int dstStrideV, int width, int height)  
      static void I420Rotate​(java.nio.ByteBuffer srcY, int srcStrideY, java.nio.ByteBuffer srcU, int srcStrideU, java.nio.ByteBuffer srcV, int srcStrideV, java.nio.ByteBuffer dst, int srcWidth, int srcHeight, int rotationMode)
      Helper method for rotating I420 to tightly packed destination buffer.
      static void I420Rotate​(java.nio.ByteBuffer srcY, int srcStrideY, java.nio.ByteBuffer srcU, int srcStrideU, java.nio.ByteBuffer srcV, int srcStrideV, java.nio.ByteBuffer dstY, int dstStrideY, java.nio.ByteBuffer dstU, int dstStrideU, java.nio.ByteBuffer dstV, int dstStrideV, int srcWidth, int srcHeight, int rotationMode)  
      static void I420ToNV12​(java.nio.ByteBuffer srcY, int srcStrideY, java.nio.ByteBuffer srcU, int srcStrideU, java.nio.ByteBuffer srcV, int srcStrideV, java.nio.ByteBuffer dst, int width, int height)
      Helper method for copying I420 to tightly packed NV12 destination buffer.
      static void I420ToNV12​(java.nio.ByteBuffer srcY, int srcStrideY, java.nio.ByteBuffer srcU, int srcStrideU, java.nio.ByteBuffer srcV, int srcStrideV, java.nio.ByteBuffer dstY, int dstStrideY, java.nio.ByteBuffer dstUV, int dstStrideUV, int width, int height)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • YuvHelper

        public YuvHelper()
    • Method Detail

      • I420Copy

        public static void I420Copy​(java.nio.ByteBuffer srcY,
                                    int srcStrideY,
                                    java.nio.ByteBuffer srcU,
                                    int srcStrideU,
                                    java.nio.ByteBuffer srcV,
                                    int srcStrideV,
                                    java.nio.ByteBuffer dst,
                                    int width,
                                    int height)
        Helper method for copying I420 to tightly packed destination buffer.
      • I420ToNV12

        public static void I420ToNV12​(java.nio.ByteBuffer srcY,
                                      int srcStrideY,
                                      java.nio.ByteBuffer srcU,
                                      int srcStrideU,
                                      java.nio.ByteBuffer srcV,
                                      int srcStrideV,
                                      java.nio.ByteBuffer dst,
                                      int width,
                                      int height)
        Helper method for copying I420 to tightly packed NV12 destination buffer.
      • I420Rotate

        public static void I420Rotate​(java.nio.ByteBuffer srcY,
                                      int srcStrideY,
                                      java.nio.ByteBuffer srcU,
                                      int srcStrideU,
                                      java.nio.ByteBuffer srcV,
                                      int srcStrideV,
                                      java.nio.ByteBuffer dst,
                                      int srcWidth,
                                      int srcHeight,
                                      int rotationMode)
        Helper method for rotating I420 to tightly packed destination buffer.
      • copyPlane

        public static void copyPlane​(java.nio.ByteBuffer src,
                                     int srcStride,
                                     java.nio.ByteBuffer dst,
                                     int dstStride,
                                     int width,
                                     int height)
        Helper method for copying a single colour plane.
      • ABGRToI420

        public static void ABGRToI420​(java.nio.ByteBuffer src,
                                      int srcStride,
                                      java.nio.ByteBuffer dstY,
                                      int dstStrideY,
                                      java.nio.ByteBuffer dstU,
                                      int dstStrideU,
                                      java.nio.ByteBuffer dstV,
                                      int dstStrideV,
                                      int width,
                                      int height)
        Converts ABGR little endian (rgba in memory) to I420.
      • I420Copy

        public static void I420Copy​(java.nio.ByteBuffer srcY,
                                    int srcStrideY,
                                    java.nio.ByteBuffer srcU,
                                    int srcStrideU,
                                    java.nio.ByteBuffer srcV,
                                    int srcStrideV,
                                    java.nio.ByteBuffer dstY,
                                    int dstStrideY,
                                    java.nio.ByteBuffer dstU,
                                    int dstStrideU,
                                    java.nio.ByteBuffer dstV,
                                    int dstStrideV,
                                    int width,
                                    int height)
      • I420ToNV12

        public static void I420ToNV12​(java.nio.ByteBuffer srcY,
                                      int srcStrideY,
                                      java.nio.ByteBuffer srcU,
                                      int srcStrideU,
                                      java.nio.ByteBuffer srcV,
                                      int srcStrideV,
                                      java.nio.ByteBuffer dstY,
                                      int dstStrideY,
                                      java.nio.ByteBuffer dstUV,
                                      int dstStrideUV,
                                      int width,
                                      int height)
      • I420Rotate

        public static void I420Rotate​(java.nio.ByteBuffer srcY,
                                      int srcStrideY,
                                      java.nio.ByteBuffer srcU,
                                      int srcStrideU,
                                      java.nio.ByteBuffer srcV,
                                      int srcStrideV,
                                      java.nio.ByteBuffer dstY,
                                      int dstStrideY,
                                      java.nio.ByteBuffer dstU,
                                      int dstStrideU,
                                      java.nio.ByteBuffer dstV,
                                      int dstStrideV,
                                      int srcWidth,
                                      int srcHeight,
                                      int rotationMode)