Ejemplo n.º 1
0
static PRESULT win_zoom_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT proc_result = PROC_PASS;
	VACTION unact;
    struct Rect tv_src_rect,tv_dest_rect;
	struct OSDRect osd_src_rect;     


	get_tv_osd_src(&tv_src_rect,&osd_src_rect);

	switch(event)
 	{
 	case EVN_PRE_OPEN:
        api_inc_wnd_count();
	    zoom_times = 0;
	    osd_center_pos.uX = TV_R_W/2;
	    osd_center_pos.uY = TV_R_H/2;		
		break;
	case EVN_POST_OPEN:
		break;
	case EVN_PRE_CLOSE:
		break;
	case EVN_POST_CLOSE:
        tv_src_rect.uStartX = TV_FULL_SRC_L;
        tv_src_rect.uStartY = TV_FULL_SRC_T;
        tv_src_rect.uWidth  = TV_FULL_SRC_W;
        tv_src_rect.uHeight = TV_FULL_SRC_H;

        tv_dest_rect.uStartX    = TV_FULL_DEST_L;//TV_DEST_L;
        tv_dest_rect.uStartY    = TV_FULL_DEST_T;//TV_DEST_T;
        tv_dest_rect.uWidth     = TV_FULL_DEST_W;//TV_DEST_W;
        tv_dest_rect.uHeight    = TV_FULL_DEST_H;//TV_DEST_H;
        vpo_zoom(g_vpo_dev,&tv_src_rect,&tv_dest_rect);
#ifdef DUAL_VIDEO_OUTPUT
		vpo_zoom(g_sd_vpo_dev,&tv_src_rect,&tv_dest_rect);
#endif		
        api_dec_wnd_count();		
		break;
	case EVN_PRE_DRAW:
		//win_zoom_draw_tv_zoom_rect();
		//proc_result = PROC_LOOP;
		break;
	case EVN_POST_DRAW:
		win_zoom_draw_tv_zoom_rect();
		break;
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);		
		proc_result = win_zoom_proc(unact);
		break;
		
 	}

	return proc_result;		
}
Ejemplo n.º 2
0
int ipanel_porting_video_location(int x, int y, int w, int h)
{
    int ret = -1;
    struct Rect SrcRect;
    struct Rect DstRect;
    ipanel_porting_dprintf("[ipanel_porting_video_location],rect (x=%d,y=%d,w=%d,h=%d).\n",x,y,w,h);
    if ( (x>=0 && x<=IPANEL_SCREENW) && (y>=0 && y<=IPANEL_SCREENH)
            && (w>=0 && w<=IPANEL_SCREENW) && (h>=0 && h<=IPANEL_SCREENH) ) {
        if (x==0 && y==0 && w==0 && h==0) {
            w = PICTURE_WIDTH;
            h = PICTURE_HEIGHT;
        }
        else {
            x+=DISPLAY_POS_X;
            y= (y+DISPLAY_POS_Y)*5;
            h *= 5;
        }
        /*Set physical TV screen area here*/
        SrcRect.uStartX = 0;
        SrcRect.uWidth = PICTURE_WIDTH;
        SrcRect.uStartY = 0;
        SrcRect.uHeight = PICTURE_HEIGHT;
        DstRect.uStartX = x;
        DstRect.uStartY = y;
        DstRect.uWidth = w;
        DstRect.uHeight = h;
//		vpo_win_onoff(g_vpo_dev,FALSE);
        if(RET_SUCCESS == vpo_zoom(g_vpo_dev ,&SrcRect , &DstRect))
            ret = 0;
        else
            ipanel_porting_dprintf("[ipanel_porting_video_location] failed.\n");
//		vpo_win_onoff(g_vpo_dev,TRUE);
    }
    return ret;
}
Ejemplo n.º 3
0
void exit_zoom_win(void)
{
	 struct Rect tv_src_rect,tv_dest_rect;
	 struct OSDRect osd_src_rect;     

	 get_tv_osd_src(&tv_src_rect,&osd_src_rect);
        tv_src_rect.uStartX = TV_FULL_SRC_L;
        tv_src_rect.uStartY = TV_FULL_SRC_T;
        tv_src_rect.uWidth  = TV_FULL_SRC_W;
        tv_src_rect.uHeight = TV_FULL_SRC_H;

        tv_dest_rect.uStartX    = TV_FULL_DEST_L;//TV_DEST_L;
        tv_dest_rect.uStartY    = TV_FULL_DEST_T;//TV_DEST_T;
        tv_dest_rect.uWidth     = TV_FULL_DEST_W;//TV_DEST_W;
        tv_dest_rect.uHeight    = TV_FULL_DEST_H;//TV_DEST_H;
        vpo_zoom(g_vpo_dev,&tv_src_rect,&tv_dest_rect);
#ifdef DUAL_VIDEO_OUTPUT
		vpo_zoom(g_sd_vpo_dev,&tv_src_rect,&tv_dest_rect);
#endif	
        api_dec_wnd_count();
}
Ejemplo n.º 4
0
/* Set the View Mode of VPO Window */
void hde_set_mode(UINT32 mode)
{
    struct MPSource_CallBack MPCallBack;
    struct PIPSource_CallBack PIPCallBack;
    struct VDec_StatusInfo vdec_info;
    struct VDecPIPInfo tInitInfo;
    UINT32 waittime=0, wait_total_time = 0;
    struct vdec_device *pDecvDevice = (struct vdec_device *)get_selected_decoder();
    BOOL need_to_wait = FALSE;
    BOOL need_to_set_output = FALSE;
    UINT8 ulock = 0;
    struct nim_device *nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, 0);
    struct vpo_device *pDisDevice = (struct vpo_device *)dev_get_by_type(NULL, HLD_DEV_TYPE_DIS);
