Class Interlacer

  • Direct Known Subclasses:
    InterlacerAGSL

    public class Interlacer
    extends Object
    JNI wrapper over C++ IThreadedInterlacer.
    • Constructor Detail

      • Interlacer

        public Interlacer()
    • Method Detail

      • initOpenGL

        public void initOpenGL​(LeiaSDK leiaSDK,
                               EGLContext eglContext,
                               boolean isProtected)
      • setOutputRenderTarget

        public void setOutputRenderTarget​(int framebuffer)
      • doPassthrough

        public void doPassthrough​(int viewportWidth,
                                  int viewportHeight,
                                  int viewsTextureid,
                                  int viewsTextureTarget,
                                  int viewsWidth,
                                  int viewsHeight,
                                  boolean viewsHorizontal)
        Blits the provided views onto the current framebuffer as is.
      • setTextureMatrix

        public void setTextureMatrix​(float[] textureTransform)
      • setViewportScreenPosition

        public void setViewportScreenPosition​(int xPos,
                                              int yPos)
      • setViewport

        public void setViewport​(int posX,
                                int posY,
                                int width,
                                int height)
      • setFlipInputUvVertical

        public void setFlipInputUvVertical​(boolean flip)
      • setSourceSize

        public void setSourceSize​(int width,
                                  int height,
                                  boolean viewsHorizontal)
      • setScaleType

        public void setScaleType​(ScaleType scaleType)
      • drawRoundedCorners

        public void drawRoundedCorners​(int fbWidth,
                                       int fbHeight,
                                       int viewportX,
                                       int viewportY,
                                       int viewportWidth,
                                       int viewportHeight,
                                       float radius,
                                       float borderColorRed,
                                       float borderColorGreen,
                                       float borderColorBlue,
                                       float borderColorAlpha)
      • getConvergedPerspectiveViewInfo

        public ConvergedPerspectiveViewInfo getConvergedPerspectiveViewInfo​(int viewIndex,
                                                                            Vector3 cameraPosition,
                                                                            Vector3 cameraDir,
                                                                            Vector3 cameraUp,
                                                                            float fieldOfView,
                                                                            float aspectRatio,
                                                                            float nearPlane,
                                                                            float farPlane)
      • getRectMatrix

        public float[] getRectMatrix()
      • close

        public void close()
      • setSourceViews

        public void setSourceViews​(int id,
                                   int target,
                                   int viewIndex,
                                   int layerIndex)
        Set the views to interlace.
        Parameters:
        id - views texture GL id to interlace.
        target - views texture GL target. Must be one of GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES.
      • setNumTiles

        public void setNumTiles​(int x,
                                int y)
      • setSingleViewMode

        public void setSingleViewMode​(boolean singleViewMode,
                                      int index)
      • setLayerCount

        public void setLayerCount​(int layerCount)
      • getLayerCount

        public int getLayerCount()
      • setSourceViewsSRGB

        public void setSourceViewsSRGB​(boolean isSRGB)
      • setInShaderSRGBConversion

        public void setInShaderSRGBConversion​(boolean sRGBRead,
                                              boolean sRGBWrite)
      • getZonePlateInitialState

        public ZonePlateState getZonePlateInitialState​(int viewportWidth,
                                                       int viewportHeight)
      • setSupportCirclePhase

        public void setSupportCirclePhase​(float phase)
      • writeZonePlateResultsToInterlacer

        public boolean writeZonePlateResultsToInterlacer​(float slant,
                                                         float pitch,
                                                         float phc,
                                                         float dOverN,
                                                         float n)
      • setCameraRectificationParameters

        public void setCameraRectificationParameters​(boolean isFront,
                                                     float deltaThetaX,
                                                     float deltaThetaY,
                                                     float deltaThetaZ,
                                                     float calibrationTargetDistanceMm)
      • setCameraAngles

        public void setCameraAngles​(boolean isLeft,
                                    float thetaXFpc,
                                    float thetaYFpc,
                                    float thetaZFpc)
      • getActCoef

        public float getActCoef()