Changeset 1249
- Timestamp:
- 01/18/10 20:51:31 (2 months ago)
- Files:
-
- trunk/ColorConversions.c (modified) (4 diffs)
- trunk/Patches/ffmpeg-bgr24-huffyuv.diff (deleted)
- trunk/Patches/ffmpeg-forceinline.diff (deleted)
- trunk/createStaticLibs.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ColorConversions.c
r1246 r1249 340 340 } 341 341 342 // Native-endian XRGB32 to big-endian XRGB32343 static FASTCALL void RGB32toRGB32 (AVFrame *picture, UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height)342 //Little-endian XRGB32 to big-endian XRGB32 343 static FASTCALL void RGB32toRGB32Swap(AVFrame *picture, UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 344 344 { 345 345 UInt8 *srcPtr = picture->data[0]; … … 348 348 349 349 for (y = 0; y < height; y++) { 350 #ifdef __BIG_ENDIAN__351 memcpy(baseAddr, srcPtr, width * 4);352 #else353 350 UInt32 *oRow = (UInt32 *)baseAddr, *iRow = (UInt32 *)srcPtr; 354 351 int x; 355 for (x = 0; x < width; x++) {oRow[x] = EndianU32_NtoB(iRow[x]);} 356 #endif 352 for (x = 0; x < width; x++) {oRow[x] = EndianU32_LtoB(iRow[x]);} 353 354 baseAddr += rowBytes; 355 srcPtr += srcRB; 356 } 357 } 358 359 //Big-endian XRGB32 to big-endian XRGB32 360 static FASTCALL void RGB32toRGB32Copy(AVFrame *picture, UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 361 { 362 UInt8 *srcPtr = picture->data[0]; 363 int srcRB = picture->linesize[0]; 364 int y; 365 366 for (y = 0; y < height; y++) { 367 memcpy(baseAddr, srcPtr, width * 4); 357 368 358 369 baseAddr += rowBytes; … … 517 528 case PIX_FMT_RGB24: 518 529 return k24RGBPixelFormat; 519 case PIX_FMT_RGB32: // FIXME: not a specific pixel format, need LE & BE like 16-bit 530 case PIX_FMT_ARGB: 531 case PIX_FMT_BGRA: 520 532 return k32ARGBPixelFormat; 521 533 case PIX_FMT_YUV410P: … … 557 569 funcs->convert = BGR24toRGB24; 558 570 break; 559 case PIX_FMT_ RGB32:571 case PIX_FMT_ARGB: 560 572 funcs->clear = ClearRGB32; 561 funcs->convert = RGB32toRGB32; 573 #ifdef __ppc__ 574 funcs->convert = RGB32toRGB32Swap; 575 #else 576 funcs->convert = RGB32toRGB32Copy; 577 #endif 578 break; 579 case PIX_FMT_BGRA: 580 funcs->clear = ClearRGB32; 581 #ifdef __ppc__ 582 funcs->convert = RGB32toRGB32Copy; 583 #else 584 funcs->convert = RGB32toRGB32Swap; 585 #endif 562 586 break; 563 587 case PIX_FMT_RGB24: trunk/createStaticLibs.sh
r1222 r1249 75 75 fi 76 76 77 patch -p0 < Patches/ffmpeg-forceinline.diff78 77 patch -p0 < Patches/ffmpeg-no-interlaced.diff 79 78 patch -p0 < Patches/ffmpeg-faltivec.diff 80 79 patch -p0 < Patches/ffmpeg-no-h264-warning.diff 81 80 patch -p0 < Patches/ffmpeg-hardcode-dsputil.diff 82 patch -p0 < Patches/ffmpeg-bgr24-huffyuv.diff83 81 patch -p0 < Patches/ffmpeg-revert-r20347.diff 84 82 touch ffmpeg/patched
