Changeset 1027
- Timestamp:
- 02/19/09 01:29:04 (1 year ago)
- Files:
-
- trunk/ColorConversions.c (modified) (13 diffs)
- trunk/ColorConversions.h (modified) (1 diff)
- trunk/CommonUtils.c (modified) (1 diff)
- trunk/CommonUtils.h (modified) (1 diff)
- trunk/FFusionCodec.c (modified) (4 diffs)
- trunk/Patches/ffmpeg-h264dsp-crash.diff (deleted)
- trunk/Patches/ffmpeg-no-interlaced.diff (modified) (2 diffs)
- trunk/Patches/ffmpeg-pic.diff (deleted)
- trunk/Perian.xcodeproj/project.pbxproj (modified) (3 diffs)
- trunk/Subtitles/SubATSUIRenderer.m (modified) (12 diffs)
- trunk/Subtitles/SubContext.h (modified) (1 diff)
- trunk/Subtitles/SubContext.m (modified) (4 diffs)
- trunk/Subtitles/SubParsing.h (modified) (1 diff)
- trunk/Subtitles/SubParsing.m.rl (modified) (7 diffs)
- trunk/Subtitles/SubRenderer.h (modified) (1 diff)
- trunk/createStaticLibs.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ColorConversions.c
r887 r1027 16 16 * You should have received a copy of the GNU Lesser General Public 17 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */19 20 #include "ColorConversions.h" 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21 21 #include <QuickTime/QuickTime.h> 22 22 #include <Accelerate/Accelerate.h> 23 #include <sys/types.h> 24 #include <sys/sysctl.h> 25 26 #ifndef GOOD_COMPILER 27 #define noinline __attribute__((noinline)) 28 #else 29 #define noinline 30 #endif 23 #include "ColorConversions.h" 24 #include "Codecprintf.h" 25 #include "CommonUtils.h" 26 27 /* 28 Converts (without resampling) from ffmpeg pixel formats to the ones QT accepts 29 30 Todo: 31 - rewrite everything in asm (or C with all loop optimization opportunities removed) 32 - add a version with bilinear resampling 33 - rewrite the PPC-only code to just use int instead of all the crazy types 34 - handle YUV 4:2:0 with odd width 35 */ 31 36 32 37 #define unlikely(x) __builtin_expect(x, 0) 33 34 //----------------------------------------------------------------- 35 // FastY420 36 //----------------------------------------------------------------- 37 // Returns y420 data directly to QuickTime which then converts 38 // in RGB for display 39 //----------------------------------------------------------------- 40 41 void FastY420(UInt8 *baseAddr, AVFrame *picture) 42 { 43 PlanarPixmapInfoYUV420 *planar; 44 38 #define likely(x) __builtin_expect(x, 1) 39 40 static FASTCALL void FastY420(AVFrame *picture, UInt8 *baseAddr, int outRowBytes, unsigned outWidth, unsigned outHeight) 41 { 42 PlanarPixmapInfoYUV420 *planar = (PlanarPixmapInfoYUV420 *)baseAddr; 45 43 /*From Docs: PixMap baseAddr points to a big-endian PlanarPixmapInfoYUV420 struct; see ImageCodec.i. */ 46 planar = (PlanarPixmapInfoYUV420 *) baseAddr;47 44 48 45 // if ya can't set da poiners, set da offsets 49 planar->componentInfoY.offset =EndianU32_NtoB(picture->data[0] - baseAddr);50 planar->componentInfoCb.offset = EndianU32_NtoB(picture->data[1] - baseAddr);51 planar->componentInfoCr.offset = EndianU32_NtoB(picture->data[2] - baseAddr);46 planar->componentInfoY.offset = EndianU32_NtoB(picture->data[0] - baseAddr); 47 planar->componentInfoCb.offset = EndianU32_NtoB(picture->data[1] - baseAddr); 48 planar->componentInfoCr.offset = EndianU32_NtoB(picture->data[2] - baseAddr); 52 49 53 50 // for the 16/32 add look at EDGE in mpegvideo.c 54 planar->componentInfoY.rowBytes = EndianU32_NtoB(picture->linesize[0]);51 planar->componentInfoY.rowBytes = EndianU32_NtoB(picture->linesize[0]); 55 52 planar->componentInfoCb.rowBytes = EndianU32_NtoB(picture->linesize[1]); 56 53 planar->componentInfoCr.rowBytes = EndianU32_NtoB(picture->linesize[2]); 57 54 } 58 55 59 //----------------------------------------------------------------- 60 // FFusionSlowDecompress 61 //----------------------------------------------------------------- 62 // We have to return 2yuv values because 63 // QT version has no built-in y420 component. 64 // Since we do the conversion ourselves it is not really optimized.... 65 // The function should never be called since many people now 66 // have a decent OS/QT version. 67 //----------------------------------------------------------------- 68 69 static void noinline Y420toY422_lastrow(UInt8 *o, const UInt8 *yc, const UInt8 *uc, const UInt8 *vc, unsigned halfWidth) 70 { 71 unsigned x; 56 //Handles the last row for Y420 videos with an odd number of luma rows 57 //FIXME odd number of luma columns is not handled and they will be lost 58 static void Y420toY422_lastrow(UInt8 *o, UInt8 *yc, UInt8 *uc, UInt8 *vc, unsigned halfWidth) 59 { 60 int x; 72 61 for(x=0; x < halfWidth; x++) 73 62 { 74 unsigned x4 = x*4, x2 = x*2; 63 int x4 = x*4, x2 = x*2; 64 75 65 o[x4] = uc[x]; 76 66 o[x4+1] = yc[x2]; … … 82 72 #define HandleLastRow(o, yc, uc, vc, halfWidth, height) if (unlikely(height & 1)) Y420toY422_lastrow(o, yc, uc, vc, halfWidth) 83 73 84 #ifdef __BIG_ENDIAN__ 74 //Y420 Planar to Y422 Packed 75 //The only one anyone cares about, so implemented with SIMD 76 77 #ifdef __ppc__ 85 78 //hand-unrolled code is a bad idea on modern CPUs. luckily, this does not run on modern CPUs, only G3s. 86 //also, big-endian only 87 88 static void Y420toY422_ppc_scalar(UInt8* baseAddr, unsigned outRB, unsigned width, unsigned height, AVFrame * picture) 89 { 90 unsigned y = height / 2; 91 unsigned halfWidth = width / 2, halfHalfWidth = width / 4; 79 80 static FASTCALL void Y420toY422_ppc_scalar(AVFrame *picture, UInt8 *baseAddr, int outRB, unsigned width, unsigned height) 81 { 82 unsigned y = height / 2; 83 unsigned halfWidth = width / 2, halfHalfWidth = width / 4; 92 84 UInt8 *inY = picture->data[0], *inU = picture->data[1], *inV = picture->data[2]; 93 85 int rB = picture->linesize[0], rbU = picture->linesize[1], rbV = picture->linesize[2]; … … 129 121 130 122 HandleLastRow(baseAddr, inY, inU, inV, halfWidth, height); 131 }132 133 static void Y420toY422_ppc_altivec(UInt8 * o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture)123 } 124 125 static FASTCALL void Y420toY422_ppc_altivec(AVFrame * picture, UInt8 * o, int outRB, unsigned width, unsigned height) 134 126 { 135 127 UInt8 *yc = picture->data[0], *uc = picture->data[1], *vc = picture->data[2]; … … 182 174 HandleLastRow(o, yc, uc, vc, width / 2, height); 183 175 } 184 185 void Y420toY422(UInt8 * o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture)186 {187 static void (*y420_function)(UInt8* baseAddr, unsigned outRB, unsigned width, unsigned height, AVFrame * picture) = NULL;188 if (!y420_function) {189 int sels[2] = { CTL_HW, HW_VECTORUNIT }; // from http://developer.apple.com/hardwaredrivers/ve/g3_compatibility.html190 int vType = 0; //0 == scalar only191 size_t length = sizeof(vType);192 int error = sysctl(sels, 2, &vType, &length, NULL, 0);193 if( 0 == error && vType ) y420_function = Y420toY422_ppc_altivec;194 else195 y420_function = Y420toY422_ppc_scalar;196 }197 198 y420_function(o, outRB, width, height, picture);199 }200 176 #else 201 177 #include <emmintrin.h> 202 178 203 static void Y420toY422_sse2(UInt8 * o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture)179 static FASTCALL void Y420toY422_sse2(AVFrame * picture, UInt8 *o, int outRB, unsigned width, unsigned height) 204 180 { 205 181 UInt8 *yc = picture->data[0], *uc = picture->data[1], *vc = picture->data[2]; 206 unsignedrY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2];207 unsigned y,x, vWidth = width / 32, halfheight = height / 2;208 unsigned halfwidth = width /2;182 int rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2]; 183 int y, x, halfwidth = width / 2 , halfheight = height / 2; 184 int vWidth = width / 32; 209 185 210 186 for (y = 0; y < halfheight; y++) { … … 213 189 __m128i * uv = (__m128i*)uc,* vv = (__m128i*)vc; 214 190 215 #if 0 191 #ifdef __i386__ 192 int vWidth_ = vWidth; 193 216 194 asm volatile( 217 195 "\n0: \n\t" … … 253 231 "movntdq %%xmm6, 48(%1) \n\t" /*ov2[x4+3]*/ 254 232 "addl $64, %1 \n\t" 255 "dec %6 \n\t"233 "decl %6 \n\t" 256 234 "jnz 0b \n\t" 257 235 : "+r" (ov), "+r" (ov2), 258 "+r" (yv), "+r" (yv2), "+r" (uv), "+r" (vv) 259 : "r" (vWidth) 236 "+r" (yv), "+r" (yv2), "+r" (uv), "+r" (vv), "+m"(vWidth_) 237 : 238 : "memory", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6" 260 239 ); 261 240 #else 262 241 for (x = 0; x < vWidth; x++) { 263 unsignedx2 = x*2, x4 = x*4;242 int x2 = x*2, x4 = x*4; 264 243 265 244 __m128i tmp_y = yv[x2], tmp_y3 = yv[x2+1], … … 282 261 283 262 for (x=vWidth * 16; x < halfwidth; x++) { 284 unsignedx4 = x*4, x2 = x*2;263 int x4 = x*4, x2 = x*2; 285 264 o2[x4] = o[x4] = uc[x]; 286 265 o[x4 + 1] = yc[x2]; … … 296 275 vc += rV; 297 276 } 298 299 _mm_sfence(); 300 277 301 278 HandleLastRow(o, yc, uc, vc, halfwidth, height); 302 279 } 303 280 304 305 static void noinline Y420toY422_x86_scalar(UInt8 * o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture) 306 { 307 UInt8 *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2];308 unsigned rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2],halfheight = height / 2, halfwidth = width / 2;309 unsignedy, x;281 static FASTCALL void Y420toY422_x86_scalar(AVFrame * picture, UInt8 * o, int outRB, unsigned width, unsigned height) 282 { 283 UInt8 *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2]; 284 int rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2]; 285 int halfheight = height / 2, halfwidth = width / 2; 286 int y, x; 310 287 311 288 for (y = 0; y < halfheight; y ++) { … … 313 290 314 291 for (x = 0; x < halfwidth; x++) { 315 unsignedx4 = x*4, x2 = x*2;292 int x4 = x*4, x2 = x*2; 316 293 o2[x4] = o[x4] = u[x]; 317 294 o[x4 + 1] = yc[x2]; … … 330 307 HandleLastRow(o, yc, u, v, halfwidth, height); 331 308 } 332 333 void Y420toY422(UInt8 * o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture)334 {335 uintptr_t yc = (uintptr_t)picture->data[0];336 337 //make sure the ffmpeg picture buffers are aligned enough, they're only guaranteed to be 8-byte for some reason...338 if (!unlikely((yc | picture->linesize[0]) % 16)) Y420toY422_sse2(o, outRB, width, height, picture);339 else Y420toY422_x86_scalar(o, outRB, width, height, picture);340 }341 309 #endif 342 310 343 void YA420toV408(UInt8* o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture) 344 { 345 UInt8 *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2], *a = picture->data[3]; 346 unsigned rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2], rA = picture->linesize[3], y, x; 311 //Y420+Alpha Planar to V408 (YUV 4:4:4+Alpha 32-bit packed) 312 //Could be fully unrolled to avoid x/2 313 static FASTCALL void YA420toV408(AVFrame *picture, UInt8 *o, int outRB, unsigned width, unsigned height) 314 { 315 UInt8 *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2], *a = picture->data[3]; 316 int rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2], rA = picture->linesize[3]; 317 unsigned y, x; 347 318 348 319 for (y = 0; y < height; y++) { … … 364 335 } 365 336 366 void BGR24toRGB24(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture) 367 { 368 unsigned i, j; 337 static FASTCALL void BGR24toRGB24(AVFrame *picture, UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 338 { 369 339 UInt8 *srcPtr = picture->data[0]; 370 371 for (i = 0; i < height; ++i) 372 { 373 for (j = 0; j < width; j ++) 340 int srcRB = picture->linesize[0]; 341 int x, y; 342 343 for (y = 0; y < height; y++) 344 { 345 for (x = 0; x < width; x++) 374 346 { 375 unsigned j3 = j* 3;376 baseAddr[ j3] = srcPtr[j3+2];377 baseAddr[ j3+1] = srcPtr[j3+1];378 baseAddr[ j3+2] = srcPtr[j3];347 unsigned x3 = x * 3; 348 baseAddr[x3] = srcPtr[x3+2]; 349 baseAddr[x3+1] = srcPtr[x3+1]; 350 baseAddr[x3+2] = srcPtr[x3]; 379 351 } 380 352 baseAddr += rowBytes; 381 srcPtr += picture->linesize[0];382 } 383 } 384 385 void RGB32toRGB32(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture) 386 { 387 unsigned y; 353 srcPtr += srcRB; 354 } 355 } 356 357 //Native-endian XRGB32 to big-endian XRGB32 358 static FASTCALL void RGB32toRGB32(AVFrame *picture, UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 359 { 388 360 UInt8 *srcPtr = picture->data[0]; 389 361 int srcRB = picture->linesize[0]; 362 int y; 363 390 364 for (y = 0; y < height; y++) { 391 365 #ifdef __BIG_ENDIAN__ 392 366 memcpy(baseAddr, srcPtr, width * 4); 393 367 #else 394 unsigned x;395 368 UInt32 *oRow = (UInt32 *)baseAddr, *iRow = (UInt32 *)srcPtr; 396 for (x = 0; x < width; x++) {oRow[x] = EndianU32_BtoN(iRow[x]);} 369 int x; 370 for (x = 0; x < width; x++) {oRow[x] = EndianU32_NtoB(iRow[x]);} 397 371 #endif 398 372 399 373 baseAddr += rowBytes; 400 srcPtr += picture->linesize[0]; 401 } 402 } 403 404 void RGB24toRGB24(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture) 405 { 406 unsigned y; 374 srcPtr += srcRB; 375 } 376 } 377 378 static FASTCALL void RGB24toRGB24(AVFrame *picture, UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 379 { 407 380 UInt8 *srcPtr = picture->data[0]; 381 int srcRB = picture->linesize[0]; 382 int y; 408 383 409 384 for (y = 0; y < height; y++) { … … 411 386 412 387 baseAddr += rowBytes; 413 srcPtr += picture->linesize[0]; 414 } 415 } 416 417 void Y422toY422(UInt8* o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture) 418 { 419 UInt8 *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2]; 420 unsigned rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2], y, x, halfwidth = width / 2; 388 srcPtr += srcRB; 389 } 390 } 391 392 static FASTCALL void Y422toY422(AVFrame *picture, UInt8 *o, int outRB, unsigned width, unsigned height) 393 { 394 UInt8 *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2]; 395 int rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2]; 396 int x, y, halfwidth = width / 2; 421 397 422 398 for (y = 0; y < height; y++) { 423 399 for (x = 0; x < halfwidth; x++) { 424 unsignedx2 = x * 2, x4 = x * 4;400 int x2 = x * 2, x4 = x * 4; 425 401 o[x4] = u[x]; 426 402 o[x4 + 1] = yc[x2]; … … 435 411 } 436 412 } 413 414 static void ClearRGB(UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height, int bytesPerPixel) 415 { 416 int y; 417 418 for (y = 0; y < height; y++) { 419 memset(baseAddr, 0, width * bytesPerPixel); 420 421 baseAddr += rowBytes; 422 } 423 } 424 425 static FASTCALL void ClearRGB32(UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 426 { 427 ClearRGB(baseAddr, rowBytes, width, height, 4); 428 } 429 430 static FASTCALL void ClearRGB24(UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 431 { 432 ClearRGB(baseAddr, rowBytes, width, height, 3); 433 } 434 435 static FASTCALL void ClearV408(UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 436 { 437 int x, y; 438 439 for (y = 0; y < height; y++) 440 { 441 for (x = 0; x < width; x++) 442 { 443 unsigned x4 = x * 4; 444 baseAddr[x4] = 0x80; //zero chroma 445 baseAddr[x4+1] = 0x10; //black 446 baseAddr[x4+2] = 0x80; 447 baseAddr[x4+3] = 0xEB; //opaque 448 } 449 baseAddr += rowBytes; 450 } 451 } 452 453 static FASTCALL void ClearY422(UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 454 { 455 int x, y; 456 457 for (y = 0; y < height; y++) 458 { 459 for (x = 0; x < width; x++) 460 { 461 unsigned x2 = x * 2; 462 baseAddr[x2] = 0x80; //zero chroma 463 baseAddr[x2+1] = 0x10; //black 464 } 465 baseAddr += rowBytes; 466 } 467 } 468 469 static FASTCALL void ClearNone(UInt8 *baseAddr, int rowBytes, unsigned width, unsigned height) 470 { 471 } 472 473 int ColorConversionFindFor(ColorConversionFuncs *funcs, enum PixelFormat ffPixFmt, AVFrame *ffPicture, OSType qtPixFmt) 474 { 475 if (qtPixFmt == kYUV420CodecType && ffPixFmt == PIX_FMT_YUV420P) 476 { 477 funcs->clear = ClearNone; 478 funcs->convert = FastY420; 479 } 480 else if (qtPixFmt == k2vuyPixelFormat && ffPixFmt == PIX_FMT_YUV420P) 481 { 482 funcs->clear = ClearY422; 483 484 #ifdef __ppc__ 485 if (IsAltivecSupported()) 486 funcs->convert = Y420toY422_ppc_altivec; 487 else 488 funcs->convert = Y420toY422_ppc_scalar; 489 #else 490 //can't set this without the first real frame 491 if (ffPicture) { 492 if (ffPicture->linesize[0] % 16) 493 funcs->convert = Y420toY422_x86_scalar; 494 else 495 funcs->convert = Y420toY422_sse2; 496 } 497 #endif 498 } 499 else if (qtPixFmt == k24RGBPixelFormat && ffPixFmt == PIX_FMT_BGR24) 500 { 501 funcs->clear = ClearRGB24; 502 funcs->convert = BGR24toRGB24; 503 } 504 else if (qtPixFmt == k32ARGBPixelFormat && ffPixFmt == PIX_FMT_RGB32) 505 { 506 funcs->clear = ClearRGB32; 507 funcs->convert = RGB32toRGB32; 508 } 509 else if (qtPixFmt == k24RGBPixelFormat && ffPixFmt == PIX_FMT_RGB24) 510 { 511 funcs->clear = ClearRGB24; 512 funcs->convert = RGB24toRGB24; 513 } 514 else if (qtPixFmt == k2vuyPixelFormat && ffPixFmt == PIX_FMT_YUV422P) 515 { 516 funcs->clear = ClearY422; 517 funcs->convert = Y422toY422; 518 } 519 else if (qtPixFmt == k4444YpCbCrA8PixelFormat && ffPixFmt == PIX_FMT_YUVA420P) 520 { 521 funcs->clear = ClearV408; 522 funcs->convert = YA420toV408; 523 } 524 else 525 { 526 return paramErr; 527 } 528 529 return noErr; 530 } trunk/ColorConversions.h
r887 r1027 19 19 20 20 #include <Carbon/Carbon.h> 21 #include " avcodec.h"21 #include "libavcodec/avcodec.h" 22 22 23 extern void FastY420(UInt8 *baseAddr, AVFrame *picture); 24 extern void Y420toY422(UInt8* baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame * picture); 25 extern void YA420toV408(UInt8* o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture); 26 extern void RGB32toRGB32(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture); 27 extern void RGB24toRGB24(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture); 28 extern void BGR24toRGB24(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture); 29 extern void Y422toY422(UInt8* o, unsigned outRB, unsigned width, unsigned height, AVFrame * picture); 23 #ifndef __i386__ 24 #define FASTCALL 25 #else 26 #define FASTCALL __attribute__((fastcall)) 27 #endif 28 29 typedef void ColorConversionFunc(AVFrame *inPicture, UInt8 *outBaseAddr, int outRowBytes, unsigned outWidth, unsigned outHeight) FASTCALL; 30 typedef ColorConversionFunc *ColorConversionFuncPtr; 31 typedef void ColorClearFunc(UInt8 *outBaseAddr, int outRowBytes, unsigned outWidth, unsigned outHeight) FASTCALL; 32 typedef ColorClearFunc *ColorClearFuncPtr; 33 34 typedef struct ColorConversionFuncs { 35 ColorConversionFuncPtr convert; 36 ColorClearFuncPtr clear; 37 } ColorConversionFuncs; 38 39 extern int ColorConversionFindFor(ColorConversionFuncs *funcs, enum PixelFormat ffPixFmt, AVFrame *ffPicture, OSType qtPixFmt); trunk/CommonUtils.c
r1008 r1027 387 387 return forced; 388 388 } 389 390 int IsAltivecSupported() 391 { 392 static int altivec = -1; 393 394 if (altivec == -1) { 395 long response = 0; 396 int err = Gestalt(gestaltPowerPCProcessorFeatures, &response); 397 398 altivec = !err && ((response & gestaltPowerPCHasVectorInstructions) != 0); 399 } 400 401 return altivec; 402 } trunk/CommonUtils.h
r1008 r1027 41 41 int IsFrameDroppingEnabled(); 42 42 int forcePerianToDecode(); 43 44 int IsAltivecSupported(); 43 45 44 46 #ifdef __cplusplus trunk/FFusionCodec.c
r1008 r1027 132 132 struct decode_glob decode; 133 133 struct decode_stats stats; 134 ColorConversionFuncs colorConv; 134 135 } FFusionGlobalsRecord, *FFusionGlobals; 135 136 … … 1349 1350 OSErr err = noErr; 1350 1351 FFusionDecompressRecord *myDrp = (FFusionDecompressRecord *)drp->userDecompressRecord; 1351 int i, j;1352 AVFrame *picture; 1352 1353 1353 1354 glob->stats.type[drp->frameType].draw_calls++; … … 1355 1356 FFusionDebugPrint("%p DrawBand #%d. (%sdecoded)\n", glob, myDrp->frameNumber, not(myDrp->decoded)); 1356 1357 1357 if(!myDrp->decoded) 1358 if(!myDrp->decoded) { 1358 1359 err = FFusionCodecDecodeBand(glob, drp, 0); 1359 1360 AVFrame *picture; 1360 1361 if (err) goto err; 1362 } 1361 1363 1362 1364 if (myDrp->buffer) … … 1374 1376 else if(glob->lastDisplayedFrame.data[0] != NULL) 1375 1377 //Display last frame 1376 picture = &(glob->lastDisplayedFrame); 1377 else 1378 { 1379 //Can't display anything so put up a black frame 1380 Ptr addr = drp->baseAddr; 1381 for(i=0; i<myDrp->height; i++) 1382 { 1383 for(j=0; j<myDrp->width*2; j+=2) 1384 { 1385 addr[j] = 0x80; 1386 addr[j+1] = 0x10; 1387 addr[j+2] = 0x80; 1388 addr[j+3] = 0x10; 1389 } 1390 addr += drp->rowBytes; 1391 } 1392 return noErr; 1378 picture = &glob->lastDisplayedFrame; 1379 else { 1380 //Display black (no frame decoded yet) 1381 1382 if (!glob->colorConv.clear) { 1383 err = ColorConversionFindFor(&glob->colorConv, glob->avContext->pix_fmt, NULL, myDrp->pixelFormat); 1384 1385 if (err) goto err; 1386 } 1387 1388 glob->colorConv.clear((UInt8*)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height); 1389 return noErr; 1393 1390 } 1394 1391 } 1395 1392 else 1396 1393 { 1397 memcpy(&(glob->lastDisplayedFrame), picture, sizeof(AVFrame)); 1398 } 1399 1400 if (myDrp->pixelFormat == 'y420' && glob->avContext->pix_fmt == PIX_FMT_YUV420P) 1401 { 1402 FastY420((UInt8 *)drp->baseAddr, picture); 1403 } 1404 else if (myDrp->pixelFormat == k2vuyPixelFormat && glob->avContext->pix_fmt == PIX_FMT_YUV420P) 1405 { 1406 Y420toY422((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1407 } 1408 else if (myDrp->pixelFormat == k24RGBPixelFormat && glob->avContext->pix_fmt == PIX_FMT_BGR24) 1409 { 1410 BGR24toRGB24((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1411 } 1412 else if (myDrp->pixelFormat == k32ARGBPixelFormat && glob->avContext->pix_fmt == PIX_FMT_RGB32) 1413 { 1414 RGB32toRGB32((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1415 } 1416 else if (myDrp->pixelFormat == k24RGBPixelFormat && glob->avContext->pix_fmt == PIX_FMT_RGB24) 1417 { 1418 RGB24toRGB24((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1419 } 1420 else if (myDrp->pixelFormat == k2vuyPixelFormat && glob->avContext->pix_fmt == PIX_FMT_YUV422P) 1421 { 1422 Y422toY422((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1423 } 1424 else if (myDrp->pixelFormat == k4444YpCbCrA8PixelFormat && glob->avContext->pix_fmt == PIX_FMT_YUVA420P) 1425 { 1426 YA420toV408((UInt8 *)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height, picture); 1427 } 1428 else 1429 { 1430 Codecprintf(glob->fileLog, "Unsupported conversion from PIX_FMT %d to %c%c%c%c (%08x) buffer\n", 1431 glob->avContext->pix_fmt, myDrp->pixelFormat >> 24 & 0xff, myDrp->pixelFormat >> 16 & 0xff, 1432 myDrp->pixelFormat >> 8 & 0xff, myDrp->pixelFormat & 0xff, myDrp->pixelFormat); 1433 } 1434 1394 if (myDrp->buffer) 1395 glob->lastDisplayedFrame = *picture; 1396 } 1397 1398 if (!glob->colorConv.convert) { 1399 err = ColorConversionFindFor(&glob->colorConv, glob->avContext->pix_fmt, picture, myDrp->pixelFormat); 1400 1401 if (err) { 1402 Codecprintf(glob->fileLog, "Unsupported conversion from pixel format %d to %s (%08x) buffer\n", 1403 glob->avContext->pix_fmt, FourCCString(myDrp->pixelFormat), myDrp->pixelFormat); 1404 goto err; 1405 } 1406 } 1407 1408 glob->colorConv.convert(picture, (UInt8*)drp->baseAddr, drp->rowBytes, myDrp->width, myDrp->height); 1409 1410 err: 1435 1411 return err; 1436 1412 } trunk/Patches/ffmpeg-no-interlaced.diff
r939 r1027 1 1 Index: ffmpeg/libavcodec/h264.h 2 2 =================================================================== 3 --- ffmpeg/libavcodec/h264.h (revision 1 4508)3 --- ffmpeg/libavcodec/h264.h (revision 17451) 4 4 +++ ffmpeg/libavcodec/h264.h (working copy) 5 @@ -55, 7 +55,7@@5 @@ -55,10 +55,13 @@ 6 6 7 7 /* Compiling in interlaced support reduces the speed … … 10 10 +//#define ALLOW_INTERLACE 11 11 12 #define ALLOW_NOCHROMA 12 -#define ALLOW_NOCHROMA 13 +//#define ALLOW_NOCHROMA 13 14 15 +#undef CODEC_FLAG2_CHUNKS 16 +#define CODEC_FLAG2_CHUNKS 0 17 + 18 /** 19 * The maximum number of slices supported by the decoder. 20 * must be a power of 2 trunk/Perian.xcodeproj/project.pbxproj
r1018 r1027 59 59 buildConfigurationList = F5CFD2EA0B5012E800616865 /* Build configuration list for PBXAggregateTarget "A52Codec" */; 60 60 buildPhases = ( 61 3D79C0540DFBA1FF00EEFE22 /* ShellScript */,62 61 F5CFD2E00B5012BC00616865 /* CopyFiles */, 63 62 F5CFD2E30B5012DB00616865 /* CopyFiles */, … … 1562 1561 runOnlyForDeploymentPostprocessing = 0; 1563 1562 shellPath = /bin/sh; 1564 shellScript = "# Xcode auto-versioning script for Subversion\n# by Axel Andersson, modified by Daniel Jalkut to add\n# \"--revision HEAD\" to the svn info line, which allows\n# the latest revision to always be used.\n\n# further modified by Augie Fackler to be gross and sh-based in places\n# so that you can have svn installed anywhere\nPATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin\nffmpeg_rev=`cat \"$SYMROOT/Universal/buildid\"`\nREV=`svnversion -n ./`\necho $REV\n\necho | perl <<EOF\nuse strict;\ndie \"\\$0: Must be run from Xcode\" unless \\$ENV{\"BUILT_PRODUCTS_DIR\"};\n\nmy \\$INFO = \"\\$ENV{BUILT_PRODUCTS_DIR}/\\$ENV{WRAPPER_NAME}/Contents/Info.plist\";\n\nmy \\$version = \"$REV\";\n\n# (Match the last group of digits and optional letter M/S):\n\n# ugly yet functional (barely) regex by Daniel Jalkut:\n#$version =~ s/([\\d]*:)(\\d+[M|S]*).*/$2/;\n\n# better yet still functional regex via Kevin \"Regex Nerd\" Ballard\n(\\$version =~ m/\\d+[MS]*\\$/) && (\\$version = \\$&);\n\nopen(FH, \"\\$INFO\") or die \"\\$0: \\$INFO: $!\";\nmy \\$info = join(\"\", <FH>);\nclose(FH);\n\n#\\$info =~ s/([\\t ]+<key>CFBundleVersion<\\/key>\\n[\\t ]+<string>).*?(<\\/string>)/\\$1\\$version\\$2/;\n\\$info =~ s/SVNREVISION/\\$version/;\n\\$info =~ s/FFMPEGREVISION/$ffmpeg_rev/;\n\nopen(FH, \">\\$INFO\") or die \"\\$0: \\$INFO: \\$!\";\nprint FH \\$info;\nclose(FH);\nEOF\n"; 1565 }; 1566 3D79C0540DFBA1FF00EEFE22 /* ShellScript */ = { 1567 isa = PBXShellScriptBuildPhase; 1568 buildActionMask = 2147483647; 1569 files = ( 1570 ); 1571 inputPaths = ( 1572 ); 1573 outputPaths = ( 1574 ); 1575 runOnlyForDeploymentPostprocessing = 0; 1576 shellPath = /bin/sh; 1577 shellScript = "pushd a52codec/build\nln -s Deployment+Debug Development || true\nln -s Development Deployment || true\nln -s Deployment Deployment+Debug || true\npopd"; 1563 shellScript = "# Xcode auto-versioning script for Subversion\n# by Axel Andersson, modified by Daniel Jalkut to add\n# \"--revision HEAD\" to the svn info line, which allows\n# the latest revision to always be used.\n\n# further modified by Augie Fackler to be gross and sh-based in places\n# so that you can have svn installed anywhere\nPATH=/sw/bin:/opt/local/bin:/usr/local/bin:/usr/bin:$PATH\nffmpeg_rev=`cat \"$SYMROOT/Universal/buildid\"`\nREV=`svnversion -n ./`\necho $REV\n\necho | perl <<EOF\nuse strict;\ndie \"\\$0: Must be run from Xcode\" unless \\$ENV{\"BUILT_PRODUCTS_DIR\"};\n\nmy \\$INFO = \"\\$ENV{BUILT_PRODUCTS_DIR}/\\$ENV{WRAPPER_NAME}/Contents/Info.plist\";\n\nmy \\$version = \"$REV\";\n\n# (Match the last group of digits and optional letter M/S):\n\n# ugly yet functional (barely) regex by Daniel Jalkut:\n#$version =~ s/([\\d]*:)(\\d+[M|S]*).*/$2/;\n\n# better yet still functional regex via Kevin \"Regex Nerd\" Ballard\n(\\$version =~ m/\\d+[MS]*\\$/) && (\\$version = \\$&);\n\nopen(FH, \"\\$INFO\") or die \"\\$0: \\$INFO: $!\";\nmy \\$info = join(\"\", <FH>);\nclose(FH);\n\n#\\$info =~ s/([\\t ]+<key>CFBundleVersion<\\/key>\\n[\\t ]+<string>).*?(<\\/string>)/\\$1\\$version\\$2/;\n\\$info =~ s/SVNREVISION/\\$version/;\n\\$info =~ s/FFMPEGREVISION/$ffmpeg_rev/;\n\nopen(FH, \">\\$INFO\") or die \"\\$0: \\$INFO: \\$!\";\nprint FH \\$info;\nclose(FH);\nEOF\n"; 1578 1564 }; 1579 1565 F5121EB60EB3A54A0048EF67 /* ShellScript */ = { … … 2121 2107 LIBRARY_SEARCH_PATHS = $SYMROOT/Universal; 2122 2108 OTHER_CFLAGS = "$(OTHER_CFLAGS_$(CURRENT_ARCH))"; 2123 OTHER_CFLAGS_i386 = "-march=pentium-m - mtune=nocona$(OTHER_CFLAGS)";2124 OTHER_CFLAGS_ppc = " $(OTHER_CFLAGS)";2109 OTHER_CFLAGS_i386 = "-march=pentium-m -frerun-cse-after-loop $(OTHER_CFLAGS)"; 2110 OTHER_CFLAGS_ppc = "-mcpu=G3 -mtune=G5 -funroll-loops -mmultiple $(OTHER_CFLAGS)"; 2125 2111 OTHER_LDFLAGS = ( 2126 2112 "-framework", trunk/Subtitles/SubATSUIRenderer.m
r1013 r1027 24 24 ATSUStyle style; 25 25 CGColorRef primaryColor, outlineColor, shadowColor; 26 Float32 outlineRadius, shadowDist, scaleX, scaleY, primaryAlpha, outlineAlpha, angle ;26 Float32 outlineRadius, shadowDist, scaleX, scaleY, primaryAlpha, outlineAlpha, angle, platformSizeScale, fontSize; 27 27 BOOL blurEdges; 28 ATSUFontID font; 29 ATSUVerticalCharacterType fontVertical; 28 30 } 29 31 -(SubATSUISpanEx*)initWithStyle:(ATSUStyle)style_ subStyle:(SubStyle*)sstyle colorSpace:(CGColorSpaceRef)cs; … … 73 75 -(SubATSUISpanEx*)initWithStyle:(ATSUStyle)style_ subStyle:(SubStyle*)sstyle colorSpace:(CGColorSpaceRef)cs 74 76 { 77 ByteCount unused; 78 75 79 if (self = [super init]) { 76 80 ATSUCreateAndCopyStyle(style_, &style); … … 86 90 scaleY = sstyle->scaleY / 100.; 87 91 angle = sstyle->angle; 92 platformSizeScale = sstyle->platformSizeScale; 93 fontSize = sstyle->size; 94 ATSUGetAttribute(style, kATSUFontTag, sizeof(ATSUFontID), &font, &unused); 95 ATSUGetAttribute(style, kATSUVerticalCharacterTag, sizeof(ATSUVerticalCharacterType), &fontVertical, &unused); 88 96 } 89 97 … … 106 114 ret->scaleY = scaleY; 107 115 ret->angle = angle; 116 ret->platformSizeScale = platformSizeScale; 117 ret->fontSize = fontSize; 118 ret->font = font; 119 ret->fontVertical = fontVertical; 108 120 109 121 return [ret autorelease]; … … 308 320 // XXX: Assumes ATSUFontID = ATSFontRef. This is true. 309 321 static ATSUFontID GetFontIDForSSAName(NSString *name) 310 { 322 { 323 if (fontIDCache) { 324 NSNumber *idN = [fontIDCache objectForKey:[name lowercaseString]]; 325 326 if (idN) return [idN intValue]; 327 } else 328 fontIDCache = [[NSMutableDictionary alloc] init]; 329 311 330 ByteCount nlen = [name length]; 312 331 unichar *uname = (unichar*)[name cStringUsingEncoding:NSUnicodeStringEncoding]; 313 314 if (!fontIDCache) fontIDCache = [[NSMutableDictionary alloc] init];315 316 NSNumber *idN = [fontIDCache objectForKey:[name lowercaseString]];317 318 if (idN) return [idN intValue];319 320 332 ATSUFontID font; 321 333 … … 366 378 ATSStyleRenderingOptions opt = kATSStyleApplyAntiAliasing; 367 379 Fixed size; 368 Boolean b = s-> bold, i = s->italic, u = s->underline, st = s->strikeout;380 Boolean b = s->weight > 0, i = s->italic, u = s->underline, st = s->strikeout; 369 381 ATSUStyle style; 370 382 … … 372 384 373 385 if (!s->platformSizeScale) s->platformSizeScale = GetWinFontSizeScale(fontRef); 374 size = FloatToFixed(s->size * s->platformSizeScale * screenScaleY); 386 size = FloatToFixed(s->size * s->platformSizeScale * screenScaleY); //FIXME several other values also change relative to PlayRes but aren't handled 375 387 376 388 ATSUCreateStyle(&style); … … 416 428 SubATSUISpanEx *spanEx = ex; 417 429 [spanEx release]; 430 } 431 432 static void UpdateFontNameSize(SubATSUISpanEx *spanEx, float screenScale) 433 { 434 Fixed fSize = FloatToFixed(spanEx->fontSize * spanEx->platformSizeScale * screenScale); 435 SetATSUStyleOther(spanEx->style, kATSUFontTag, sizeof(ATSUFontID), &spanEx->font); 436 SetATSUStyleOther(spanEx->style, kATSUVerticalCharacterTag, sizeof(ATSUVerticalCharacterType), &spanEx->fontVertical); 437 SetATSUStyleOther(spanEx->style, kATSUSizeTag, sizeof(Fixed), &fSize); 418 438 } 419 439 … … 443 463 switch (tag) { 444 464 case tag_b: 445 bv(); 465 bv(); // XXX font weight variations 446 466 SetATSUStyleFlag(spanEx->style, kATSUQDBoldfaceTag, bval != 0); 447 467 break; … … 470 490 case tag_fn: 471 491 sv(); 472 { 473 ATSUVerticalCharacterType vertical = ParseFontVerticality(&sval) ? kATSUStronglyVertical : kATSUStronglyHorizontal; 474 ATSUFontID font = GetFontIDForSSAName(sval); 475 476 if (font) { 477 SetATSUStyleFlag(spanEx->style, kATSUVerticalCharacterTag, vertical); 478 SetATSUStyleOther(spanEx->style, kATSUFontTag, sizeof(ATSUFontID), &font); 479 } 480 } 492 spanEx->fontVertical = ParseFontVerticality(&sval) ? kATSUStronglyVertical : kATSUStronglyHorizontal; 493 spanEx->font = GetFontIDForSSAName(sval); 494 UpdateFontNameSize(spanEx, screenScaleY); 481 495 break; 482 496 case tag_fs: 483 497 fv(); 484 fixval = FloatToFixed(fval * div->styleLine->platformSizeScale);485 SetATSUStyleOther(spanEx->style, kATSUSizeTag, sizeof(Fixed), &fixval);498 spanEx->fontSize = fval; 499 UpdateFontNameSize(spanEx, screenScaleY); 486 500 break; 487 501 case tag_1c: … … 523 537 break; 524 538 case tag_frz: 539 fv(); 525 540 if (!isFirstSpan) div->render_complexity |= renderComplexTransforms; // this one's hard 526 fv();527 541 spanEx->angle = fval; 528 542 break; … … 562 576 case tag_be: 563 577 bv(); 564 if (!isFirstSpan) div->render_complexity |= renderMultipleParts; 578 if (!isFirstSpan) div->render_complexity |= renderMultipleParts; // XXX blur edges 565 579 spanEx->blurEdges = bval; 566 580 break; trunk/Subtitles/SubContext.h
r923 r1027 29 29 Float32 outlineRadius, shadowDist; 30 30 unsigned marginL, marginR, marginV; 31 BOOL bold, italic, underline, strikeout; 31 Float32 weight; // 0/1 = not bold/bold, > 1 is a font weight 32 BOOL italic, underline, strikeout; 32 33 UInt8 alignH, alignV, borderStyle; 33 34 __strong void* ex; trunk/Subtitles/SubContext.m
r923 r1027 68 68 if ([*fontname characterAtIndex:0] == '@') { 69 69 *fontname = [*fontname substringFromIndex:1]; 70 return YES;70 //return YES; // XXX vertical 71 71 } 72 72 return NO; … … 89 89 sty->shadowDist = 2; 90 90 sty->marginL = sty->marginR = sty->marginV = 20; 91 sty-> bold = YES;91 sty->weight = 1; 92 92 sty->italic = sty->underline = sty->strikeout = NO; 93 93 sty->alignH = kSubAlignmentCenter; … … 121 121 cv(outlineColor, OutlineColour); 122 122 cv(shadowColor, ShadowColour); 123 bv(bold, Bold);123 fv(weight, Bold); 124 124 bv(italic, Italic); 125 125 bv(underline, Underline); … … 138 138 if (!scaleX) scaleX = 100; 139 139 if (!scaleY) scaleY = 100; 140 if (weight == -1) weight = 1; 140 141 141 142 UInt8 align = [[s objectForKey:@"Alignment"] intValue]; trunk/Subtitles/SubParsing.h
r887 r1027 27 27 int posX, posY; 28 28 UInt8 alignH, alignV, wrapStyle, render_complexity; 29 BOOL is_shape,positioned;29 BOOL positioned; 30 30 31 31 unsigned layer; trunk/Subtitles/SubParsing.m.rl
r1016 r1027 65 65 alignH = kSubAlignmentMiddle; alignV = kSubAlignmentBottom; 66 66 67 is_shape =positioned = NO;67 positioned = NO; 68 68 render_complexity = 0; 69 69 } … … 91 91 div->wrapStyle = wrapStyle; 92 92 93 div->is_shape = NO;94 93 div->positioned = positioned; 95 94 div->render_complexity = render_complexity; … … 272 271 unsigned curX, curY; 273 272 int intnum = 0; 274 BOOL reached_end = NO, startNewLayout = NO, setAlignForDiv = NO ;273 BOOL reached_end = NO, startNewLayout = NO, setAlignForDiv = NO, dropThisSpan = NO; 275 274 276 275 %%{ … … 300 299 action shadowa {tag(4a, intnum);} 301 300 action stylerevert {tag(r, strval);} 301 action drawingmode {tag(p, floatnum); dropThisSpan = floatnum > 0;} 302 302 303 303 action paramset {parambegin=p;} … … 390 390 |("fad" "e"? parens) 391 391 |"clip" parens 392 |"p" floatnum 392 |"p" floatnum %drawingmode 393 393 |"pbo" floatnum 394 394 ); … … 420 420 } 421 421 422 action enter_tag { 423 if (p > outputbegin) [div->text appendString:send()]; 422 action enter_tag { 423 if (dropThisSpan) chars_deleted += p - outputbegin; 424 else if (p > outputbegin) [div->text appendString:send()]; 424 425 if (p == pe) reached_end = YES; 425 426 … … 431 432 432 433 last_tag_start = p; 434 dropThisSpan = NO; 433 435 } 434 436 trunk/Subtitles/SubRenderer.h
r743 r1027 13 13 14 14 typedef enum {tag_b=0, tag_i, tag_u, tag_s, tag_bord, tag_shad, tag_be, tag_fn, tag_fs, tag_fscx, tag_fscy, tag_fsp, tag_frx, tag_fry, tag_frz, tag_1c, tag_2c, tag_3c, tag_4c, 15 tag_alpha, tag_1a, tag_2a, tag_3a, tag_4a, tag_r } SSATagType;15 tag_alpha, tag_1a, tag_2a, tag_3a, tag_4a, tag_r, tag_p} SSATagType; 16 16 17 17 #ifndef __OBJC_GC__ trunk/createStaticLibs.sh
r1022 r1027 1 1 #!/bin/sh -v 2 PATH= $PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin2 PATH=/usr/local/bin:/sw/bin:/opt/local/bin:/usr/bin:$PATH 3 3 buildid_ffmpeg="r`svn info ffmpeg | grep -F Revision | awk '{print $2}'`" 4 4 … … 77 77 fi 78 78 79 if [ -e ffmpeg/patched ] ; then80 (cd ffmpeg && svn revert -R . && rm patched)81 fi82 83 patch -p0 < Patches/ffmpeg-h264dsp-crash.diff84 patch -p0 < Patches/ffmpeg-forceinline.diff85 patch -p0 < Patches/ffmpeg-no-interlaced.diff86 patch -p0 < Patches/ffmpeg-faltivec.diff87 patch -p0 < Patches/ffmpeg-h264-nounrollcabac.diff88 touch ffmpeg/patched89 90 # if [ $no_pic -eq 0 ] ; then91 # (cd ffmpeg; patch -p1 < ../Patches/ffmpeg-pic.diff)92 # fi93 94 touch patched95 96 79 if [ "$buildid_ffmpeg" = "$oldbuildid_ffmpeg" ] ; then 97 80 echo "Static ffmpeg libs are up-to-date ; not rebuilding" … … 99 82 echo "Static ffmpeg libs are out-of-date ; rebuilding" 100 83 84 if [ -e ffmpeg/patched ] ; then 85 cd ffmpeg && svn revert -R . && rm patched && cd .. 86 fi 87 88 patch -p0 < Patches/ffmpeg-forceinline.diff 89 patch -p0 < Patches/ffmpeg-no-interlaced.diff 90 patch -p0 < Patches/ffmpeg-faltivec.diff 91 patch -p0 < Patches/ffmpeg-h264-nounrollcabac.diff 92 touch ffmpeg/patched 93 101 94 echo -n "Building " 102 95 if [ $buildi386 -eq $buildppc ] ; then
