[Theora-dev] Re: PC-based video server

Timothy B. Terriberry tterribe at vt.edu
Wed Jan 26 20:04:22 PST 2005


Andrey Filippov wrote:
>>So you want to re-encode smaller versions of the camera streams?
>>
> 
> 
> Yes, counting that in most cases there will be only one person watching
> the cameras so the total data sent out should be approximately one full
> computer screen. So form each Theora stream (let's say it is
> 2048x1536x12fps) DC components are always decoded and sent out as 256x192
> preview windows. Then operator can send request for PTZ  - select window
> and increase zoom - we could use just discrete settings (1-2-4-8) and use
> first AC coefficients with abbreviated versions of IDCT.

Keep in mind of course that coefficients are stored in zig-zag order, 
not embedded-tree order. So to get the upper 2x2 window of coefficients, 
you actually need to decode the Huffman codes for the first 5, and for 
4x4 you need the first 25. You might also run into drift problems with 
INTER_NOMV blocks if you don't decode to full resolution and run the 
loop filter properly. You'll also need to decode the coefficients for 
all of the blocks, regardless of what region you want to decode (except 
perhas in the last coefficient).

However, since you use no motion vectors, you _will_ be able to just do 
IDCT+MC, etc., on the blocks you're interested in (and possibly the 
surrounding ring of blocks, just to run the loop filter properly, unless 
you're willing to live with some drift near the edges). Since this is 
the stuff that works on uncompressed data, this is usually the slowest 
part of decoding, just beacuse of the memory bandwidth requirements.

So, I don't think reduced resolution buys you a whole lot in terms of 
CPU savings (unless you're willing to live with drift artifacts) in 
decoding (obviously it does in encoding the resulting MJPEG stream), but 
a smaller region of interest will---albeit not directly proportional to 
the ROI size, since you still have to decode all of the coefficients for 
the frame.

If you _are_ willing to live with drift artifacts and some additional 
small quality loss, what might be interesting is to try direct 
Theora->MJPEG transcoding. That'd be a lot more developer time, however. 
The other things I talked about are actually pretty easy to hack into 
the experimental decoder.


More information about the Theora-dev mailing list