void CRendererVAAPI::AddVideoPictureHW(DVDVideoPicture &picture, int index) { VAAPI::CVaapiRenderPicture *vaapi = picture.vaapi; YUVBUFFER &buf = m_buffers[index]; VAAPI::CVaapiRenderPicture *pic = vaapi->Acquire(); if (buf.hwDec) ((VAAPI::CVaapiRenderPicture*)buf.hwDec)->Release(); buf.hwDec = pic; if (m_format == RENDER_FMT_VAAPINV12) { YV12Image &im = m_buffers[index].image; CDVDCodecUtils::CopyNV12Picture(&im, &vaapi->DVDPic); } }
void CRendererVAAPI::AddVideoPictureHW(VideoPicture &picture, int index) { VAAPI::CVaapiRenderPicture *vaapi = static_cast<VAAPI::CVaapiRenderPicture*>(picture.hwPic); YUVBUFFER &buf = m_buffers[index]; VAAPI::CVaapiRenderPicture *pic = vaapi->Acquire(); if (buf.hwDec) ((VAAPI::CVaapiRenderPicture*)buf.hwDec)->Release(); buf.hwDec = pic; if (!m_isVAAPIBuffer) { YV12Image &im = m_buffers[index].image; CDVDCodecUtils::CopyNV12Picture(&im, &vaapi->DVDPic); } }