/* this function is used to set the resizing parameters  */
int32_t ipu_ic_config_resize_rate(int32_t ipu_index, char *task_type, uint32_t res_vert, uint32_t down_vert, uint32_t res_horiz, uint32_t down_horiz)
/* this function is used to set the resizing parameters  */
int32_t ipu_ic_config_resize_rate(int32_t ipu_index, char *task_type, uint32_t res_vert, uint32_t down_vert, uint32_t res_horiz, uint32_t down_horiz)
{
    uint32_t val;
    uint32_t ipu_base_addr = REGS_IPU_BASE(ipu_index);
    val = (down_vert << 30) | (res_vert << 16) | (down_horiz << 14) | (res_horiz);
    if (!strcmp(task_type, "PPTASK")) {
        writel(val, ipu_base_addr + IPU_IC_PP_RSC__ADDR);
    } else if (!strcmp(task_type, "VFTASK")) {
        writel(val, ipu_base_addr + IPU_IC_PRP_VF_RSC__ADDR);
    } else if (!strcmp(task_type, "PrPTASK")) {
        writel(val, ipu_base_addr + IPU_IC_PRP_ENC_RSC__ADDR);
    } else {
        printf("Task type is not defined!\n");
        return -1;
    }
    return 0;
}