61
64
ScopeTimer timer(DecoderProfilingZone);
65
vdpau_render_state* pRenderState = 0;
66
FrameAvailableCode frameAvailable;
62
67
vector<BitmapPtr> pBmps;
63
IntPoint size = m_pDecoder->getSize();
64
IntPoint halfSize(size.x/2, size.y/2);
65
PixelFormat pf = m_pDecoder->getPixelFormat();
66
FrameAvailableCode frameAvailable;
67
if (pixelFormatIsPlanar(pf)) {
68
pBmps.push_back(getBmp(m_pBmpQ, size, I8));
69
pBmps.push_back(getBmp(m_pHalfBmpQ, halfSize, I8));
70
pBmps.push_back(getBmp(m_pHalfBmpQ, halfSize, I8));
71
if (pf == YCbCrA420p) {
68
bool usesVDPAU = m_pDecoder->getVideoInfo().m_bUsesVDPAU;
70
#ifdef AVG_ENABLE_VDPAU
71
frameAvailable = m_pDecoder->renderToVDPAU(&pRenderState);
73
frameAvailable = FA_NEW_FRAME; // Never executed - silences compiler warning.
76
IntPoint size = m_pDecoder->getSize();
77
IntPoint halfSize(size.x/2, size.y/2);
78
PixelFormat pf = m_pDecoder->getPixelFormat();
79
if (pixelFormatIsPlanar(pf)) {
72
80
pBmps.push_back(getBmp(m_pBmpQ, size, I8));
81
pBmps.push_back(getBmp(m_pHalfBmpQ, halfSize, I8));
82
pBmps.push_back(getBmp(m_pHalfBmpQ, halfSize, I8));
83
if (pf == YCbCrA420p) {
84
pBmps.push_back(getBmp(m_pBmpQ, size, I8));
87
pBmps.push_back(getBmp(m_pBmpQ, size, pf));
75
pBmps.push_back(getBmp(m_pBmpQ, size, pf));
89
frameAvailable = m_pDecoder->renderToBmps(pBmps, -1);
77
frameAvailable = m_pDecoder->renderToBmps(pBmps, -1);
79
91
if (m_pDecoder->isEOF(SS_VIDEO)) {
80
92
VideoMsgPtr pMsg(new VideoMsg());
84
96
ScopeTimer timer(PushMsgProfilingZone);
86
97
AVG_ASSERT(frameAvailable == FA_NEW_FRAME);
87
98
VideoMsgPtr pMsg(new VideoMsg());
88
pMsg->setFrame(pBmps, m_pDecoder->getCurTime(SS_VIDEO));
100
pMsg->setVDPAUFrame(pRenderState, m_pDecoder->getCurTime(SS_VIDEO));
102
pMsg->setFrame(pBmps, m_pDecoder->getCurTime(SS_VIDEO));
89
104
m_MsgQ.push(pMsg);
107
ThreadProfiler::get()->reset();