[theora-dev] Theora integration question

Engineering ee at athyriogames.com
Mon Oct 15 12:52:48 PDT 2012


Hello all, I'm following up on my theora memory thread.

I have an embedded device which plays Theora movies. As the movies should be
randomly accessible, I have them all loaded at once. As the product grows,
we have around 180 movies loaded, which is causing memory problems. I added
some debug info to _ogg_malloc, and see I am grabbing 1.2GB of RAM - that
would explain a lot!

I already have a mechanism in place to share video memory amongst movies
that are mutually exclusive. Is there anything to watch out for by sharing
some of theora's internal RAM buffers between movies that will never be
decoded simultaneously?

I have test code into so that the largest (1920x1080) movies share buffers
for ref_frame_data and dct_tokens

As long as I remember to update the movie at frame 0 before use, I don't see
any issues, but am I inviting disaster? Doing this gets me from 1.2GB to
0.2GB of RAM usage.

A more elegant way might be to concatenate all the full screen movies into
one ogv, and then playback which parts I need, i.e. frames 180-360. My worry
there is inter/intra frames. These are a collection of short, disparate
clips. Is there an existing way to concatenate ogvs and guarantee each parts
starts on an intra-frame?

Thanks
Sam





More information about the theora-dev mailing list