#ifdef DUAL_VIDEO_OUTPUT
    struct vpo_device *pDisDevice_O = (struct vpo_device *)dev_get_by_id(HLD_DEV_TYPE_DIS, 1);
#endif
    struct vpo_io_get_info dis_info;

    switch(mode)
    {
    case VIEW_MODE_PREVIEW:
        if ((l_hde_mode != mode) || (l_hde_uIsPreviewResize == 1))
        {
            ENTER_CCHDE_API();
#if(	VDEC27_PREVIEW_SOLUTION == VDEC27_PREVIEW_VE_SCALE)

#ifdef HDTV_SUPPORT
            /* Check Frame Size, If Input Frame is HD, Set VE to Dview Mode */
            vpo_ioctl(pDisDevice, VPO_IO_GET_INFO, (UINT32) &dis_info);
#ifdef DUAL_VIDEO_OUTPUT
            vpo_ioctl(pDisDevice_O, VPO_IO_GET_INFO, (UINT32) &dis_info);
#endif
            if(is_cur_decoder_avc())
            {
                vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                if(vdec_info.pic_width > 720 || vdec_info.pic_height > 576)
                {
                    need_to_wait = TRUE;
                }
                else
                    need_to_wait = FALSE;
            }
            else
            {
                need_to_wait = TRUE;
                vdec_stop(pDecvDevice,TRUE,TRUE);
            }
            if(need_to_wait)
            {
                tInitInfo.adv_setting.init_mode = 1;
                tInitInfo.adv_setting.out_sys = dis_info.tvsys;
                tInitInfo.adv_setting.bprogressive = dis_info.bprogressive;
#ifdef DUAL_VIDEO_OUTPUT
                if(is_cur_decoder_avc())
#else
                if(0)
#endif
                {
                    vdec_set_output(pDecvDevice,DUAL_PREVIEW_MODE, &tInitInfo, &MPCallBack, &PIPCallBack);
                }
                else
                {
                    vdec_set_output(pDecvDevice,	DUAL_PREVIEW_MODE, &tInitInfo, &MPCallBack, &PIPCallBack);
                }
            }
            if(!is_cur_decoder_avc())
            {
                vdec_start(pDecvDevice);
            }
            if(is_cur_decoder_avc() && need_to_wait)
            {
                struct dmx_device *dmx = (struct dmx_device *)dev_get_by_id(HLD_DEV_TYPE_DMX, 0);

                //For H264, we have to wait for 1st picture decoded, then call vpo_zoom, otherwise, it could cause below issue:
                //1. DE under run, because DE can scale down HD full size picture to preview size
                //2. In full screen mode, VE mapping is H264 mapping mode, in preview mode, VE mapping is MPEG2 mapping mode
                //--Michael Xie 2007/8/29
                wait_total_time = VE_MODE_SWITCH_TIME;
                while(waittime<wait_total_time)
                {
                    nim_get_lock(nim, &ulock);
                    if(!ulock)
                        break;
                    if(RET_SUCCESS == dmx_io_control(dmx, IS_AV_SCRAMBLED, 0))
                        break;
                    vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                    if(vdec_info.uFirstPicShowed)
                    {
                        wait_total_time = H264_VE_MODE_SWITCH_TIME;
                    }

                    if(vdec_info.output_mode == PREVIEW_MODE)
                    {
                        osal_task_sleep(100);
                        break;
                    }
                    osal_task_sleep(1);
                    waittime++;
                }
            }

            vpo_zoom(pDisDevice, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
#ifdef DUAL_VIDEO_OUTPUT
            vpo_zoom(pDisDevice_O, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
#endif

#else
            //Set Video Decoder Output Mode (PREVIEW_MODE)
            tInitInfo.src_rect.uStartX = l_hde_rectSrcFull_adjusted.uStartX>>1;
            tInitInfo.src_rect.uStartY= l_hde_rectSrcFull_adjusted.uStartY>>1;
            tInitInfo.src_rect.uWidth = PICTURE_WIDTH - 2*tInitInfo.src_rect.uStartX;
            tInitInfo.src_rect.uHeight = PICTURE_HEIGHT - 2*tInitInfo.src_rect.uStartY;
            tInitInfo.dst_rect.uStartX = l_hde_rectScrnPreview.uStartX;
            tInitInfo.dst_rect.uStartY= l_hde_rectScrnPreview.uStartY;
            tInitInfo.dst_rect.uWidth = l_hde_rectScrnPreview.uWidth;
            tInitInfo.dst_rect.uHeight = l_hde_rectScrnPreview.uHeight;
            vdec_set_output(pDecvDevice,PREVIEW_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);

            //Wait Video Decoder Output Mode Switch to PREVIEW_MODE
            vdec_info.output_mode = VIEW_MODE_FULL;
            while((vdec_info.output_mode != PREVIEW_MODE)&&(waittime<VE_MODE_SWITCH_TIME))
            {
                nim_get_lock(nim, &ulock);
                if(!ulock)
                    break;
                osal_task_sleep(1);
                waittime++;
                vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
            }

            //Switch Video Decoder Output Mode to PREVIEW_MODE Forcely
            if(vdec_info.output_mode != PREVIEW_MODE)
            {
                PRINTF("switch to preview forcely\n");

                vdec_stop(pDecvDevice,sys_data_get_cur_chan_mode() == PROG_TV_MODE,FALSE);
                vdec_set_output(pDecvDevice,PREVIEW_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);
                vdec_start(pDecvDevice);
            }
#endif
#elif(VDEC27_PREVIEW_SOLUTION == VDEC27_PREVIEW_DE_SCALE)
            //If is DE Scale Operation, then adjust VPO Full Srceen to Preview Screen directly
            if(0 == l_hde_preview_method)
                vpo_zoom(pDisDevice, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
            //If is VE Scale Operation, first set Video Decoder Output Mode(PIP_MODE),
            //then adjust VPO Full Srceen to Preview Screen
            else if(1 == l_hde_preview_method)
            {
                if(l_hde_mode == VIEW_MODE_PREVIEW)
                {
                    vpo_zoom(pDisDevice, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
                }
                else
                {
                    //Set Video Decoder Output Mode (IND_PIP_MODE)
                    tInitInfo.src_rect.uStartX = l_hde_rectSrcFull_adjusted.uStartX>>1;
                    tInitInfo.src_rect.uStartY= l_hde_rectSrcFull_adjusted.uStartY>>1;
                    tInitInfo.src_rect.uWidth = PICTURE_WIDTH - 2*tInitInfo.src_rect.uStartX;
                    tInitInfo.src_rect.uHeight = PICTURE_HEIGHT - 2*tInitInfo.src_rect.uStartY;
                    tInitInfo.dst_rect.uStartX = l_hde_rectScrnPreview.uStartX;
                    tInitInfo.dst_rect.uStartY= l_hde_rectScrnPreview.uStartY;
                    tInitInfo.dst_rect.uWidth = l_hde_rectScrnPreview.uWidth;
                    tInitInfo.dst_rect.uHeight = l_hde_rectScrnPreview.uHeight;
                    tInitInfo.pipSize.uWidth=l_hde_rectScrnPreview.uWidth;
                    tInitInfo.pipSize.uHeight=l_hde_rectScrnPreview.uHeight/5;
                    vdec_set_output(pDecvDevice,IND_PIP_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);

                    //After Video Decoder Output Mode switch to PIP_MODE, then adjust VPO
                    vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                    if(VDEC27_STOPPED == vdec_info.uCurStatus)
                    {
                        vpo_zoom(pDisDevice, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
                    }
                    else
                    {
                        waittime = 0;
                        while((vdec_info.output_mode != PIP_MODE)&&(waittime<VE_MODE_SWITCH_TIME_29E))
                        {
                            nim_get_lock(nim, &ulock);
                            if(!ulock)
                                break;
                            osal_task_sleep(20);
                            waittime += 20;
                            vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                        }
                        if(vdec_info.output_mode != PIP_MODE)
                        {
                            vdec_stop(pDecvDevice,TRUE,FALSE);
                            vdec_set_output(pDecvDevice,IND_PIP_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);
                            vdec_start(pDecvDevice);
                            vpo_zoom(pDisDevice, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
                        }
                        else
                        {
                            vpo_zoom(pDisDevice, &l_hde_rectSrcFull_adjusted, &l_hde_rectScrnPreview);
                        }
                    }
                    vpo_ioctl(pDisDevice, VPO_IO_ADJUST_LM_IN_PREVIEW, 1);

                }
            }
#endif
        }
        l_hde_uIsPreviewResize = 0;
        LEAVE_CCHDE_API();
        break;
    case VIEW_MODE_MULTI:
        break;
    case VIEW_MODE_FULL:
    default:
        if (l_hde_mode != mode)
        {
            ENTER_CCHDE_API();
#if(	VDEC27_PREVIEW_SOLUTION == VDEC27_PREVIEW_VE_SCALE)
#ifdef HDTV_SUPPORT
            // convert VE to MP mode
            vpo_ioctl(pDisDevice, VPO_IO_GET_INFO, (UINT32) &dis_info);
#ifdef DUAL_VIDEO_OUTPUT
            vpo_ioctl(pDisDevice_O, VPO_IO_GET_INFO, (UINT32) &dis_info);
#endif
            need_to_set_output = FALSE;
            if(is_cur_decoder_avc())
            {
                vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                if(vdec_info.pic_width > 720 || vdec_info.pic_height > 576)
                {
                    need_to_wait = TRUE;
                }
                else if(vdec_info.pic_width == 0 || vdec_info.pic_height == 0)
                {
                    need_to_set_output = TRUE;
                }
                else
                    need_to_wait = FALSE;
            }
            else
            {
                need_to_wait = TRUE;
                vdec_stop(pDecvDevice,TRUE,TRUE);
            }

            if(need_to_wait || need_to_set_output)
            {
                tInitInfo.adv_setting.init_mode = 0;
                tInitInfo.adv_setting.out_sys = dis_info.tvsys;
                tInitInfo.adv_setting.bprogressive = dis_info.bprogressive;
#ifdef DUAL_VIDEO_OUTPUT
                if(is_cur_decoder_avc())
#else
                if(0)
#endif
                {
                    vdec_set_output(pDecvDevice,DUAL_MODE, &tInitInfo, &MPCallBack, &PIPCallBack);
                }
                else
                {
                    vdec_set_output(pDecvDevice,DUAL_MODE, &tInitInfo, &MPCallBack, &PIPCallBack);
                }
            }
            if(!is_cur_decoder_avc())
            {
                vdec_start(pDecvDevice);
            }

            vpo_zoom(pDisDevice, &l_hde_rectSrcFull, &l_hde_rectScrnFull);
#ifdef DUAL_VIDEO_OUTPUT
            vpo_zoom(pDisDevice_O, &l_hde_rectSrcFull, &l_hde_rectScrnFull);
#endif
            osal_task_sleep(50);
            if(is_cur_decoder_avc() && need_to_wait)
            {
                struct dmx_device *dmx = (struct dmx_device *)dev_get_by_id(HLD_DEV_TYPE_DMX, 0);

                wait_total_time = VE_MODE_SWITCH_TIME;
                while(waittime<wait_total_time)
                {
                    nim_get_lock(nim, &ulock);
                    if(!ulock)
                        break;
                    if(RET_SUCCESS == dmx_io_control(dmx, IS_AV_SCRAMBLED, 0))
                        break;
                    vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                    if(vdec_info.uFirstPicShowed)
                    {
                        wait_total_time = H264_VE_MODE_SWITCH_TIME;
                    }

                    if(vdec_info.output_mode == MP_MODE)
                    {
                        break;
                    }
                    osal_task_sleep(1);
                    waittime++;
                }
            }

#else
            //Set Video Decoder Output Mode (MP_MODE)
            tInitInfo.buse_sml_buf = FALSE;
            tInitInfo.src_rect.uStartX = l_hde_rectSrcFull.uStartX;
            tInitInfo.src_rect.uStartY= l_hde_rectSrcFull.uStartY;
            tInitInfo.src_rect.uWidth = l_hde_rectSrcFull.uWidth;
            tInitInfo.src_rect.uHeight = l_hde_rectSrcFull.uHeight;
            tInitInfo.dst_rect.uStartX = l_hde_rectScrnFull.uStartX;
            tInitInfo.dst_rect.uStartY= l_hde_rectScrnFull.uStartY;
            tInitInfo.dst_rect.uWidth = l_hde_rectScrnFull.uWidth;
            tInitInfo.dst_rect.uHeight = l_hde_rectScrnFull.uHeight;
            vdec_set_output(pDecvDevice,MP_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);

            //Wait Video Decoder Output Mode Switch to MP_MODE
            vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
            while(((vdec_info.output_mode != MP_MODE)||(vdec_info.use_sml_buf))&&(waittime<VE_MODE_SWITCH_TIME))
            {
                nim_get_lock(nim, &ulock);
                if(!ulock)
                    break;
                osal_task_sleep(1);
                waittime++;
                vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
            }
            //Switch Video Decoder Output Mode to MP_MODE Forcely
            if((vdec_info.output_mode != MP_MODE)||(vdec_info.use_sml_buf))
            {
                PRINTF("switch to mp forcely\n");

                vdec_stop(pDecvDevice,TRUE,FALSE);
                vdec_set_output(pDecvDevice,MP_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);
                vdec_start(pDecvDevice);
            }
#endif
#elif(VDEC27_PREVIEW_SOLUTION == VDEC27_PREVIEW_DE_SCALE)
            //If is DE Scale Operation, then adjust VPO to Full Srceen directly
            if(0 == l_hde_preview_method)
                vpo_zoom(pDisDevice, &l_hde_rectSrcFull, &l_hde_rectScrnFull);
            //If is VE Scale Operation, first set Video Decoder Output Mode(MP_MODE),
            //then adjust VPO to Full Srceen
            else if(1 == l_hde_preview_method)
            {
                //Set Video Decoder Output Mode (MP_MODE)
                tInitInfo.src_rect.uStartX = l_hde_rectSrcFull.uStartX;
                tInitInfo.src_rect.uStartY= l_hde_rectSrcFull.uStartY;
                tInitInfo.src_rect.uWidth = l_hde_rectSrcFull.uWidth;
                tInitInfo.src_rect.uHeight = l_hde_rectSrcFull.uHeight;
                tInitInfo.dst_rect.uStartX = l_hde_rectScrnFull.uStartX;
                tInitInfo.dst_rect.uStartY= l_hde_rectScrnFull.uStartY;
                tInitInfo.dst_rect.uWidth = l_hde_rectScrnFull.uWidth;
                tInitInfo.dst_rect.uHeight = l_hde_rectScrnFull.uHeight;
                vdec_set_output(pDecvDevice,MP_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);

                //After Video Decoder Output Mode switch to MP_MODE, then adjust VPO
                vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                if(VDEC27_STOPPED == vdec_info.uCurStatus)
                {
                    vpo_zoom(pDisDevice, &l_hde_rectSrcFull, &l_hde_rectScrnFull);
                }
                else
                {
                    waittime = 0;
                    while((vdec_info.output_mode != MP_MODE)&&(waittime<VE_MODE_SWITCH_TIME_29E))
                    {
                        nim_get_lock(nim, &ulock);
                        if(!ulock)
                            break;
                        osal_task_sleep(20);
                        waittime += 20;
                        vdec_io_control(pDecvDevice, VDEC_IO_GET_STATUS, (UINT32)&vdec_info);
                    }
                    if(vdec_info.output_mode != MP_MODE)
                    {
                        vdec_stop(pDecvDevice,TRUE,FALSE);
                        vdec_set_output(pDecvDevice,MP_MODE, &tInitInfo, &MPCallBack,&PIPCallBack);
                        vdec_start(pDecvDevice);
                        vpo_zoom(pDisDevice, &l_hde_rectSrcFull, &l_hde_rectScrnFull);
                    }
                    else
                    {
                        vpo_zoom(pDisDevice, &l_hde_rectSrcFull, &l_hde_rectScrnFull);
                    }
                }

                vpo_ioctl(pDisDevice, VPO_IO_ADJUST_LM_IN_PREVIEW, 0);
            }
#endif
            LEAVE_CCHDE_API();
        }
    }
Ejemplo n.º 5
0
static void win_zoom_draw_tv_zoom_rect(void)
{
    struct Rect tv_src_rect,tv_dest_rect;
    char str[30];
    int n;
    POBJECT_HEAD obj;
    
    struct OSDRect osd_dest_rect,osd_src_rect;    
    VSCR vscr;
    CONTAINER* win;

    win = &g_win_zoom;

	obj = (POBJECT_HEAD)(&g_win_zoom);	
    //OSD_DrawObjectFrame(&obj->frame,ZOOM_WIN_SH_IDX);
    //OSD_DrawObject(obj, C_UPDATE_ALL);


    get_tv_osd_src(&tv_src_rect,&osd_src_rect);   


	sprintf(str,"ZOOM   X%02d",zoom_int_scales[zoom_times]);
    OSD_SetTextFieldContent(&win_zoom_title,STRING_ANSI,(UINT32)str);
    OSD_DrawObject( (POBJECT_HEAD)&win_zoom_title, C_UPDATE_ALL);

#if 1

    OSD_SetRect(&osd_dest_rect, TV_R_L, TV_R_T, TV_R_W, TV_R_H);
	OSD_DrawObjectFrame(&osd_dest_rect,ZOOM_BIGRECT_SH_IDX);
	 

    if(osd_src_rect.uLeft>TV_R_L)
        OSD_DrawObject((POBJECT_HEAD)&win_zoom_larrow, C_UPDATE_ALL);
	
    if(osd_src_rect.uTop>TV_R_T)
        OSD_DrawObject((POBJECT_HEAD)&win_zoom_tarrow, C_UPDATE_ALL);
	
    if( (osd_src_rect.uLeft + osd_src_rect.uWidth)< (TV_R_L + TV_R_W) )
        OSD_DrawObject((POBJECT_HEAD)&win_zoom_rarrow, C_UPDATE_ALL);
	
    if( (osd_src_rect.uTop + osd_src_rect.uHeight) < (TV_R_T + TV_R_H) )
        OSD_DrawObject((POBJECT_HEAD)&win_zoom_darrow, C_UPDATE_ALL);

	OSD_DrawObjectFrame(&osd_src_rect,ZOOM_SMALLRECT_SH_IDX);
	
    obj = (POBJECT_HEAD)&win_zoom_bmp;
    OSD_SetRect(&obj->frame, TV_R_L + osd_center_pos.uX - ZOOM_BMP_W/2 , TV_R_T + osd_center_pos.uY - ZOOM_BMP_H/2, ZOOM_BMP_W, ZOOM_BMP_H);
    OSD_DrawObject(obj, C_UPDATE_ALL);

    
    tv_dest_rect.uStartX    = TV_DEST_L;
    tv_dest_rect.uStartY    = TV_DEST_T;
    tv_dest_rect.uWidth     = TV_DEST_W;
    tv_dest_rect.uHeight    = TV_DEST_H;
    
#if 0
    if(zoom_times==0)
    {
        tv_dest_rect.uStartX = TV_FULL_DEST_L;
        tv_dest_rect.uStartY = TV_FULL_DEST_T;
        tv_dest_rect.uWidth  = TV_FULL_DEST_W;
        tv_dest_rect.uHeight = TV_FULL_DEST_H;
    }

    if(zoom_times==0)
        //OSD_SetRect(&tv_dest_rect, TV_FULL_DEST_L,TV_FULL_DEST_T, TV_FULL_DEST_W, TV_FULL_DEST_H);
    {
        tv_src_rect.uStartX = TV_FULL_SRC_L;
        tv_src_rect.uStartY = TV_FULL_SRC_T;
        tv_src_rect.uWidth  = TV_FULL_SRC_W;
        tv_src_rect.uHeight = TV_FULL_SRC_H;
    }
#endif

    if (tv_src_rect.uStartX % 16)
	{
		tv_src_rect.uStartX &= 0xfff0;
	}
	if (tv_src_rect.uWidth % 16)
	{
		tv_src_rect.uWidth += 15;
		tv_src_rect.uWidth &= 0xfff0;
	}
    
    vpo_zoom(g_vpo_dev,&tv_src_rect,&tv_dest_rect);
#ifdef DUAL_VIDEO_OUTPUT    
	vpo_zoom(g_sd_vpo_dev,&tv_src_rect,&tv_dest_rect);
#endif
#endif	
        
}