[theora-dev] Cortado yuv thread patch
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Mon Oct 26 05:56:31 PDT 2009
Jan Schmidt wrote:
> On Sat, 2009-10-24 at 10:16 +0200, Maik Merten wrote:
>> Hi,
>>
>> with this patch applied I can now see load on two CPU cores and can play
>> http://tinyvid.tv/show/ah2ebubqurvy (720p HD) with only few noticable
>> frame drops (3 GHz Phenom II). Now apparantly it's "just" jheora CPU
>> spikes that prevent truly smooth playback. Not too bad for a 100% Java
>> playback solution ;-)
>
> Setting the number of buffers in the intermediate queue a little larger
> than 1 buffer might improve that, at the cost of keeping a few more
> uncompressed buffers in memory.
It's a good idea, but it won't be a one-line patch. Currently, TheoraDec
allocates a single output YUVBuffer in memory on startup and then reuses
it throughout. Given v_queue2 a depth > 1, all else being equal, will
just keep multiple pointers to the single output buffer. Reusing that
buffer seems like a valuable optimization, worth keeping if we expand to
more buffers.
Cortado's bigger problem, IMHO, is that it doesn't drop frames, and
instead just blocks everything until the decoder catches up to real-time.
This is obviously The Wrong Way, and makes Cortado useless on any
hardware not capable of full-on realtime decode. Falling back to
keyframes-only, so that the audio can continue to play, would be better
than what we have now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/theora-dev/attachments/20091026/274381dd/attachment.pgp
More information about the theora-dev
mailing list