[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OpenDivX] OpenDivX optimalization: +30-40%



Disclaimer... I have no knowledge of the internals of OpenDivx yet so
everything below is based only on the code provided in the original
post...

No. This will not produce the same output if blockInter(j, FALSE)
contribute to the result. And/or if addblockInter(j, mp4_hdr.mb_xpos,
mp4_hdr.mb_ypos) contribute to the result when coded is 0.
If that is not the case I can see why this gets faster.
If either of the above is true (they do contribute to the result even
when coded is 0) the result will not be the same since they are never
called in that case...

/Mattias

Andrew Woznytsa wrote:
> 
> Hi All,
> 
> I'm quite confused...
> 
> look below and compare these algorithms.. results will be the same but
> perfomance gain will be 30-40%..
> 
> regards,
> 
> Andrew
> 
> decoder/mp4_mblock.c/macroblock(), line 120:
> 
> 1. original algorithm:
> 
>   // motion compensation
>   if (interFlag)
>   {
>    reconstruct(mp4_hdr.mb_xpos, mp4_hdr.mb_ypos, mp4_hdr.derived_mb_type);
> 
>    // texture decoding add
>    for (j = 0; j < 6; j++) {
>     int coded = mp4_hdr.cbp & (1 << (5 - j));
> 
>     blockInter(j, (coded != 0));
>     addblockInter(j, mp4_hdr.mb_xpos, mp4_hdr.mb_ypos);
>    }
>   }
>   else
>   {
>    // texture decoding add
> [skiped]
> 
> 2. my version
> 
>   // motion compensation
>   if (interFlag)
>   {
>    reconstruct(mp4_hdr.mb_xpos, mp4_hdr.mb_ypos, mp4_hdr.derived_mb_type);
> 
>    // texture decoding add
>    for (j = 0; j < 6; j++) {
>     int coded = mp4_hdr.cbp & (1 << (5 - j));
>     if(coded){
>          blockInter(j, (coded != 0));
>          addblockInter(j, mp4_hdr.mb_xpos, mp4_hdr.mb_ypos);
>     }
>   }
>   else
>   {
>    // texture decoding add
> [skiped]
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> _______________________________________________
> OpenDivX mailing list
> [email protected]
> http://lists.projectmayo.com/mailman/listinfo/opendivx

_______________________________________________
OpenDivX mailing list
[email protected]
http://lists.projectmayo.com/mailman/listinfo/opendivx


Reply To Poster

Local References / HOW-TO / FAQs