00001
00002
00003
00004
00005 #if !defined (AQSENSE_SAL3D_FRAME_H)
00006 #define AQSENSE_SAL3D_FRAME_H
00007
00008 #if defined (_MSC_VER) && (_MSC_VER >= 1020)
00009 #pragma once
00010 #endif
00011
00012 #include "sal3d_def.h"
00013
00014
00015
00016
00017
00018
00020 typedef struct sal3d_frame_area
00021 {
00022 int x0;
00023 int y0;
00024
00025 int x1;
00026 int y1;
00027 } sal3d_frame_area;
00028
00029
00030 typedef struct sal3d_frame
00031 {
00032 void *p;
00033 } sal3d_frame;
00034
00036 typedef struct sal3d_frame_vpa_entry
00037 {
00038 ptrdiff_t x;
00039 ptrdiff_t y;
00040 } sal3d_frame_vpa_entry;
00041
00043 typedef sal3d_frame_vpa_entry *sal3d_frame_vpat;
00044
00045
00046
00047
00048
00049
00051 typedef void (STDCALL *SAL3DFRAMEDELETER)(void *data, void *user);
00052
00053
00054
00055
00056
00057
00058
00083 SAL3D_API(int) sal3d_frame_get_data_type (const sal3d_frame frame,
00084 int plane,
00085 sal3d_error *e DEFZERO);
00086
00094 SAL3D_API(int) sal3d_frame_get_dimension (const sal3d_frame frame,
00095 sal3d_error *e DEFZERO);
00096
00104 SAL3D_API(int) sal3d_frame_get_height (const sal3d_frame frame,
00105 sal3d_error *e DEFZERO);
00106
00120 SAL3D_API(int) sal3d_frame_get_vpa (const sal3d_frame frame, int plane,
00121 char **baseAddress,
00122 sal3d_frame_vpat *vpa,
00123 sal3d_error *e DEFZERO);
00124
00132 SAL3D_API(int) sal3d_frame_get_width (const sal3d_frame frame,
00133 sal3d_error *e DEFZERO);
00134
00143 SAL3D_API(int) sal3d_frame_check_validity (const sal3d_frame frame,
00144 sal3d_error *e DEFZERO);
00145
00162 SAL3D_API(int) sal3d_frame_new (int width, int height,
00163 int dimension, sal3d_frame *frame,
00164 sal3d_error *e DEFZERO);
00165
00183 SAL3D_API(int) sal3d_frame_new_with_datatype (int width, int height,
00184 int dimension, int datatype, sal3d_frame *frame,
00185 sal3d_error *e DEFZERO);
00186
00202 SAL3D_API(int) sal3d_frame_new_copy_from_frame (const sal3d_frame frame,
00203 sal3d_frame *newframe,
00204 sal3d_error *e DEFZERO);
00205
00214 SAL3D_API(int) sal3d_frame_new_from_file (const char *fileName,
00215 sal3d_frame *frame,
00216 sal3d_error *e DEFZERO);
00217
00237 SAL3D_API(int) sal3d_frame_new_from_frame_with_zoom (
00238 const sal3d_frame original, float ratio, sal3d_frame *frame,
00239 sal3d_error *e DEFZERO);
00240
00283 SAL3D_API(int) sal3d_frame_new_from_pointer (void *data, int width,
00284 int height, int dimension, int datatype, ptrdiff_t strideX,
00285 ptrdiff_t strideY, ptrdiff_t stridePlane, const int *planeOrder,
00286 SAL3DFRAMEDELETER deleter, void *userData, sal3d_frame *frame,
00287 sal3d_error *e DEFZERO);
00288
00305 SAL3D_API(int) sal3d_frame_new_subframe (const sal3d_frame frame,
00306 sal3d_frame_area area, sal3d_frame *subframe,
00307 sal3d_error *e DEFZERO);
00308
00309 SAL3D_API(int)
00310 sal3d_frame_new_scale_depth (const sal3d_frame frame, int datatype,
00311 double *input_min, double *input_max, double *output_min,
00312 double *output_max, sal3d_frame *new_frame,
00313 double *used_input_min, double *used_input_max,
00314 sal3d_error *e DEFZERO);
00315
00323 SAL3D_API(int) sal3d_frame_transpose (sal3d_frame frame, sal3d_error *e DEFZERO);
00324
00332 SAL3D_API(int) sal3d_frame_refcount (sal3d_frame frame, sal3d_error *e DEFZERO);
00333
00346 SAL3D_API(int) sal3d_frame_release (sal3d_frame frame, sal3d_error *e DEFZERO);
00347
00357 SAL3D_API(int) sal3d_frame_save_to_file (const sal3d_frame frame,
00358 const char *filename, sal3d_error *e DEFZERO);
00359
00367 SAL3D_API(int) sal3d_frame_share (sal3d_frame frame, sal3d_error *e DEFZERO);
00368
00369 #endif