29 #define CONV_FP(x) ((double) (x)) / (1 << 16)
32 #define CONV_DB(x) (int32_t) ((x) * (1 << 16))
36 double rotation, scale[2];
41 if (scale[0] == 0.0 || scale[1] == 0.0)
44 rotation = atan2(
CONV_FP(matrix[1]) / scale[1],
52 double radians = angle *
M_PI / 180.0f;
53 double c = cos(radians);
54 double s = sin(radians);
56 memset(matrix, 0, 9 *
sizeof(
int32_t));
68 const int flip[] = { 1 - 2 * (!!hflip), 1 - 2 * (!!vflip), 1 };
71 for (i = 0; i < 9; i++)
72 matrix[i] *= flip[i % 3];