[theora-dev] Re: Decoder accessing uninitialized variable...Re: [theora-dev]Using Theora in games?
alenl-ml at croteam.com
Sun Feb 29 05:44:19 PST 2004
> > There was some call for an API which lets the application specify the
> > buffer to decode into. This allows decoding directly into video
> > memory, possibly writing only the updated blocks. The difficulty with
> > this is Theora needs to keep its own copy of each decoded frame with
> > 16 pixels of padding on each side (to handle unrestricted motion
> > vectors), from which lots of reads are performed during motion
> > compensation (reads from video memory being slow). It might be
> > possible to write post-processing output directly to an
> > application-specified buffer, but I haven't really investigated the PP
> > code yet (which I need to do; there are parameters in there that are
> > quantizer-dependent, and thus should be in the stream headers but
> > currently are not).
> If anybody implemented such an API, would it be possible, to add support
> for stripe decoding? For example, by using callbacks, that notify the
> caller every time, a complete (say, 32 pixel) row is complete. Using
> such an API, the caller could take those data and do processing
> (scaling, YUV conversions, drawing to screen etc.), while the data is
> still in cache. This gives *huge* performance benefits on current CPUs.
Yes, stripe decoding is an excellent idea, as it both saves memory and
improves CPU cache throughput. From what I saw, seems like splayer on Win32
doesn't scale linearly in speed usage (i.e. 640x480 is more than 4x slower
than 320x240). I have not measured it very carefully, so I wouldn't want to
make any definite statements, but I suspect there might be cache-coherency
Also, note that reading from video memory is not slow on all platforms, and
exposing this option in the API definitely makes sense. I know at least one
platform where memory is scarce, but video reads can be made very fast (it
is possible to cache some parts of video memory, and you only pay a hit for
uncaching it before presenting the results).
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Theora-dev