[MPlayer-dev-eng] [PATCH] si2us() in libaf is off-by-one

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Sep 25 17:47:15 CEST 2005


Hi,
On Thu, Sep 22, 2005 at 06:15:01PM +0200, Guillaume POIRIER wrote:
> On 9/7/05, dega <deganews at quickclic.net> wrote:
> > -      ((uint8_t*)out)[i]=(uint8_t)(SCHAR_MAX+((int)((int8_t*)in)[i]));
> > +      ((uint8_t*)out)[i]=(uint8_t)(((int)((int8_t*)in)[i])-SCHAR_MIN); 
> What happened to this patch? Is it any good?

I think some other places use ^ 0x80 etc for the conversion, maybe this
should be done here as well?
In that case si2us and us2si would be the same function, so that should
be fixed as well...

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list