Re: quantization question

"Aitor Garay" <[email protected]> Sat, 5 Apr 2003 17:11:57 +0200
Newsgroups gmane.comp.video.h264.devel
Message-ID <004d01c2fb85$b38c3e50$bcb31fac@HAJC0062>
    Skal sent me the same clarification.  The standard states that integer division
must round to zero, but >> rounds towards minus infinity.

    /AITOR


----- Original Message ----- 
From: "Char Acter" <[email protected]>
To: "Aitor Garay" <[email protected]>; <[email protected]>
Sent: Friday, April 04, 2003 11:02 PM
Subject: Re: [Hdot264-devel] quantization question


> I would say this is equivalent:
> 
>      if( W >= 0) {
>          Z = ( W*MF + f) >> qbits;
>      } else {
>          Z = -(( -W*MF + f) >> qbits)
>      }
> 
> because >> should not be used on a negative number.
> 
> Any other opinions out there?
> 
> --- Aitor Garay <[email protected]> wrote:
> > Hi!,
> > 
> >     As the reference software, i'm using for the
> > quantization the following expression:
> > 
> >     |Z| = ( |W|*MF + f) >> qbits
> >     sign( Z) = sign( W)
> > 
> >     Is this equivalent?
> > 
> >     if( W >= 0) {
> >         Z = ( W*MF + f) >> qbits;
> >     } else {
> > 
> >             Z = ( W*MF - f) >> qbits
> >     }
> > 
> >     /AITOR
> > 
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> Hdot264-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hdot264-devel
> 



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/