[prev in list] [next in list] [prev in thread] [next in thread] 

List:       theora
Subject:    Re: [theora] Theora encoder performance
From:       Mircea Gliga <mgliga () integrasoft ! ro>
Date:       2009-12-09 7:27:13
Message-ID: 4B1F5151.5030102 () integrasoft ! ro
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


    With all the measurements I've done with the images from my webcam ( 
the API
calls: /th_encode_ycbcr_in/ and /th_encode_packetout/ take *80 ms *when 
there
is a lot of motion from the webcam ), I've come to the conclusion that I 
can only
encode around 10-12 frames/sec without any other image processing ( YUV 
conversion, etc).


Mircea Gliga wrote:
> I'm evaluating some video codecs for a online conference system. I'm 
> encoding images (640x480)
> from a webcam. I've been playing around with theora and xvid.
>     First of all, using theora, the decoded image looks strange: 
> http://integrasoft.ro/~mgliga/theora/comparison.png 
> <http://integrasoft.ro/%7Emgliga/theora/comparison.png>.
> On the left side the image from the webcam, on the right side the 
> image from the
> webcam encoded, and then decoded using theora. As you can see there 
> are some strange
> colors overs there ( looks like edge detection  :-D ).
>     Then I measured how long does it take for Theora to encode an 
> image (/th_encode_ycbcr_in/ and /
> th_encode_packetout/ calls).
>
>     int TIMER_t0 = GetTickCount();
>     int ret = th_encode_ycbcr_in( (th_enc_ctx*)m_encoderHandler, ycbcr);
>     ogg_packet    op;
>     th_encode_packetout((th_enc_ctx*)m_encoderHandler,0,&op)>0
>     int TIMER_t1 = GetTickCount();
>     printf( "Timer : %d \n",TIMER_t1 - TIMER_t0 );
>
>     On average: *80 ms*.
>    
>     Using XVID I've obtained between *20-25 ms* for an image. That's 
> 60ms longer using Theora.
>     I don't know if I am doing something wrong while initializing the 
> encoder, or that's the way it
> supposed to be. The encoder initialization used by me can be found 
> here: http://integrasoft.ro/~mgliga/theora/theora_init.cpp 
> <http://integrasoft.ro/%7Emgliga/theora/comparison.png>
>    
>     Used hardware/software:
>     Processor    Pentium(R) Dual-Core  CPU      E5200  @ 2.50GHz, 2400 
> Mhz, 2 Core(s), 2 Logical Processor(s)
>     Installed Physical Memory (RAM)    2.00 GB
>     OS Name    Microsoft® Windows Vista^(TM)
>    
>
> Any ideas or suggestions are welcomed.
>    
> -- 
> Mircea Gliga
>   

[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
&nbsp;&nbsp;&nbsp; With all the measurements I've done with the images from my webcam
( the API <br>
calls: <i>th_encode_ycbcr_in</i> and <i>th_encode_packetout</i> take <b>80
ms </b>when there <br>
is a lot of motion from the webcam ), I've come to the conclusion that
I can only <br>
encode around 10-12 frames/sec without any other image processing ( YUV
conversion, etc).<br>
<br>
<br>
Mircea Gliga wrote:
<blockquote cite="mid:4B1D0BD7.7030008@integrasoft.ro" type="cite">I'm
evaluating some video codecs for a online conference system. I'm
encoding images (640x480)<br>
from a webcam. I've been playing around with theora and xvid. <br>
&nbsp;&nbsp;&nbsp; First of all, using theora, the decoded image looks strange: <a
 moz-do-not-send="true"
 href="http://integrasoft.ro/%7Emgliga/theora/comparison.png">http://integrasoft.ro/~mgliga/theora/comparison.png</a>.<br>
 On the left side the image from the webcam, on the right side the image
from the <br>
webcam encoded, and then decoded using theora. As you can see there are
some strange <br>
colors overs there ( looks like edge detection&nbsp;<span
 class="moz-smiley-s5"><span> :-D </span></span> ).<br>
&nbsp;&nbsp;&nbsp; Then I measured how long does it take for Theora to encode an \
image (<i>th_encode_ycbcr_in</i> and <i><br>
th_encode_packetout</i> calls).<br>
  <br>
&nbsp;&nbsp;&nbsp; int TIMER_t0 = GetTickCount();<br>
&nbsp;&nbsp;&nbsp; int ret = th_encode_ycbcr_in( (th_enc_ctx*)m_encoderHandler, \
ycbcr);<br> &nbsp;&nbsp;&nbsp; ogg_packet&nbsp;&nbsp;&nbsp; op;<br>
&nbsp;&nbsp;&nbsp; th_encode_packetout((th_enc_ctx*)m_encoderHandler,0,&amp;op)&gt;0 \
<br> &nbsp;&nbsp;&nbsp; int TIMER_t1 = GetTickCount();<br>
&nbsp;&nbsp;&nbsp; printf( "Timer : %d \n",TIMER_t1 - TIMER_t0 );<br>
  <br>
&nbsp;&nbsp;&nbsp; On average: <b>80 ms</b>.<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; Using XVID I've obtained between <b>20-25 ms</b> for an image.
That's 60ms longer using Theora.<br>
&nbsp;&nbsp;&nbsp; I don't know if I am doing something wrong while initializing the
encoder, or that's the way it <br>
supposed to be. The encoder initialization used by me can be found
here: <a moz-do-not-send="true"
 href="http://integrasoft.ro/%7Emgliga/theora/comparison.png">http://integrasoft.ro/~mgliga/theora/theora_init.cpp</a><br>
 &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; Used hardware/software:<br>
&nbsp;&nbsp;&nbsp; Processor&nbsp;&nbsp;&nbsp; Pentium(R) Dual-Core&nbsp; \
CPU&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E5200&nbsp; @ 2.50GHz, 2400 Mhz, 2 Core(s), 2 \
Logical Processor(s)<br> &nbsp;&nbsp;&nbsp; Installed Physical Memory \
(RAM)&nbsp;&nbsp;&nbsp; 2.00 GB<br> &nbsp;&nbsp;&nbsp; OS Name&nbsp;&nbsp;&nbsp; \
Microsoft&reg; Windows Vista&#8482; <br> &nbsp;&nbsp;&nbsp; <br>
  <br>
Any ideas or suggestions are welcomed.<br>
&nbsp;&nbsp;&nbsp; <br>
  <pre class="moz-signature" cols="72">-- 
Mircea Gliga
  </pre>
</blockquote>
</body>
</html>



_______________________________________________
theora mailing list
theora@xiph.org
http://lists.xiph.org/mailman/listinfo/theora


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic