[mythtv] direct rendering patch ; garbled OSD
Isaac Richards
mythtv-dev@snowman.net
Mon, 25 Nov 2002 02:04:44 -0500
On Monday 25 November 2002 01:41 am, John Coiner wrote:
> I just updated from CVS for the first time in a week. The patch to use
> direct rendering is GREAT -- where I previously had 5% free CPU, there
> is now 25% free. Woohoo!
>
> There is this one problem: the OSD sometimes becomes garbled after it is
> there for a second or two. And sometimes, the presence of the OSD causes
> the picture behind it to become garbled with artifacts that look like
> morphed versions of the OSD. And sometimes, it works fine. This is under
> mpeg4.
>
> My first guess it that this is related to the reduction in memcpys, that
> the OSD can now scribble on a frame that the avcodec is still using to
> compute new frames.
>
> Has anyone else seen this? Does anyone already know why this is happening?
Yeah, I've seen it very occasionally. That's exactly the reason, too -- the
deinterlacing and/or the OSD is getting drawn into a buffer that libavcodec
still needs to use (ie, the one immediately previous to the current rendering
frame) to compute the next frame. I _think_ changing the check for the
number of valid video buffers in OutputVideoLoop() (where it kicks back into
prebuffering mode) to look for 'usepre' buffers instead of 0 buffers should
work, but I've not had time to test that yet.
Isaac