Shane Stephens
2006-Aug-28 20:30 UTC
[theora-dev] add theora_user_yuv_out(theora_state *, yuv_buffer *) to libtheora?
Hi,
I'd like to add user-allocated frame memory to theora via a
theora_user_yuv_out callback. An additional helper function
(theora_user_buffer_is_freeable) would also be required.
With these two functions, user applications could submit memory
buffers directly to libtheora, which would reduce the number of frame
copies in a typical application from two per frame to one per frame.
I've summarised the problem in more detail and provided a couple of
alternative approaches at: http://trac.xiph.org/ticket/1081#preview.
What do people think of this idea / approach?
Cheers,
-Shane Stephens
Ralph Giles
2006-Aug-28 23:29 UTC
[theora-dev] add theora_user_yuv_out(theora_state *, yuv_buffer *) to libtheora?
On Tue, Aug 29, 2006 at 01:30:24PM +1000, Shane Stephens wrote:> I'd like to add user-allocated frame memory to theora via a > theora_user_yuv_out callback. An additional helper function > (theora_user_buffer_is_freeable) would also be required.I've responded in the bug report, which isn't optimal, but there you go. -r
Michael Smith
2006-Aug-29 00:40 UTC
[theora-dev] add theora_user_yuv_out(theora_state *, yuv_buffer *) to libtheora?
On 8/29/06, Shane Stephens <shane.stephens@gmail.com> wrote:> Hi, > > I'd like to add user-allocated frame memory to theora via a > theora_user_yuv_out callback. An additional helper function > (theora_user_buffer_is_freeable) would also be required.I would object to adding this sort of thing to libtheora. Add it to theora-exp instead - it's a cleaner API, a more complete AND more correct implementation, and substantially faster. I considered doing it in theora-exp in the past; the reason I didn't do so at the time was that theora's internal frame representation didn't match the output I needed (different strides, primarily), so I was going to have to do a copy anyway. Mike