SDL2.0的YUV显示问题,效率感觉太低,求教
2015-03-21
展开全部
if(m_pTexture == NULL)
{
m_pRender = SDL_CreateRenderer(m_pSDLWindow, -1, 0);
Uint32 pixformat = SDL_PIXELFORMAT_IYUV;
m_pTexture = SDL_CreateTexture(m_pRender, pixformat,
SDL_TEXTUREACCESS_STREAMING, m_nWidth, m_nHeight);
}
SDL_UpdateTexture( m_pTexture, NULL, m_pBuffer, m_nWidth);
SDL_RenderClear( m_pRender );
SDL_Rect sdlRect;
sdlRect.x = 0;
sdlRect.y = 0;
sdlRect.w = m_nWidth;
sdlRect.h = m_nHeight;
SDL_RenderCopy( m_pRender, m_pTexture, NULL, &sdlRect);
SDL_RenderPresent( m_pRender );
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询