[MPlayer-dev-eng] [PATCH] use int_fast32_t in postproc/*

Rich Felker dalias at aerifal.cx
Tue Oct 11 17:59:18 CEST 2005


On Tue, Oct 11, 2005 at 10:27:47AM +0200, Reimar Döffinger wrote:
> Hi,
> On Mon, Oct 10, 2005 at 03:23:02PM -0400, Rich Felker wrote:
> > IMO you should use unsigned, since the original code was unsigned.
> > Size/byte count variables should always be unsigned, though they're
> > often not; only offset-type ones should be signed (so width, height
> > are unsigned quantities while stride is signed).
> 
> Actually I am against using unsigned unless there is a very good reason,
> because
> 1) it makes things harder to read because "unsigned long" is a lot
> longer than just "long"
> 2) using signed makes it easy to add more functionality by using
> negative values for special things (probably not relevant here).
> 3) The reason why that code was broken is that it used those unsigned
> values as signed ones, esp. negating them.
> 
> So I admit, this patch actually does two things together int -> long and
> unsigned -> signed, but since that's mostly the same places that need to
> be changed and I am lazy, I wanted to do it in one piece.

Ok, leave it signed.

Rich




More information about the MPlayer-dev-eng mailing list