Skip to content

Commit

Permalink
Revert "VDPAU: Improved dummy frame handling."
Browse files Browse the repository at this point in the history
This reverts commit bf1ad7a - which doesn't actually work and fills the logs with VDPAU errors.
  • Loading branch information
Mark Kendall committed Oct 17, 2011
1 parent bf1ad7a commit 2bfd6f1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 45 deletions.
25 changes: 13 additions & 12 deletions mythtv/libs/libmythtv/videoout_vdpau.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ void VideoOutputVDPAU::PrepareFrame(VideoFrame *frame, FrameScanType scan,
}

uint video_surface = m_video_surfaces[0];
bool deint = (m_deinterlacing && m_need_deintrefs &&
frame && !dummy);
bool deint = (m_deinterlacing && m_need_deintrefs && frame);

if (deint)
{
Expand Down Expand Up @@ -492,17 +491,19 @@ void VideoOutputVDPAU::PrepareFrame(VideoFrame *frame, FrameScanType scan,
if (size != m_render->GetSize())
LOG(VB_GENERAL, LOG_ERR, LOC + "Unexpected display size.");

if (!m_render->MixAndRend(m_video_mixer, field,
dummy ? VDP_INVALID_HANDLE : video_surface,
0, deint ? &m_reference_frames : NULL,
scan == kScan_Interlaced,
window.GetVideoRect(),
QRect(QPoint(0,0), size),
vsz_enabled ? vsz_desired_display_rect :
window.GetDisplayVideoRect(),
m_pip_ready ? m_pip_layer : 0, 0))
if (!dummy)
{
LOG(VB_PLAYBACK, LOG_ERR, LOC + "Prepare frame failed.");
if (!m_render->MixAndRend(m_video_mixer, field, video_surface, 0,
deint ? &m_reference_frames : NULL,
scan == kScan_Interlaced,
window.GetVideoRect(),
QRect(QPoint(0,0), size),
vsz_enabled ? vsz_desired_display_rect :
window.GetDisplayVideoRect(),
m_pip_ready ? m_pip_layer : 0, 0))
{
LOG(VB_PLAYBACK, LOG_ERR, LOC + "Prepare frame failed.");
}
}

if (m_visual)
Expand Down
60 changes: 27 additions & 33 deletions mythtv/libs/libmythui/mythrender_vdpau.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,46 +999,37 @@ bool MythRenderVDPAU::MixAndRend(uint id, VdpVideoMixerPictureStructure field,
out_surface = m_surfaces[m_surface];

if (!m_videoMixers.contains(id) ||
!m_videoSurfaces.contains(vid_surface)||
!m_outputSurfaces.contains(out_surface))
return false;

surf = m_outputSurfaces[out_surface].m_id;
mixer = m_videoMixers[id].m_id;
vid_surf = m_videoSurfaces[vid_surface].m_id;

if (!m_videoSurfaces.contains(vid_surface))
{
vid_surf = VDP_INVALID_HANDLE;
}
else
if (refs && refs->size() == NUM_REFERENCE_FRAMES)
{
vid_surf = m_videoSurfaces[vid_surface].m_id;

if (refs && refs->size() == NUM_REFERENCE_FRAMES)
deint = true;
VdpVideoSurface act_refs[NUM_REFERENCE_FRAMES];
for (int i = 0; i < NUM_REFERENCE_FRAMES; i++)
{
deint = true;
VdpVideoSurface act_refs[NUM_REFERENCE_FRAMES];
for (int i = 0; i < NUM_REFERENCE_FRAMES; i++)
{
if (m_videoSurfaces.contains(refs->value(i)))
act_refs[i] = m_videoSurfaces[refs->value(i)].m_id;
else
act_refs[i] = VDP_INVALID_HANDLE;
}

vid_surf = act_refs[1];

if (top)
{
future_surfaces[0] = act_refs[1];
past_surfaces[0] = act_refs[0];
past_surfaces[1] = act_refs[0];
}
if (m_videoSurfaces.contains(refs->value(i)))
act_refs[i] = m_videoSurfaces[refs->value(i)].m_id;
else
{
future_surfaces[0] = act_refs[2];
past_surfaces[0] = act_refs[1];
past_surfaces[1] = act_refs[0];
}
act_refs[i] = VDP_INVALID_HANDLE;
}

vid_surf = act_refs[1];

if (top)
{
future_surfaces[0] = act_refs[1];
past_surfaces[0] = act_refs[0];
past_surfaces[1] = act_refs[0];
}
else
{
future_surfaces[0] = act_refs[2];
past_surfaces[0] = act_refs[1];
past_surfaces[1] = act_refs[0];
}
}

Expand All @@ -1054,6 +1045,9 @@ bool MythRenderVDPAU::MixAndRend(uint id, VdpVideoMixerPictureStructure field,
sizeof(VdpLayer));
num_layers++;
}

surf = m_outputSurfaces[out_surface].m_id;
mixer = m_videoMixers[id].m_id;
}

if (dst_vid.top() < 0 && dst_vid.height() > 0)
Expand Down

0 comments on commit 2bfd6f1

Please sign in to comment.