[Ffmpeg-devel] Re: [BUG] TSCC wrong colors on PPC

Diego Biurrun diego
Sun Jan 8 22:51:03 CET 2006


On Sun, Jan 08, 2006 at 12:32:31PM -0800, Mike Melanson wrote:
> Kostya wrote:
> >-            case 16: pix[0] = *src++;
> >-                     pix[1] = *src++;
> >+            case 16: *((uint16_t*)pix) = LE_16(src);
> >+                     src += 2;
> 
> 	The steps are reversed. Following the model I used in qtrle.c:
> 
>   uint16_t pix16;
>   pix16 = LE_16(src);
>   src += 2;
>   *((uint16_t*)pix) = pix16;
> 
> Or some such. The point here is that explicit byte ordering is used when 
> reading the original encoded bytestream from memory, and native byte 
> ordering is used when writing the decoded image back to memory.

You mean

  case 16: src += 2;
           *((uint16_t*)pix) = LE_16(src);

This did not do the trick unfortunately, it messes up the image
further...

Diego





More information about the ffmpeg-devel mailing list