![]() |
![]() |
![]() |
Schroedinger Reference Manual | ![]() |
---|---|---|---|---|
SchroFrame; SchroFrameData; void (*SchroFrameFreeFunc) (SchroFrame *frame, void *priv); enum SchroFrameFormat; SchroUpsampledFrame; #define SCHRO_FRAME_FORMAT_DEPTH (format) #define SCHRO_FRAME_FORMAT_DEPTH_S16 #define SCHRO_FRAME_FORMAT_DEPTH_S32 #define SCHRO_FRAME_FORMAT_DEPTH_U8 #define SCHRO_FRAME_FORMAT_H_SHIFT (format) #define SCHRO_FRAME_FORMAT_V_SHIFT (format) #define SCHRO_FRAME_IS_PACKED (format) #define SCHRO_FRAME_DATA_GET_LINE (fd,i) #define SCHRO_FRAME_DATA_GET_PIXEL_S16 (fd,i,j) #define SCHRO_FRAME_DATA_GET_PIXEL_U8 (fd,i,j) SchroFrame* schro_frame_new (void); SchroFrame* schro_frame_new_and_alloc (SchroMemoryDomain *domain, SchroFrameFormat format, int width, int height); SchroFrame* schro_frame_new_from_data_AYUV (void *data, int width, int height); SchroFrame* schro_frame_new_from_data_I420 (void *data, int width, int height); SchroFrame* schro_frame_new_from_data_YUY2 (void *data, int width, int height); SchroFrame* schro_frame_dup (SchroFrame *frame); SchroFrame* schro_frame_ref (SchroFrame *frame); void schro_frame_unref (SchroFrame *frame); void schro_frame_set_free_callback (SchroFrame *frame, SchroFrameFreeFunc free_func, void *priv); SchroFrame* schro_frame_clone (SchroMemoryDomain *domain, SchroFrame *frame); void schro_frame_data_get_codeblock (SchroFrameData *dest, SchroFrameData *src, int x, int y, int horiz_codeblocks, int vert_codeblocks); int schro_frame_get_metric (SchroFrame *frame1, int x1, int y1, SchroFrame *frame2, int x2, int y2); void schro_frame_get_subdata (SchroFrame *frame, SchroFrameData *fd, int comp, int x, int y); void schro_frame_inverse_iwt_transform_cuda (SchroFrame *frame, SchroFrame *transform_frame, SchroParams *params); SchroFrame* schro_frame_new_from_data_UYVY (void *data, int width, int height); SchroFrame* schro_frame_new_from_data_YV12 (void *data, int width, int height); void schro_frame_convert (SchroFrame *dest, SchroFrame *src); SchroFrame* schro_frame_convert_to_444 (SchroFrame *frame); void schro_frame_add (SchroFrame *dest, SchroFrame *src); void schro_frame_subtract (SchroFrame *dest, SchroFrame *src); void schro_frame_shift_left (SchroFrame *frame, int shift); void schro_frame_shift_right (SchroFrame *frame, int shift); void schro_frame_edge_extend (SchroFrame *frame, int width, int height); void schro_frame_zero_extend (SchroFrame *frame, int width, int height); void schro_frame_iwt_transform (SchroFrame *frame, SchroParams *params, int16_t *tmp); void schro_frame_inverse_iwt_transform (SchroFrame *frame, SchroParams *params, int16_t *tmp); void schro_frame_downsample (SchroFrame *dest, SchroFrame *src); void schro_frame_mark (SchroFrame *frame, int value); void schro_frame_upsample_horiz (SchroFrame *dest, SchroFrame *src); void schro_frame_upsample_vert (SchroFrame *dest, SchroFrame *src); double schro_frame_ssim (SchroFrame *a, SchroFrame *b); void schro_frame_mean_squared_error (SchroFrame *a, SchroFrame *b, double *mse); void schro_frame_md5 (SchroFrame *frame, uint32_t *state); double schro_frame_calculate_average_luma (SchroFrame *frame); void schro_upsampled_frame_free (SchroUpsampledFrame *df); SchroUpsampledFrame* schro_upsampled_frame_new (SchroFrame *frame); void schro_upsampled_frame_upsample (SchroUpsampledFrame *df); void schro_upsampled_frame_get_block_fast_precN (SchroUpsampledFrame *upframe, int k, int x, int y, int prec, SchroFrameData *fd); void schro_upsampled_frame_get_block_precN (SchroUpsampledFrame *upframe, int k, int x, int y, int prec, SchroFrameData *fd); int schro_upsampled_frame_get_pixel_prec0 (SchroUpsampledFrame *upframe, int k, int x, int y); int schro_upsampled_frame_get_pixel_prec1 (SchroUpsampledFrame *upframe, int k, int x, int y); int schro_upsampled_frame_get_pixel_prec3 (SchroUpsampledFrame *upframe, int k, int x, int y); int schro_upsampled_frame_get_pixel_precN (SchroUpsampledFrame *upframe, int k, int x, int y, int mv_precision);
typedef struct { int refcount; SchroFrameFreeFunc free; SchroMemoryDomain *domain; void *regions[3]; void *priv; SchroFrameFormat format; int width; int height; SchroFrameData components[3]; } SchroFrame;
typedef struct { SchroFrameFormat format; void *data; int stride; int width; int height; int length; int h_shift; int v_shift; } SchroFrameData;
typedef enum _SchroFrameFormat { SCHRO_FRAME_FORMAT_U8_444 = 0x00, SCHRO_FRAME_FORMAT_U8_422 = 0x01, SCHRO_FRAME_FORMAT_U8_420 = 0x03, SCHRO_FRAME_FORMAT_S16_444 = 0x04, SCHRO_FRAME_FORMAT_S16_422 = 0x05, SCHRO_FRAME_FORMAT_S16_420 = 0x07, SCHRO_FRAME_FORMAT_S32_444 = 0x08, SCHRO_FRAME_FORMAT_S32_422 = 0x09, SCHRO_FRAME_FORMAT_S32_420 = 0x0b, /* indirectly supported */ SCHRO_FRAME_FORMAT_YUYV = 0x100, /* YUYV order */ SCHRO_FRAME_FORMAT_UYVY = 0x101, /* UYVY order */ SCHRO_FRAME_FORMAT_AYUV = 0x102, SCHRO_FRAME_FORMAT_ARGB = 0x103 } SchroFrameFormat;
typedef struct { SchroFrame *frames[4]; void *components[3]; } SchroUpsampledFrame;
#define SCHRO_FRAME_FORMAT_V_SHIFT(format) (((format)>>1) & 0x1)
format : |
#define SCHRO_FRAME_DATA_GET_LINE(fd,i) (OFFSET((fd)->data,(fd)->stride*(i)))
fd : |
|
i : |
#define SCHRO_FRAME_DATA_GET_PIXEL_S16(fd,i,j) ((int16_t *)OFFSET((fd)->data,(fd)->stride*(j)+(i)*sizeof(int16_t)))
fd : |
|
i : |
|
j : |
#define SCHRO_FRAME_DATA_GET_PIXEL_U8(fd,i,j) ((uint8_t *)OFFSET((fd)->data,(fd)->stride*(j)+(i)))
fd : |
|
i : |
|
j : |
SchroFrame* schro_frame_new_and_alloc (SchroMemoryDomain *domain, SchroFrameFormat format, int width, int height);
domain : |
|
format : |
|
width : |
|
height : |
|
Returns : |
SchroFrame* schro_frame_new_from_data_AYUV (void *data, int width, int height);
data : |
|
width : |
|
height : |
|
Returns : |
SchroFrame* schro_frame_new_from_data_I420 (void *data, int width, int height);
data : |
|
width : |
|
height : |
|
Returns : |
SchroFrame* schro_frame_new_from_data_YUY2 (void *data, int width, int height);
data : |
|
width : |
|
height : |
|
Returns : |
void schro_frame_set_free_callback (SchroFrame *frame, SchroFrameFreeFunc free_func, void *priv);
frame : |
|
free_func : |
|
priv : |
SchroFrame* schro_frame_clone (SchroMemoryDomain *domain, SchroFrame *frame);
domain : |
|
frame : |
|
Returns : |
void schro_frame_data_get_codeblock (SchroFrameData *dest, SchroFrameData *src, int x, int y, int horiz_codeblocks, int vert_codeblocks);
dest : |
|
src : |
|
x : |
|
y : |
|
horiz_codeblocks : |
|
vert_codeblocks : |
int schro_frame_get_metric (SchroFrame *frame1, int x1, int y1, SchroFrame *frame2, int x2, int y2);
frame1 : |
|
x1 : |
|
y1 : |
|
frame2 : |
|
x2 : |
|
y2 : |
|
Returns : |
void schro_frame_get_subdata (SchroFrame *frame, SchroFrameData *fd, int comp, int x, int y);
frame : |
|
fd : |
|
comp : |
|
x : |
|
y : |
void schro_frame_inverse_iwt_transform_cuda (SchroFrame *frame, SchroFrame *transform_frame, SchroParams *params);
frame : |
|
transform_frame : |
|
params : |
SchroFrame* schro_frame_new_from_data_UYVY (void *data, int width, int height);
data : |
|
width : |
|
height : |
|
Returns : |
SchroFrame* schro_frame_new_from_data_YV12 (void *data, int width, int height);
data : |
|
width : |
|
height : |
|
Returns : |
SchroFrame* schro_frame_convert_to_444 (SchroFrame *frame);
frame : |
|
Returns : |
void schro_frame_shift_left (SchroFrame *frame, int shift);
frame : |
|
shift : |
void schro_frame_shift_right (SchroFrame *frame, int shift);
frame : |
|
shift : |
void schro_frame_edge_extend (SchroFrame *frame, int width, int height);
frame : |
|
width : |
|
height : |
void schro_frame_zero_extend (SchroFrame *frame, int width, int height);
frame : |
|
width : |
|
height : |
void schro_frame_iwt_transform (SchroFrame *frame, SchroParams *params, int16_t *tmp);
frame : |
|
params : |
|
tmp : |
void schro_frame_inverse_iwt_transform (SchroFrame *frame, SchroParams *params, int16_t *tmp);
frame : |
|
params : |
|
tmp : |
void schro_frame_downsample (SchroFrame *dest, SchroFrame *src);
dest : |
|
src : |
void schro_frame_upsample_horiz (SchroFrame *dest, SchroFrame *src);
dest : |
|
src : |
void schro_frame_upsample_vert (SchroFrame *dest, SchroFrame *src);
dest : |
|
src : |
void schro_frame_mean_squared_error (SchroFrame *a, SchroFrame *b, double *mse);
a : |
|
b : |
|
mse : |
double schro_frame_calculate_average_luma (SchroFrame *frame);
frame : |
|
Returns : |
SchroUpsampledFrame* schro_upsampled_frame_new (SchroFrame *frame);
frame : |
|
Returns : |
void schro_upsampled_frame_upsample (SchroUpsampledFrame *df);
df : |
void schro_upsampled_frame_get_block_fast_precN (SchroUpsampledFrame *upframe, int k, int x, int y, int prec, SchroFrameData *fd);
upframe : |
|
k : |
|
x : |
|
y : |
|
prec : |
|
fd : |
void schro_upsampled_frame_get_block_precN (SchroUpsampledFrame *upframe, int k, int x, int y, int prec, SchroFrameData *fd);
upframe : |
|
k : |
|
x : |
|
y : |
|
prec : |
|
fd : |
int schro_upsampled_frame_get_pixel_prec0 (SchroUpsampledFrame *upframe, int k, int x, int y);
upframe : |
|
k : |
|
x : |
|
y : |
|
Returns : |
int schro_upsampled_frame_get_pixel_prec1 (SchroUpsampledFrame *upframe, int k, int x, int y);
upframe : |
|
k : |
|
x : |
|
y : |
|
Returns : |
int schro_upsampled_frame_get_pixel_prec3 (SchroUpsampledFrame *upframe, int k, int x, int y);
upframe : |
|
k : |
|
x : |
|
y : |
|
Returns : |
int schro_upsampled_frame_get_pixel_precN (SchroUpsampledFrame *upframe, int k, int x, int y, int mv_precision);
upframe : |
|
k : |
|
x : |
|
y : |
|
mv_precision : |
|
Returns : |