*/
if (param.rotation == ROTATION_ANGLE_90 || param.rotation == ROTATION_ANGLE_270) {
- x_pos = pipe_ctx->stream->dst.x + x_pos * pipe_ctx->stream->dst.width /
- pipe_ctx->stream->src.height;
- y_pos = pipe_ctx->stream->dst.y + y_pos * pipe_ctx->stream->dst.height /
- pipe_ctx->stream->src.width;
} else {
x_pos = pipe_ctx->stream->dst.x + x_pos * pipe_ctx->stream->dst.width /
pipe_ctx->stream->src.width;
}
}
} else if (param.rotation == ROTATION_ANGLE_90) {
- if (!param.mirror) {
- uint32_t temp_y = pos_cpy.y;
-
- pos_cpy.y = pipe_ctx->plane_res.scl_data.recout.height - pos_cpy.x;
- pos_cpy.x = temp_y - prev_odm_width;
- } else {
- swap(pos_cpy.x, pos_cpy.y);
- }
-
} else if (param.rotation == ROTATION_ANGLE_270) {
// Swap axis and mirror vertically
uint32_t temp_x = pos_cpy.x;
pos_cpy.y = temp_x;
}
} else {
- if (param.mirror) {
- swap(pos_cpy.x, pos_cpy.y);
-
- pos_cpy.x = pipe_ctx->plane_res.scl_data.recout.width - pos_cpy.x + 2 * pipe_ctx->plane_res.scl_data.recout.x;
- pos_cpy.y = (2 * pipe_ctx->plane_res.scl_data.recout.y) + pipe_ctx->plane_res.scl_data.recout.height - pos_cpy.y;
- } else {
- pos_cpy.x = pipe_ctx->plane_res.scl_data.recout.width - pos_cpy.y;
- pos_cpy.y = temp_x;
- }
}
} else if (param.rotation == ROTATION_ANGLE_180) {
// Mirror horizontally and vertically
}
}
} else {
- pos_cpy.x = recout_width - pos_cpy.x + 2 * recout_x;
}
}
* Simplify it as:
* pos_cpy.y = recout.y * 2 + recout.height - pos_cpy.y
*/
- pos_cpy.y = (2 * pipe_ctx->plane_res.scl_data.recout.y) +
- pipe_ctx->plane_res.scl_data.recout.height - pos_cpy.y;
}
hubp->funcs->set_cursor_position(hubp, &pos_cpy, ¶m);