Forwarded with permission of the author - he emailed this privately after a comment on the whatwg list.
Summary: Theora video on iPhone is not going to be easy even with a volunteer to write it - the first and second generation iPhone/iPodt Touch CPUs aren't up to the task. So, Theora fans have a new puzzle to try: get an anaemic ARM to decode Theora fast enough to be useful!
When I asked if I could forward this here, he said to feel free and also noted:
"I've been hanging out in irc to improve ffmpeg's Theora decoder, but arm11 is going to be especially hard for any Theora decoder due to the lack of L2 cache and only 16k of L1 data cache."
- d.
---------- Forwarded message ---------- From: David Conrad lessen42@gmail.com Date: 2009/7/14 Subject: Re: [whatwg] HTML 5 video tag questions To: dgerard@gmail.com
Hi David,
On Jul 13, 2009, at 2:09 PM, David Gerard wrote:
iPhone Safari users (does iPhone Safari support <video> yet?) are, unfortunately, out in the cold until someone writes a Wikimedia client app that does Theora for them. That won't be us unless a volunteer steps up.
First of all, iPhone Safari does indeed recognize the <video> tag, but treats it essentially the same way as <object>, in that it uses its own controls and plays the video completely separate from the web page. Of course, not much else really makes sense on a small screen.
I recently investigated how feasible it would be to create a Theora video player for the iPhone/iPod touch and found the following shortcomings (targeting a iPod touch 1g):
- libtheora-thusnelda can only get 23 fps on the 640x272 Transformers trailer used at Dailymotion's HTML5 demo decoding to /dev/null. Given the weak simd capabilities of the arm11, I doubt that this could be sped up by more than 20%, and I think 10% is a more likely upper bound. - The only iPhone API for displaying frames that is fast enough for video is OpenGL ES 1.1, which requires each frame to be converted to RGB, padded to power of two dimensions, and then a blocking copy to video memory. All of this adds significant overhead.
All in all, I think it may not be possible to play Theora much larger than CIF on current iPod touch or any iPhone other than the iPhone 3gs. The iPhone 3gs (and likely this year's iPod touch), however, has a much more powerful Cortex-A8 and also supports OpenGL ES 2.0, eliminating the need for a CPU yuv -> rgb conversion and padding to power of two dimensions. This should be more than sufficient for SD Theora; the Transformers clip currently decodes at 52 fps to /dev/null on a BeagleBoard with some NEON optimizations.
So, I'm shelving this for now. I might pick it back up once an iPod touch with a Cortex-A8 is released this September, but I thought you might be interested in my findings anyway.
-David
David Gerard wrote:
Forwarded with permission of the author - he emailed this privately after a comment on the whatwg list.
Summary: Theora video on iPhone is not going to be easy even with a volunteer to write it - the first and second generation iPhone/iPodt Touch CPUs aren't up to the task. So, Theora fans have a new puzzle to try: get an anaemic ARM to decode Theora fast enough to be useful!
When I asked if I could forward this here, he said to feel free and also noted:
"I've been hanging out in irc to improve ffmpeg's Theora decoder, but arm11 is going to be especially hard for any Theora decoder due to the lack of L2 cache and only 16k of L1 data cache."
Thanks for the research & update! Would certainly be interesting to see if it can be done, even if only on the newer devices.
-- brion
wikitech-l@lists.wikimedia.org