SRSDK
0.10.39
|
Interlacing on Leia devices. More...
Modules | |
D3D11 Interlacer | |
D3D11 interlacing on Leia devices. | |
D3D12 Interlacer | |
D3D12 interlacing on Leia devices. | |
OpenGL Interlacer | |
OpenGL interlacing on Leia devices. | |
Vulkan Interlacer | |
Vulkan interlacing on Leia devices. | |
Namespaces | |
namespace | leia |
Data Structures | |
struct | leia_interlacer |
The main entity used for performing interlacing on Leia devices. More... | |
struct | leia_interlacer_init_configuration |
leia_interlacer's initial configuration. More... | |
struct | leia_interlacer_gui_configuration |
struct | leia_interlacer_single_view_mode_listener |
Typedefs | |
typedef void(* | leia_interlacer_enable_act) (struct leia_interlacer *, leia_bool enable) |
Enable or disable Anti-crosstalk. | |
typedef leia_bool(* | leia_interlacer_is_act_enabled) (struct leia_interlacer *) |
Gets whether anti-crosstalk is enabled or not. | |
typedef leia_bool(* | leia_interlacer_init_zone_plate) (struct leia_interlacer *, int32_t viewportWidth, int32_t viewportHeight, float *posX, float *posY, float *scaleX, float *scaleY, float *overrideSupportCirclePhase) |
Init zone plate. | |
typedef void(* | leia_interlacer_set_zone_plate) (struct leia_interlacer *, float posX, float posY, float scaleX, float scaleY, float overrideSupportCirclePhase) |
Set the origin and scale of the zoom plate. | |
typedef leia_bool(* | leia_interlacer_get_zone_plate_results) (struct leia_interlacer *, float *slant, float *pitch, float *phc, float *dOverN, float *n) |
typedef void(* | leia_interlacer_set_support_circle_phase) (struct leia_interlacer *, float phase) |
typedef leia_bool(* | leia_interlacer_write_zone_plate_results) (struct leia_interlacer *, float slant, float pitch, float phc, float dOverN, float n) |
typedef void(* | leia_interlacer_set_camera_rectification_parameters) (struct leia_interlacer *, leia_bool isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm) |
typedef void(* | leia_interlacer_set_camera_angles) (struct leia_interlacer *, leia_bool isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc) |
typedef void(* | leia_interlacer_set_dovern) (struct leia_interlacer *, float dOverN) |
typedef void(* | leia_interlacer_enable_phase_correction) (struct leia_interlacer *, leia_bool enable) |
typedef void(* | leia_interlacer_invert_phase_correction) (struct leia_interlacer *, leia_bool invert) |
typedef void(* | leia_interlacer_enable_don_correction) (struct leia_interlacer *, leia_bool enable) |
typedef void(* | leia_interlacer_set_n) (struct leia_interlacer *, float n) |
typedef void(* | leia_interlacer_set_act_coef) (struct leia_interlacer *, float n) |
typedef float(* | leia_interlacer_get_act_coef) (struct leia_interlacer *) |
typedef void(* | leia_interlacer_initialize_gui) (struct leia_interlacer *, struct leia_interlacer_debug_menu_configuration const *config, leia_bool sRGB) |
Initializes and enables use of a debug GUI. | |
typedef void(* | leia_interlacer_set_gui_visibility) (struct leia_interlacer *, leia_bool isVisible) |
Set whether the GUI is visible. | |
typedef leia_bool(* | leia_interlacer_is_gui_visible) (struct leia_interlacer *) |
Gets whether we the GUI is visible. | |
typedef struct leia_interlacer_gui_input_state(* | leia_interlacer_process_gui_input_wndproc) (struct leia_interlacer *, void *surface, uint32_t msg, uint64_t wparam, int64_t lparam) |
Process user-input for the GUI. | |
typedef struct leia_interlacer_gui_input_state(* | leia_interlacer_process_gui_input_ndk) (struct leia_interlacer *, struct AInputEvent const *inputEvent) |
Process user-input for the GUI. | |
typedef struct leia_interlacer_gui_input_state(* | leia_interlacer_process_gui_motion_input) (struct leia_interlacer *, JNIEnv *jni, jobject motionInput) |
Process user-input for the GUI. | |
typedef void(* | leia_interlacer_shutdown_gui) (struct leia_interlacer *) |
Shutdown the GUI. | |
typedef void(* | leia_interlacer_set_calibration_pattern) (struct leia_interlacer *, enum leia_calibration_pattern pattern) |
Sets the calibration pattern. | |
typedef void(* | leia_interlacer_set_gamma) (struct leia_interlacer *, float rGamma, float gGamma, float bGamma) |
Set the gamma value during interlacing. | |
Enumerations | |
enum | { LEIA_INTERLACER_MAX_LAYERS = 16 , LEIA_INTERLACER_MAX_VIEWS = 12 } |
Functions | |
LEIA_NODISCARD LEIASDK_API struct leia_interlacer_init_configuration * | leia_interlacer_init_configuration_alloc () |
LEIASDK_API void | leia_interlacer_init_configuration_set_is_protected (struct leia_interlacer_init_configuration *, leia_bool) |
Whether we are using a protected OpenGL context. | |
LEIASDK_API void | leia_interlacer_init_configuration_set_use_atlas_for_views (struct leia_interlacer_init_configuration *, leia_bool) |
If we should use atlas by default. | |
LEIASDK_API void | leia_interlacer_init_configuration_free (struct leia_interlacer_init_configuration *) |
LEIASDK_API float | leia_interlacer_get_phc (struct leia_interlacer *) |
LEIASDK_API void | leia_interlacer_set_phc (struct leia_interlacer *, float phase) |
LEIASDK_API void | leia_interlacer_set_enable_user_matrix (struct leia_interlacer *interlacer, leia_bool enabled) |
LEIASDK_API void | leia_interlacer_get_user_matrix (struct leia_interlacer *interlacer, LEIA_FLOAT_SLICE(16) transformMatrix) |
LEIASDK_API void | leia_interlacer_set_user_matrix (struct leia_interlacer *interlacer, LEIA_CONST_FLOAT_SLICE(16) transformMatrix) |
LEIASDK_API void | leia_interlacer_retain (struct leia_interlacer *) |
Increment leia_interlacer reference count. | |
LEIASDK_API void | leia_interlacer_release (struct leia_interlacer *) |
Decrement leia_interlacer reference count. | |
LEIASDK_API int32_t | leia_interlacer_get_max_layer_count (struct leia_interlacer *) |
Gets the max number of layers that can be interlaced at once. | |
LEIASDK_API int32_t | leia_interlacer_get_max_view_count (struct leia_interlacer *) |
Gets the max number of views per layer that can be interlaced at once. | |
LEIASDK_API void | leia_interlacer_set_layer_count (struct leia_interlacer *, int layerCount) |
Sets the number of layers to interlace. | |
LEIA_NODISCARD LEIASDK_API int | leia_interlacer_get_layer_count (struct leia_interlacer *) |
Gets the current number of layers. | |
LEIASDK_API void | leia_interlacer_set_num_tiles (struct leia_interlacer *, int32_t tx, int32_t ty) |
Set the layout of views in a atlas. | |
LEIASDK_API void | leia_interlacer_get_num_tiles (struct leia_interlacer *, int32_t *tx, int32_t *ty) |
Get the layout of views in the atlas. | |
LEIASDK_API void | leia_interlacer_set_tile_layout (struct leia_interlacer *, enum leia_tile_layout tileLayout) |
Set the layout of the tiles in the atlas. | |
LEIASDK_API void | leia_interlacer_output_as_tiles (struct leia_interlacer *, leia_bool enable) |
Enable or disable output of raw source tiles. | |
LEIASDK_API void | leia_interlacer_set_baseline_scaling (struct leia_interlacer *, float baseline) |
Sets the baseline scaling. | |
LEIA_NODISCARD LEIASDK_API float | leia_interlacer_get_baseline_scaling (struct leia_interlacer *) |
Get the baseline scaling. | |
LEIA_NODISCARD LEIASDK_API float | leia_interlacer_get_convergence_distance (struct leia_interlacer *) |
Get the convergence distance. | |
LEIASDK_API void | leia_interlacer_set_convergence_distance (struct leia_interlacer *, float distance) |
Set the convergence distance. | |
LEIASDK_API void | leia_interlacer_get_converged_orthographic_view_info (struct leia_interlacer *, int32_t viewIndex, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float width, float height, float nearPlane, float farPlane, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewShearX, float *viewShearY) |
Retrieve information related to a view. | |
LEIASDK_API void | leia_interlacer_get_converged_perspective_view_info (struct leia_interlacer *, int32_t viewIndex, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float fieldOfView, float aspectRatio, float nearPlane, float farPlane, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewFieldOfView, float *viewShearX, float *viewShearY) |
Retrieve information related to a view. | |
LEIASDK_API void | leia_interlacer_set_fit_mode (struct leia_interlacer *, enum leia_fit_mode mode) |
Set the fit mode. | |
LEIA_NODISCARD LEIASDK_API enum leia_fit_mode | leia_interlacer_get_fit_mode (struct leia_interlacer *) |
Get the fit mode. | |
LEIASDK_API void | leia_interlacer_get_rect_matrix (struct leia_interlacer *, LEIA_FLOAT_SLICE(16) transformMatrix) |
Get the rect matrix. | |
LEIASDK_API void | leia_interlacer_set_local_matrix (struct leia_interlacer *, LEIA_CONST_FLOAT_SLICE(16) transformMatrix) |
Set the local matrix. | |
LEIASDK_API void | leia_interlacer_set_custom_texture_matrix (struct leia_interlacer *, LEIA_CONST_FLOAT_SLICE(16) textureTransform) |
Set the custom texture matrix. | |
LEIASDK_API void | leia_interlacer_set_alpha (struct leia_interlacer *, float alpha) |
Sets the alpha blending value. | |
LEIASDK_API void | leia_interlacer_set_flip_input_uv_vertical (struct leia_interlacer *, leia_bool flip) |
Set whether to flip the views vertically. | |
LEIASDK_API void | leia_interlacer_set_single_view_mode (struct leia_interlacer *, leia_bool setSingleView, int32_t singleViewIndex) |
Set single-view interlacing mode. | |
LEIASDK_API void | leia_interlacer_set_single_view_mode_listener (struct leia_interlacer *, struct leia_interlacer_single_view_mode_listener const *listener) |
Set single-view mode callback. | |
LEIASDK_API void | leia_interlacer_set_source_views_size (struct leia_interlacer *, int32_t sourceWidth, int32_t sourceHeight, leia_bool isHorizontalViews) |
Set dimensions of the views. | |
LEIASDK_API void | leia_interlacer_get_source_views_size (struct leia_interlacer *, int32_t *sourceWidth, int32_t *sourceHeight, leia_bool *isHorizontalViews) |
Get dimensions of the views previously set via leia_interlacer_set_source_views_size. | |
LEIASDK_API void | leia_interlacer_set_source_media_is_video (struct leia_interlacer *, leia_bool isVideo) |
Set whether source media is a video or not. | |
LEIASDK_API void | leia_interlacer_set_source_media_scale (struct leia_interlacer *, float scaleX, float scaleY) |
Set source media scale factors. | |
LEIASDK_API void | leia_interlacer_set_source_views_srgb (struct leia_interlacer *, leia_bool isSRGB) |
Set whether view textures are in a sRGB format. | |
LEIASDK_API void | leia_interlacer_set_in_shader_srgb_conversion (struct leia_interlacer *, leia_bool sRGBRead, leia_bool sRGBWrite) |
Set whether to sRGB conversions are enabled or disabled in the interlacing shader. | |
LEIASDK_API void | leia_interlacer_set_viewport_screen_position (struct leia_interlacer *, int32_t posX, int32_t posY) |
Set the viewport screen position. | |
LEIASDK_API void | leia_interlacer_set_viewport (struct leia_interlacer *, int32_t posX, int32_t posY, int32_t width, int32_t height) |
Set the viewport. | |
LEIASDK_API void | leia_interlacer_enable_reconvergence (struct leia_interlacer *, leia_bool enable) |
Enable or disable reconvergence. | |
LEIA_NODISCARD LEIASDK_API leia_bool | leia_interlacer_is_reconvergence_enabled (struct leia_interlacer *) |
Gets whether we are using reconvergence. | |
LEIA_NODISCARD LEIASDK_API float | leia_interlacer_get_reconvergence (struct leia_interlacer *, int layer) |
Get the reconvergence amount. | |
LEIASDK_API void | leia_interlacer_set_reconvergence (struct leia_interlacer *, float value, int layer) |
Set the reconvergence amount. | |
LEIASDK_API void | leia_interlacer_set_reconvergence_zoom (struct leia_interlacer *, leia_bool zoomX, leia_bool zoomXY, int layer) |
Set what directions reconvergence is calculated for. | |
LEIASDK_API void | leia_interlacer_set_use_atlas_for_views (struct leia_interlacer *, leia_bool) |
Set whether the views are a single atlas vs individual textures. | |
LEIA_NODISCARD LEIASDK_API leia_bool | leia_interlacer_get_use_atlas_for_views (struct leia_interlacer *) |
Gets whether we are using a single atlas or individual views. | |
LEIASDK_API void | leia_interlacer_get_view_offset (struct leia_interlacer *, int32_t view, LEIA_FLOAT_SLICE(3) offset) |
Gets a view offset. | |
LEIASDK_API void | leia_interlacer_set_invert_screen_texture_coordinates (struct leia_interlacer *, leia_bool invert) |
Set whether to invert screen texture coordinates vertically. | |
LEIA_NODISCARD LEIASDK_API enum leia_graphics_api | leia_interlacer_get_graphics_api (struct leia_interlacer *) |
Get the graphics API. | |
LEIASDK_API void | leia_get_view_comfort_zone (enum leia_view_info_mode mode, float baselineScaling, float convergencePlaneDistance, float nearPlane, float farPlane, float *viewComfortZoneNear, float *viewComfortZoneFar) |
A helper function to compute comfort zone range. | |
LEIASDK_API void | leia_get_view_info (enum leia_view_info_mode mode, LEIA_CONST_FLOAT_SLICE(3) viewOffset, LEIA_CONST_FLOAT_SLICE(3) cameraPos, LEIA_CONST_FLOAT_SLICE(3) cameraDir, LEIA_CONST_FLOAT_SLICE(3) cameraUp, float perspectiveFieldOfView, float perspectiveAspectRatio, float orthoWidth, float orthoHeight, float nearPlane, float farPlane, float convergencePlaneDistance, float convergencePlaneHeight, LEIA_FLOAT_SLICE(3) viewPos, LEIA_FLOAT_SLICE(16) viewProjectionMatrix, float *viewFieldOfView, float *viewShearX, float *viewShearY) |
A helper function to compute per-view values. | |
Interlacing on Leia devices.
#define leia_interlacer_enable_act_VERSION (1) |
#define leia_interlacer_is_act_enabled_VERSION (1) |
#define leia_interlacer_init_zone_plate_VERSION (1) |
#define leia_interlacer_set_zone_plate_VERSION (1) |
#define leia_interlacer_get_zone_plate_results_VERSION (3) |
#define leia_interlacer_set_support_circle_phase_VERSION (1) |
#define leia_interlacer_write_zone_plate_results_VERSION (3) |
#define leia_interlacer_set_camera_rectification_parameters_VERSION (2) |
#define leia_interlacer_set_camera_angles_VERSION (2) |
#define leia_interlacer_set_dovern_VERSION (1) |
#define leia_interlacer_enable_phase_correction_VERSION (1) |
#define leia_interlacer_invert_phase_correction_VERSION (1) |
#define leia_interlacer_enable_don_correction_VERSION (1) |
#define leia_interlacer_set_n_VERSION (1) |
#define leia_interlacer_set_act_coef_VERSION (1) |
#define leia_interlacer_get_act_coef_VERSION (1) |
#define leia_interlacer_initialize_gui_VERSION (1) |
#define leia_interlacer_set_gui_visibility_VERSION (1) |
#define leia_interlacer_is_gui_visible_VERSION (1) |
#define leia_interlacer_process_gui_input_wndproc_VERSION (1) |
#define leia_interlacer_process_gui_input_ndk_VERSION (1) |
#define leia_interlacer_process_gui_motion_input_VERSION (1) |
#define leia_interlacer_shutdown_gui_VERSION (1) |
#define leia_interlacer_set_calibration_pattern_VERSION (1) |
#define leia_interlacer_set_gamma_VERSION (1) |
typedef void(* leia_interlacer_enable_act) (struct leia_interlacer *, leia_bool enable) |
Enable or disable Anti-crosstalk.
Use this method to enable or disable anti-crosstalk. When enabled, the interlaced image result will have reduced crosstalk artifacts.
enable | Whether to enable or disable ACT. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef leia_bool(* leia_interlacer_is_act_enabled) (struct leia_interlacer *) |
Gets whether anti-crosstalk is enabled or not.
It's an experimental API, see leia_get_experimental_api for more info.
typedef leia_bool(* leia_interlacer_init_zone_plate) (struct leia_interlacer *, int32_t viewportWidth, int32_t viewportHeight, float *posX, float *posY, float *scaleX, float *scaleY, float *overrideSupportCirclePhase) |
Init zone plate.
It's an experimental API, see leia_get_experimental_api for more info.
typedef void(* leia_interlacer_set_zone_plate) (struct leia_interlacer *, float posX, float posY, float scaleX, float scaleY, float overrideSupportCirclePhase) |
Set the origin and scale of the zoom plate.
Use this method to set the zoom plate, i.e. the raw values for zoom & pan gesture handling
[in] | posX,posY,scaleX,scaleY | The raw x, y, absoluteZoomX, absoluteZoomY |
It's an experimental API, see leia_get_experimental_api for more info.
typedef leia_bool(* leia_interlacer_get_zone_plate_results) (struct leia_interlacer *, float *slant, float *pitch, float *phc, float *dOverN, float *n) |
typedef void(* leia_interlacer_set_support_circle_phase) (struct leia_interlacer *, float phase) |
typedef leia_bool(* leia_interlacer_write_zone_plate_results) (struct leia_interlacer *, float slant, float pitch, float phc, float dOverN, float n) |
typedef void(* leia_interlacer_set_camera_rectification_parameters) (struct leia_interlacer *, leia_bool isFront, float deltaThetaX, float deltaThetaY, float deltaThetaZ, float calibrationTargetDistanceMm) |
typedef void(* leia_interlacer_set_camera_angles) (struct leia_interlacer *, leia_bool isLeft, float thetaXFpc, float thetaYFpc, float thetaZFpc) |
typedef void(* leia_interlacer_set_dovern) (struct leia_interlacer *, float dOverN) |
typedef void(* leia_interlacer_enable_phase_correction) (struct leia_interlacer *, leia_bool enable) |
typedef void(* leia_interlacer_invert_phase_correction) (struct leia_interlacer *, leia_bool invert) |
typedef void(* leia_interlacer_enable_don_correction) (struct leia_interlacer *, leia_bool enable) |
typedef void(* leia_interlacer_set_n) (struct leia_interlacer *, float n) |
typedef void(* leia_interlacer_set_act_coef) (struct leia_interlacer *, float n) |
typedef float(* leia_interlacer_get_act_coef) (struct leia_interlacer *) |
typedef void(* leia_interlacer_initialize_gui) (struct leia_interlacer *, struct leia_interlacer_debug_menu_configuration const *config, leia_bool sRGB) |
Initializes and enables use of a debug GUI.
Use this method to enable rendering a debug GUI on top of the interlaced result. This can be useful for testing and debugging. The GUI is interactive and allows the user to view and modify many options.
[in] | config | Arguments for the debug menu, see leia_interlacer_debug_menu_configuration. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef void(* leia_interlacer_set_gui_visibility) (struct leia_interlacer *, leia_bool isVisible) |
Set whether the GUI is visible.
Use this method to make the GUI visible or not.
[in] | isVisible | Whether to show or hide GUI. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef leia_bool(* leia_interlacer_is_gui_visible) (struct leia_interlacer *) |
Gets whether we the GUI is visible.
It's an experimental API, see leia_get_experimental_api for more info.
typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_input_wndproc) (struct leia_interlacer *, void *surface, uint32_t msg, uint64_t wparam, int64_t lparam) |
Process user-input for the GUI.
When the GUI is enabled, we need to process user input (keyboard, mouse, touch) to drive the interface. Call this method when you receive window messages in your WNDPROC callback.
[in] | surface | The hWnd value from the WNDPROC. |
[in] | msg | The uMsg value from the WNDPROC. |
[in] | wParam | The uMsg value from the WNDPROC. |
[in] | lParam | The uMsg value from the WNDPROC. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_input_ndk) (struct leia_interlacer *, struct AInputEvent const *inputEvent) |
Process user-input for the GUI.
When the GUI is enabled, we need to process user input (keyboard, mouse, touch) to drive the interface. Call this method when your Android app receives an input event.
[in] | inputEvent | The received AInputEvent. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef struct leia_interlacer_gui_input_state(* leia_interlacer_process_gui_motion_input) (struct leia_interlacer *, JNIEnv *jni, jobject motionInput) |
Process user-input for the GUI.
When the GUI is enabled, we need to process user input (keyboard, mouse, touch) to drive the interface. Call this method when your Android app receives a motion input event.
[in] | jni | The JNI environment structure for the application. |
[in] | motionInput | The received motion input. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef void(* leia_interlacer_shutdown_gui) (struct leia_interlacer *) |
Shutdown the GUI.
Use this method when you are finished with the GUI.
It's an experimental API, see leia_get_experimental_api for more info.
typedef void(* leia_interlacer_set_calibration_pattern) (struct leia_interlacer *, enum leia_calibration_pattern pattern) |
Sets the calibration pattern.
This method allows setting calibration pattern. This can be used to calibrate Leia devices but also to visually inspect and verify if a display is calibrated correctly.
[in] | pattern | The calibration pattern to set. |
It's an experimental API, see leia_get_experimental_api for more info.
typedef void(* leia_interlacer_set_gamma) (struct leia_interlacer *, float rGamma, float gGamma, float bGamma) |
Set the gamma value during interlacing.
[in] | rGamma | Red component of gamma. |
[in] | gGamma | Green component of gamma. |
[in] | bGamma | Blue component of gamma. |
It's an experimental API, see leia_get_experimental_api for more info.
anonymous enum |
LEIA_NODISCARD LEIASDK_API struct leia_interlacer_init_configuration * leia_interlacer_init_configuration_alloc | ( | ) |
LEIASDK_API void leia_interlacer_init_configuration_set_is_protected | ( | struct leia_interlacer_init_configuration * | , |
leia_bool | |||
) |
Whether we are using a protected OpenGL context.
LEIASDK_API void leia_interlacer_init_configuration_set_use_atlas_for_views | ( | struct leia_interlacer_init_configuration * | , |
leia_bool | |||
) |
If we should use atlas by default.
LEIASDK_API void leia_interlacer_init_configuration_free | ( | struct leia_interlacer_init_configuration * | ) |
LEIASDK_API float leia_interlacer_get_phc | ( | struct leia_interlacer * | ) |
LEIASDK_API void leia_interlacer_set_phc | ( | struct leia_interlacer * | , |
float | phase | ||
) |
LEIASDK_API void leia_interlacer_set_enable_user_matrix | ( | struct leia_interlacer * | interlacer, |
leia_bool | enabled | ||
) |
LEIASDK_API void leia_interlacer_get_user_matrix | ( | struct leia_interlacer * | interlacer, |
LEIA_FLOAT_SLICE(16) | transformMatrix | ||
) |
LEIASDK_API void leia_interlacer_set_user_matrix | ( | struct leia_interlacer * | interlacer, |
LEIA_CONST_FLOAT_SLICE(16) | transformMatrix | ||
) |
LEIASDK_API void leia_interlacer_retain | ( | struct leia_interlacer * | ) |
Increment leia_interlacer reference count.
LEIASDK_API void leia_interlacer_release | ( | struct leia_interlacer * | ) |
Decrement leia_interlacer reference count.
Frees resources when its reference count reaches 0.
LEIASDK_API int32_t leia_interlacer_get_max_layer_count | ( | struct leia_interlacer * | ) |
Gets the max number of layers that can be interlaced at once.
LEIASDK_API int32_t leia_interlacer_get_max_view_count | ( | struct leia_interlacer * | ) |
Gets the max number of views per layer that can be interlaced at once.
LEIASDK_API void leia_interlacer_set_layer_count | ( | struct leia_interlacer * | , |
int | layerCount | ||
) |
Sets the number of layers to interlace.
Use this method to set the number of layers you want to be interlaced.
layerCount | Number of layers. |
LEIA_NODISCARD LEIASDK_API int leia_interlacer_get_layer_count | ( | struct leia_interlacer * | ) |
Gets the current number of layers.
LEIASDK_API void leia_interlacer_set_num_tiles | ( | struct leia_interlacer * | , |
int32_t | tx, | ||
int32_t | ty | ||
) |
Set the layout of views in a atlas.
If you are using a atlas for views, the views are laid-out in a certain format. By default a stereo 2x1 left/right format is used. Use this method to override to any view layout.
[in] | tx | Number of views horizontally. |
[in] | ty | Number of views vertically. |
LEIASDK_API void leia_interlacer_get_num_tiles | ( | struct leia_interlacer * | , |
int32_t * | tx, | ||
int32_t * | ty | ||
) |
Get the layout of views in the atlas.
When rendering multiple views to a single atlas, they are laid-out in a certain way. By default we use a stereo 2x1 layout. Use this method to retrieve the set layout.
[out] | tx | Number of horizontal views. |
[out] | ty | Number of vertical views. |
LEIASDK_API void leia_interlacer_set_tile_layout | ( | struct leia_interlacer * | , |
enum leia_tile_layout | tileLayout | ||
) |
Set the layout of the tiles in the atlas.
The layout describes the default order-of-traversal of the tile-grid in the atlas. Options are: left-to-right or right-to-left top-down or bottom-up (DOWN or UP) row-major or column-major Default is: LEIA_TILE_LAYOUT_LEFT_TO_RIGHT_DOWN_ROW_MAJOR
[in] | tileLayout | Layout of tiles. |
LEIASDK_API void leia_interlacer_output_as_tiles | ( | struct leia_interlacer * | , |
leia_bool | enable | ||
) |
Enable or disable output of raw source tiles.
Use this method to view either the raw tiled SBS source media or the interlaced image result.
enable | Whether to enable or disable viewing the source tiles. |
LEIASDK_API void leia_interlacer_set_baseline_scaling | ( | struct leia_interlacer * | , |
float | baseline | ||
) |
Sets the baseline scaling.
Use this method to set the baseline scaling value. The baseline scaling value determines the horizontal view camera spacing and hence the strength of the 3D effect in the interlaced result.
[in] | baseline | The baseline scaling to use. |
LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_baseline_scaling | ( | struct leia_interlacer * | ) |
Get the baseline scaling.
Use this method to retrieve the baseline scaling value set via leia_interlacer_set_baseline_scaling(). The baseline scaling value determines the horizontal view camera spacing and hence the strength of the 3D effect in the interlaced result.
LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_convergence_distance | ( | struct leia_interlacer * | ) |
Get the convergence distance.
Use this method to retrieve the convergence distance value set via leia_interlacer_set_convergence_distance(). The convergence distance value determines the distance at which objects appear directly on the display. Objects closer than the convergence distance appear to float in front of the display and objects farther than the convergence distance appear to be inside the display.
LEIASDK_API void leia_interlacer_set_convergence_distance | ( | struct leia_interlacer * | , |
float | distance | ||
) |
Set the convergence distance.
Use this method to set the convergence distance. The convergence distance value determines the distance at which objects appear directly on the display. Objects closer than the convergence distance appear to float in front of the display and objects farther than the convergence distance appear to be inside the display.
[in] | distance | The convergence distance. |
LEIASDK_API void leia_interlacer_get_converged_orthographic_view_info | ( | struct leia_interlacer * | , |
int32_t | viewIndex, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraPos, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraDir, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraUp, | ||
float | width, | ||
float | height, | ||
float | nearPlane, | ||
float | farPlane, | ||
LEIA_FLOAT_SLICE(3) | viewPos, | ||
LEIA_FLOAT_SLICE(16) | viewProjectionMatrix, | ||
float * | viewShearX, | ||
float * | viewShearY | ||
) |
Retrieve information related to a view.
Use this method to obtain general information about a view when the view will be renderered with an orthographic projection.
[in] | viewIndex | The view index, starting at zero and increasing from left-to-right from the main camera's perspective. |
[in] | cameraPos | Main camera position. |
[in] | cameraDir | Main camera direction. |
[in] | cameraUp | Main camera up vector. |
[in] | width | Width of orthograpic projection. |
[in] | height | Height of orthograpic projection. |
[in] | nearPlane | Frustum near plane distance. |
[in] | farPlane | Frustum far plane distance. |
[out] | viewPos | Position of the view [Optional]. |
[out] | viewProjectionMatrix | Projection matrix of the view [Optional]. |
[out] | viewShearX | Horizontal shear value for the view [Optional]. |
[out] | viewShearY | Vertical shear value for the view [Optional]. |
LEIASDK_API void leia_interlacer_get_converged_perspective_view_info | ( | struct leia_interlacer * | , |
int32_t | viewIndex, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraPos, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraDir, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraUp, | ||
float | fieldOfView, | ||
float | aspectRatio, | ||
float | nearPlane, | ||
float | farPlane, | ||
LEIA_FLOAT_SLICE(3) | viewPos, | ||
LEIA_FLOAT_SLICE(16) | viewProjectionMatrix, | ||
float * | viewFieldOfView, | ||
float * | viewShearX, | ||
float * | viewShearY | ||
) |
Retrieve information related to a view.
Use this method to obtain general information about a view when the view will be renderered with a perspective projection.
[in] | viewIndex | The view index, starting at zero and increasing from left-to-right from the main camera's perspective. |
[in] | cameraPos | Main camera position. |
[in] | cameraDir | Main camera direction. |
[in] | cameraUp | Main camera up vector. |
[in] | fieldOfView | Horizontal field of view of the projection (in radians). |
[in] | aspectRatio | Ratio of the horizontal-to-vertical projection plane size. |
[in] | nearPlane | Frustum near plane distance. |
[in] | farPlane | Frustum far plane distance. |
[out] | viewPos | Position of the view [Optional]. |
[out] | viewProjectionMatrix | Projection matrix of the view [Optional]. |
[out] | viewFieldOfView | Horizontal field of view of the view [Optional]. |
[out] | viewShearX | Horizontal shear value for the view [Optional]. |
[out] | viewShearY | Vertical shear value for the view [Optional]. |
LEIASDK_API void leia_interlacer_set_fit_mode | ( | struct leia_interlacer * | , |
enum leia_fit_mode | mode | ||
) |
Set the fit mode.
Use this method to set the fit mode. The fit mode allows fitting interlaced content at a different aspect-ratio than the render-target.
[in] | mode | The desired fit mode. |
LEIA_NODISCARD LEIASDK_API enum leia_fit_mode leia_interlacer_get_fit_mode | ( | struct leia_interlacer * | ) |
Get the fit mode.
Use this method to retrieve the fit mode value set via leia_interlacer_set_fit_mode. The fit mode allows fitting interlaced content at a different aspect-ratio than the render-target.
LEIASDK_API void leia_interlacer_get_rect_matrix | ( | struct leia_interlacer * | , |
LEIA_FLOAT_SLICE(16) | transformMatrix | ||
) |
Get the rect matrix.
Use this method to retrieve the matrix set via leia_interlacer_set_fit_mode.
[out] | transformMatrix | The rect matrix is returned here |
LEIASDK_API void leia_interlacer_set_local_matrix | ( | struct leia_interlacer * | , |
LEIA_CONST_FLOAT_SLICE(16) | transformMatrix | ||
) |
Set the local matrix.
Use this method to set the local matrix e.g. for zoom & pan gesture handling
[in] | transformMatrix | The new local matrix |
LEIASDK_API void leia_interlacer_set_custom_texture_matrix | ( | struct leia_interlacer * | , |
LEIA_CONST_FLOAT_SLICE(16) | textureTransform | ||
) |
Set the custom texture matrix.
Use this method to scale media which SurfaceView thinks has non-standard dimensions
[in] | textureTransform | The new custom texture matrix |
LEIASDK_API void leia_interlacer_set_alpha | ( | struct leia_interlacer * | , |
float | alpha | ||
) |
Sets the alpha blending value.
When calling DoPostProcess, you have the option of blending the interlaced result onto the render-target. This method sets the blend amount, where zero is invisible and one is fully opaque.
[in] | alpha | The alpha-blending value. |
LEIASDK_API void leia_interlacer_set_flip_input_uv_vertical | ( | struct leia_interlacer * | , |
leia_bool | flip | ||
) |
Set whether to flip the views vertically.
If your views are inverted vertically, use this method to flip them during interlacing.
[in] | flip | Whether to flip the views. |
LEIASDK_API void leia_interlacer_set_single_view_mode | ( | struct leia_interlacer * | , |
leia_bool | setSingleView, | ||
int32_t | singleViewIndex | ||
) |
Set single-view interlacing mode.
Use this method to disable interlacing and render a single view instead.
[in] | setSingleView | Whether to enable single-view mode. |
[in] | singleViewIndex | Index of the view to be rendering if single-view mode is enabled. |
LEIASDK_API void leia_interlacer_set_single_view_mode_listener | ( | struct leia_interlacer * | , |
struct leia_interlacer_single_view_mode_listener const * | listener | ||
) |
Set single-view mode callback.
Single-view mode is automatically enabled when no face is detected for a certain amount of time and disabled when a new face is detected. To receive a callback when this occurs, use this method to specify the callback structure.
[in] | listener | The structure that will get a method callback when single-view mode changes. |
LEIASDK_API void leia_interlacer_set_source_views_size | ( | struct leia_interlacer * | , |
int32_t | sourceWidth, | ||
int32_t | sourceHeight, | ||
leia_bool | isHorizontalViews | ||
) |
Set dimensions of the views.
Use this method to specify the size and layout of the views texture. This is necessary when you a fit mode other than FILL.
[in] | sourceWidth | Width of the views. |
[in] | sourceHeight | Height of the views. |
[in] | isHorizontalViews | If the views are laid-out horizontally. |
LEIASDK_API void leia_interlacer_get_source_views_size | ( | struct leia_interlacer * | , |
int32_t * | sourceWidth, | ||
int32_t * | sourceHeight, | ||
leia_bool * | isHorizontalViews | ||
) |
Get dimensions of the views previously set via leia_interlacer_set_source_views_size.
LEIASDK_API void leia_interlacer_set_source_media_is_video | ( | struct leia_interlacer * | , |
leia_bool | isVideo | ||
) |
Set whether source media is a video or not.
[in] | isVideo | Set to true if source media is a video |
LEIASDK_API void leia_interlacer_set_source_media_scale | ( | struct leia_interlacer * | , |
float | scaleX, | ||
float | scaleY | ||
) |
Set source media scale factors.
[in] | scaleX | Horizontal scale of source media |
[in] | scaleY | Vertical scale of source media |
LEIASDK_API void leia_interlacer_set_source_views_srgb | ( | struct leia_interlacer * | , |
leia_bool | isSRGB | ||
) |
Set whether view textures are in a sRGB format.
[in] | isSRGB | Set to true if view textures are in a sRGB format. |
LEIASDK_API void leia_interlacer_set_in_shader_srgb_conversion | ( | struct leia_interlacer * | , |
leia_bool | sRGBRead, | ||
leia_bool | sRGBWrite | ||
) |
Set whether to sRGB conversions are enabled or disabled in the interlacing shader.
[in] | sRGBRead | Set to true to enable sRGB conversion when reading view texture. |
[in] | sRGBWrite | Set to true to enable sRGB conversion when writing to render-target. |
LEIASDK_API void leia_interlacer_set_viewport_screen_position | ( | struct leia_interlacer * | , |
int32_t | posX, | ||
int32_t | posY | ||
) |
Set the viewport screen position.
Use this method to set the viewport origin on the screen where the interlacing result will be rendered.
[in] | newXPos | Origin pixel x-coordinate |
[in] | newYPos | Origin pixel y-coordinate |
LEIASDK_API void leia_interlacer_set_viewport | ( | struct leia_interlacer * | , |
int32_t | posX, | ||
int32_t | posY, | ||
int32_t | width, | ||
int32_t | height | ||
) |
Set the viewport.
Use this method to set the viewport in the render-target where the interlacing result will be rendered.
[in] | posX | Origin pixel x-coordinate |
[in] | posY | Origin pixel y-coordinate |
[in] | width | Viewport's width |
[in] | height | Viewport's height |
LEIASDK_API void leia_interlacer_enable_reconvergence | ( | struct leia_interlacer * | , |
leia_bool | enable | ||
) |
Enable or disable reconvergence.
Use this method to enable or disable reconvergence. When enabled, the input views are shifted depending on the value set via leia_interlacer_set_reconvergence().
enable | Whether to enable or disable reconvergence. |
LEIA_NODISCARD LEIASDK_API leia_bool leia_interlacer_is_reconvergence_enabled | ( | struct leia_interlacer * | ) |
Gets whether we are using reconvergence.
LEIA_NODISCARD LEIASDK_API float leia_interlacer_get_reconvergence | ( | struct leia_interlacer * | , |
int | layer | ||
) |
Get the reconvergence amount.
Use this method to retrieve the reconvergence amount set via leia_interlacer_set_reconvergence().
[in] | layer | Layer for the reconverergence (default is 0) |
LEIASDK_API void leia_interlacer_set_reconvergence | ( | struct leia_interlacer * | , |
float | value, | ||
int | layer | ||
) |
Set the reconvergence amount.
Using reconvergence allows shifting the views to account for disparity.
[in] | value | Amount of reconvergence. |
[in] | layer | Layer for the reconverergence (default is 0) |
LEIASDK_API void leia_interlacer_set_reconvergence_zoom | ( | struct leia_interlacer * | , |
leia_bool | zoomX, | ||
leia_bool | zoomXY, | ||
int | layer | ||
) |
Set what directions reconvergence is calculated for.
Use this method to specify whether you wish to apply reconvergence horizontally or horizontally and vertically.
[in] | zoomX | Whether to apply reconvergence in the horizontal direction. |
[in] | zoomXY | Whether to apply reconvergence in the horizontal and vertical direction. |
[in] | layer | Layer for the reconverergence (default is 0) |
LEIASDK_API void leia_interlacer_set_use_atlas_for_views | ( | struct leia_interlacer * | , |
leia_bool | |||
) |
Set whether the views are a single atlas vs individual textures.
You can specify whether your views are all packed into a atlas or are in indidual textures with this method.
LEIA_NODISCARD LEIASDK_API leia_bool leia_interlacer_get_use_atlas_for_views | ( | struct leia_interlacer * | ) |
Gets whether we are using a single atlas or individual views.
Use this method to determine if views are individual textures or are all combined into a single atlas.
LEIASDK_API void leia_interlacer_get_view_offset | ( | struct leia_interlacer * | , |
int32_t | view, | ||
LEIA_FLOAT_SLICE(3) | offset | ||
) |
Gets a view offset.
Use this method to get the view position for the specified view index. The returned value is the relative offset where the view is located.
[in] | view | View index. |
[out] | offset | Offset of view camera. |
LEIASDK_API void leia_interlacer_set_invert_screen_texture_coordinates | ( | struct leia_interlacer * | , |
leia_bool | invert | ||
) |
Set whether to invert screen texture coordinates vertically.
If the interlaced image is going to be inverted on presentation, use this method to flip the interlacing grid pattern.
[in] | invert | Whether to invert the interlacing grid pattern. |
LEIA_NODISCARD LEIASDK_API enum leia_graphics_api leia_interlacer_get_graphics_api | ( | struct leia_interlacer * | ) |
Get the graphics API.
Use this method to retrieve the graphics API which is determined by which Initialize{OpenGL|D3D11|D3D12|Vulan} method was used.
LEIASDK_API void leia_get_view_comfort_zone | ( | enum leia_view_info_mode | mode, |
float | baselineScaling, | ||
float | convergencePlaneDistance, | ||
float | nearPlane, | ||
float | farPlane, | ||
float * | viewComfortZoneNear, | ||
float * | viewComfortZoneFar | ||
) |
A helper function to compute comfort zone range.
[in] | mode | View mode |
[in] | baselineScaling | Baseline scaling value from Leia SDK |
[in] | convergencePlaneDistance | Convergence plane distance. |
[in] | nearPlane | Frustum near plane. |
[in] | farPlane | Frustum far plane. |
[out] | viewComfortZoneNear | Near comfort zone. For best 3d results, keep geometry beyond this distance. |
[out] | viewComfortZoneFar | Far comfort zone. For best 3d results, keep geometry before this distance. |
LEIASDK_API void leia_get_view_info | ( | enum leia_view_info_mode | mode, |
LEIA_CONST_FLOAT_SLICE(3) | viewOffset, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraPos, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraDir, | ||
LEIA_CONST_FLOAT_SLICE(3) | cameraUp, | ||
float | perspectiveFieldOfView, | ||
float | perspectiveAspectRatio, | ||
float | orthoWidth, | ||
float | orthoHeight, | ||
float | nearPlane, | ||
float | farPlane, | ||
float | convergencePlaneDistance, | ||
float | convergencePlaneHeight, | ||
LEIA_FLOAT_SLICE(3) | viewPos, | ||
LEIA_FLOAT_SLICE(16) | viewProjectionMatrix, | ||
float * | viewFieldOfView, | ||
float * | viewShearX, | ||
float * | viewShearY | ||
) |
A helper function to compute per-view values.
[in] | mode | View mode |
[in] | viewOffset | View offset from Leia Interlacer |
[in] | cameraPos | Camera position. |
[in] | cameraDir | Camera forward direction (unit vector). |
[in] | cameraUp | Camera up direction (unit vector). |
[in] | perspectiveFieldOfView | The field of view for perspective projections. |
[in] | perspectiveAspectRatio | Aspect ratio for perspective projections. |
[in] | orthoWidth | Width of orthographic projection. |
[in] | orthoHeight | Height of orthographic projection. |
[in] | nearPlane | Frustum near plane. |
[in] | farPlane | Frustum far plane. |
[in] | convergencePlaneDistance | Convergence plane distance. |
[in] | convergencePlaneHeight | Convergence plane height. |
[out] | viewPos | Position of camera for specified view. |
[out] | viewProjectionMatrix | Projection matrix for specified view. |
[out] | viewFieldOfView | Field-of-view for specified view. |
[out] | viewShearX | X shear factor. |
[out] | viewShearY | X shear factor. |