tskvideooutput1.c

来自「ZPAV (H265) DM64XX(TI) demo ZPAV (H」· C语言 代码 · 共 52 行

C
52
字号

/*
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Copyright (C) 2006-2008  Beijing,  pengzhen  (pengzhenxp@yahoo.com.cn)  //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
*/

void tskVideoOutput()
{
	
	LCK_Handle m_hVoOutMutex = LCK_create( NULL ) ; /* Mutex */

	FVID_Frame *disFrameBuf; 
	
	FVID_alloc(m_hVo, &disFrameBuf);

    while(1)
    {
        /* acquire Semaphore */
		SemPend( m_hVoOutSem , SYS_FOREVER ) ;

		/* acquire Mutex */
		LCK_pend( m_hVoOutMutex, SYS_FOREVER ) ; 
		
		/* Yuv420 to RGB */ 
		m_dvp_pack_yuv420( m_Yuv420_Out->m_pBuf_y, image_width,
				           m_Yuv420_Out->m_pBuf_u, 
				           m_Yuv420_Out->m_pBuf_v, (image_width>>1),
				           disFrameBuf->frame.pFrm.y, 
						   image_width, image_height, (image_width<<1) ) ;

		/* get next buffer */
		m_Yuv420_Out = m_Yuv420_Out->m_pNext ; //m_Yuv420_Cnt ++ ; 

        //CACHE_clean(CACHE_L2ALL, 0, 0);

        /* Get a new buffer from the display driver */
        FVID_exchange(m_hVo, &disFrameBuf);
       
		/*release Mutex*/
		LCK_post( m_hVoOutMutex ) ;
    }

	//LCK_delete( m_hVoOutMutex ) ;

}



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?