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

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Oct 11 10:27:47 CEST 2005


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.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list