height_leap_size = 0, width_leap_size = 0, i, max_size;
TDM_DBG("Height %u", info->src_config.pos.h);
unsigned int dst_height = (info->transform % 2 == 0) ? info->dst_config.pos.h : info->dst_config.pos.w;
+ //unsigned int dst_height = info->dst_config.pos.h;
if (_sprd_pp_get_scale_leap(info->src_config.pos.h,
dst_height,
- height_leap, &height_leap_size) != TDM_ERROR_NONE) {
+ (info->transform % 2 == 0)? height_leap : width_leap,
+ (info->transform % 2 == 0)? &height_leap_size: &width_leap_size) != TDM_ERROR_NONE) {
TDM_ERR("height %u -> %u ratio out of range", info->src_config.pos.h,
info->dst_config.pos.h);
return TDM_ERROR_OPERATION_FAILED;
}
TDM_DBG("Width %u", info->src_config.pos.w);
unsigned int dst_width = (info->transform % 2 == 0) ? info->dst_config.pos.w : info->dst_config.pos.h;
+ //unsigned int dst_width = info->dst_config.pos.w;
if (_sprd_pp_get_scale_leap(info->src_config.pos.w,
dst_width,
- width_leap, &width_leap_size) != TDM_ERROR_NONE) {
+ (info->transform % 2 == 0)? width_leap : height_leap,
+ (info->transform % 2 == 0)? &width_leap_size : &height_leap_size) != TDM_ERROR_NONE) {
TDM_ERR("width %u -> %u ratio out of range", info->src_config.pos.w,
info->dst_config.pos.w);
return TDM_ERROR_OPERATION_FAILED;
}
+
memcpy(&pp_data->roadmap.step_info[0], info, sizeof(tdm_info_pp));
pp_data->roadmap.step_info[0].dst_config.pos.h = height_leap[0];
pp_data->roadmap.step_info[0].dst_config.pos.w = width_leap[0];
}
}
pp_data->roadmap.step_info[max_size - 1].dst_config = info->dst_config;
+ pp_data->roadmap.step_info[max_size - 1].dst_config.pos.h = height_leap[height_leap_size-1];
+ pp_data->roadmap.step_info[max_size - 1].dst_config.pos.w = width_leap[width_leap_size - 1];
pp_data->roadmap.max_step = max_size;
return TDM_ERROR_NONE;
}
}
for (i = 0; i < pp_data->roadmap.max_step; i++) {
pp_data->roadmap.prop_id[i] = _tdm_sprd_pp_set(pp_data, &pp_data->roadmap.step_info[i], pp_data->roadmap.prop_id[i]);
- if (pp_data->roadmap.prop_id <= 0) {
+ if (pp_data->roadmap.prop_id[i] <= 0) {
TDM_ERR("Can't setup pp");
return TDM_ERROR_BAD_REQUEST;
}