[XviD-devel] [PATCH] Make xvid_decraw tga output usable on big endian hosts

Paul Kurucz ptk9417 at ritvax.isc.rit.edu
Tue Jul 26 05:37:28 CEST 2005


Hi Edouard,

>  		for (i=0; i<width*height*BPP;i+=BPP) {

"width" and "heigth" aren't defined.  It should be XDIM*YDIM.  No?

>  			if (BPP == 1) {
.....
.....
>  			} else if (BPP == 2) {
> -				fputc(image+i+1, f);
> -				fputc(image+i+0, f);
> +				fputc(*(image+i+1), f);
> +				fputc(*(image+i+0), f);

	How about:
		fputc(image[i+1], f);
		fputc(image[i+0], f);

Paul


More information about the XviD-devel mailing list