Changeset 806
- Timestamp:
- 02/09/08 13:55:44 (2 years ago)
- Files:
-
- branches/perian-1.1/PerianPrefPane.nib/info.nib (modified) (1 diff)
- branches/perian-1.1/PerianPrefPane.nib/keyedobjects.nib (modified) (previous)
- trunk/CAPublicUtility/CAStreamBasicDescription.cpp (modified) (2 diffs)
- trunk/CommonUtils.c (modified) (1 diff)
- trunk/FFusionCodec.c (modified) (15 diffs)
- trunk/FFusionCodec.h (modified) (1 diff)
- trunk/FrameBuffer.c (modified) (1 diff)
- trunk/MatroskaCodecIDs.cpp (modified) (5 diffs)
- trunk/MatroskaImport.cpp (modified) (3 diffs)
- trunk/MatroskaImportPrivate.cpp (modified) (2 diffs)
- trunk/MatroskaImportVersion.h (modified) (1 diff)
- trunk/Patches (added)
- trunk/Patches/ffmpeg.diff (added)
- trunk/Perian.xcodeproj/project.pbxproj (modified) (17 diffs)
- trunk/PerianAviImporter.r (modified) (1 diff)
- trunk/Perian_icon.icns (modified) (previous)
- trunk/Plists/Perian-Info.plist (modified) (2 diffs)
- trunk/Plists/PerianPane-Info.plist (modified) (1 diff)
- trunk/Plists/PerianUpdateChecker-Info.plist (modified) (1 diff)
- trunk/Release/Artwork/periandmgbg.png (modified) (previous)
- trunk/Release/Artwork/periandmgbg.psd (modified) (previous)
- trunk/Release/Changes.txt (modified) (1 diff)
- trunk/Release/Makefile (modified) (1 diff)
- trunk/Release/Read Me.rtf (modified) (4 diffs)
- trunk/Release/dmg_perian.scpt (modified) (previous)
- trunk/Subtitles/SubATSUIRenderer.m (modified) (13 diffs)
- trunk/Subtitles/SubContext.h (modified) (1 diff)
- trunk/Subtitles/SubContext.m (modified) (6 diffs)
- trunk/Subtitles/SubImport.h (modified) (4 diffs)
- trunk/Subtitles/SubImport.mm (modified) (2 diffs)
- trunk/Subtitles/SubParsing.h (modified) (1 diff)
- trunk/Subtitles/SubParsing.m.rl (modified) (1 diff)
- trunk/Subtitles/SubRenderer.h (modified) (1 diff)
- trunk/TextSubCodec.c (modified) (3 diffs)
- trunk/TextSubCodec.r (modified) (1 diff)
- trunk/UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj (modified) (1 diff)
- trunk/VobSubCodec.r (modified) (1 diff)
- trunk/bitstream_info.c (modified) (9 diffs)
- trunk/bitstream_info.h (modified) (1 diff)
- trunk/createStaticLibs.sh (modified) (1 diff)
- trunk/ff_MovieImport.c (modified) (9 diffs)
- trunk/ff_MovieImportVersion.h (modified) (1 diff)
- trunk/ff_dataref.c (modified) (2 diffs)
- trunk/ff_private.c (modified) (2 diffs)
- trunk/ff_private.h (modified) (1 diff)
- trunk/ffmpeg-patch (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/perian-1.1/PerianPrefPane.nib/info.nib
r802 r806 9 9 <key>IBOpenObjects</key> 10 10 <array> 11 <integer> 32</integer>11 <integer>5</integer> 12 12 </array> 13 13 <key>IBSystem Version</key> trunk/CAPublicUtility/CAStreamBasicDescription.cpp
r219 r806 50 50 #include <Endian.h> 51 51 #endif 52 53 #import "CodecIDs.h" 52 54 53 55 const AudioStreamBasicDescription CAStreamBasicDescription::sEmpty = { 0.0, 0, 0, 0, 0, 0, 0, 0, 0 }; … … 272 274 273 275 case kAudioFormatAC3: 276 case kAudioFormatAC3MS: 274 277 strcpy(outName, "AC-3"); 275 278 break; trunk/CommonUtils.c
r585 r806 70 70 { "he", "heb", langHebrew }, 71 71 { "hi", "hin", langHindi }, 72 { " ", "hmn", langHungarian },72 { "hu", "hun", langHungarian }, 73 73 { "is", "ice", langIcelandic }, 74 74 { "is", "isl", langIcelandic }, trunk/FFusionCodec.c
r736 r806 41 41 #include "FrameBuffer.h" 42 42 #include "CommonUtils.h" 43 #include "pthread.h" 43 44 44 45 void inline swapFrame(AVFrame * *a, AVFrame * *b) … … 164 165 #include <QuickTime/ComponentDispatchHelper.c> 165 166 167 void *launchUpdateChecker(void *args) 168 { 169 FSRef *ref = (FSRef *)args; 170 LSOpenFSRef(ref, NULL); 171 free(ref); 172 return NULL; 173 } 174 166 175 void FFusionRunUpdateCheck() 167 176 { … … 181 190 182 191 char fileRep[1024]; 183 FSRef updateCheckRef;192 FSRef *updateCheckRef = malloc(sizeof(FSRef)); 184 193 Boolean doCheck = FALSE; 185 194 186 195 if(CFStringGetFileSystemRepresentation(location, fileRep, 1024)) 187 if(FSPathMakeRef((UInt8 *)fileRep, &updateCheckRef, NULL) == noErr)196 if(FSPathMakeRef((UInt8 *)fileRep, updateCheckRef, NULL) == noErr) 188 197 doCheck = TRUE; 189 198 … … 193 202 CFStringRef absLocation = CFSTR("/Library/PreferencePanes/Perian.prefPane/Contents/Resources/PerianUpdateChecker.app"); 194 203 if(CFStringGetFileSystemRepresentation(absLocation, fileRep, 1024)) 195 if(FSPathMakeRef((UInt8 *)fileRep, &updateCheckRef, NULL) != noErr)204 if(FSPathMakeRef((UInt8 *)fileRep, updateCheckRef, NULL) != noErr) 196 205 return; //We have failed 197 206 } 198 199 LSOpenFSRef(&updateCheckRef, NULL); 207 pthread_t thread; 208 pthread_create(&thread, NULL, launchUpdateChecker, updateCheckRef); 200 209 } 201 210 … … 290 299 Codecprintf(glob->fileLog, "Error opening the base image decompressor! Exiting.\n"); 291 300 } 301 302 // we allocate some space for copying the frame data since we need some padding at the end 303 // for ffmpeg's optimized bitstream readers. Size doesn't really matter, it'll grow if need be 304 FFusionDataSetup(&(glob->data), 256, 64*1024); 292 305 FFusionRunUpdateCheck(); 293 306 } … … 315 328 DisposeImageCodecMPDrawBandUPP(glob->drawBandUPP); 316 329 } 317 318 if (glob->avCodec)319 {320 avcodec_close(glob->avContext);321 }322 330 323 331 if (glob->avContext) … … 326 334 free(glob->avContext->extradata); 327 335 336 if (glob->avContext->codec) avcodec_close(glob->avContext); 328 337 av_free(glob->avContext); 329 338 } … … 344 353 fclose(glob->fileLog); 345 354 355 memset(glob, 0, sizeof(FFusionGlobalsRecord)); 346 356 DisposePtr((Ptr)glob); 347 357 } … … 453 463 long count = 0; 454 464 Handle imgDescExt; 465 OSErr err = noErr; 455 466 456 467 // We first open libavcodec library and the codec corresponding … … 678 689 ffusionParseExtraData(glob->begin.parser, glob->avContext->extradata, glob->avContext->extradata_size); 679 690 691 // XXX: at the moment ffmpeg can't handle interlaced H.264 right 692 // specifically PAFF + spatial prediction 693 if (glob->componentType == 'avc1' && !ffusionIsParsedVideoDecodable(glob->begin.parser)) 694 err = featureUnsupported; 695 680 696 // some hooks into ffmpeg's buffer allocation to get frames in 681 697 // decode order without delay more easily … … 693 709 Codecprintf(glob->fileLog, "Error opening avcodec!\n"); 694 710 695 return -2;711 err = paramErr; 696 712 } 697 713 698 // we allocate some space for copying the frame data since we need some padding at the end699 // for ffmpeg's optimized bitstream readers. Size doesn't really matter, it'll grow if need be700 FFusionDataSetup(&(glob->data), 256, 64*1024);701 714 } 702 715 … … 736 749 index = 0; 737 750 751 if (!err) { 738 752 switch (glob->avContext->pix_fmt) 739 753 { … … 756 770 break; 757 771 } 772 } 758 773 759 774 pos[index++] = 0; … … 771 786 capabilities->flags |= codecCanAsync | codecCanAsyncWhen; 772 787 773 774 return noErr; 788 return err; 775 789 } 776 790 … … 833 847 myDrp->frameData = NULL; 834 848 myDrp->buffer = NULL; 849 850 if (!glob->avContext) { 851 fprintf(stderr, "Perian Codec: QT tried to call BeginBand without preflighting!\n"); 852 return internalComponentErr; 853 } 835 854 836 855 if(myDrp->decoded) trunk/FFusionCodec.h
r708 r806 29 29 //--------------------------------------------------------------------------- 30 30 31 #define kFFusionCodecVersion (0x0003000 2)31 #define kFFusionCodecVersion (0x00030003) 32 32 33 33 #define kDivX1CodecInfoResID 256 trunk/FrameBuffer.c
r641 r806 39 39 free(data->frames[i]); 40 40 } 41 free(data->buffer); 41 free(data->frames); 42 av_free(data->buffer); 42 43 } 43 44 trunk/MatroskaCodecIDs.cpp
r726 r806 427 427 } 428 428 429 static const unsigned char aac_lc_vos[] = {0x11, 0x90}; 430 429 431 static Handle CreateEsdsExt(KaxTrackEntry *tr_entry, bool audio) 430 432 { … … 436 438 uint8_t *vosBuf = codecPrivate ? codecPrivate->GetBuffer() : NULL; 437 439 size_t esdsLen; 440 441 if (!vosBuf) { // minimal AAC-LC descriptor 442 vosBuf = (uint8_t*)aac_lc_vos; 443 vosLen = 2; 444 } 438 445 439 446 Handle esdsExt = NewHandleClear(4); … … 720 727 721 728 case kAudioFormatAC3: 729 case kAudioFormatAC3MS: 722 730 acl = ac3ChannelLayouts[channelIndex]; 723 731 break; … … 753 761 { kAudioFormatMPEGLayer2, 0x50 }, 754 762 { kAudioFormatMPEGLayer3, 0x55 }, 755 { kAudioFormatAC3 , 0x2000 },763 { kAudioFormatAC3MS, 0x2000 }, 756 764 { kAudioFormatDTS, 0x2001 }, 757 765 { kAudioFormatMPEG4AAC, 0xff }, … … 795 803 { kAudioFormatMPEGLayer2, "A_MPEG/L2" }, 796 804 { kAudioFormatMPEGLayer3, "A_MPEG/L3" }, 797 { kAudioFormatAC3 , "A_AC3" },805 { kAudioFormatAC3MS, "A_AC3" }, 798 806 { kAudioFormatAC3MS, "A_AC3" }, 799 807 // anything special for these two? 800 { kAudioFormatAC3 , "A_AC3/BSID9" },801 { kAudioFormatAC3 , "A_AC3/BSID10" },808 { kAudioFormatAC3MS, "A_AC3/BSID9" }, 809 { kAudioFormatAC3MS, "A_AC3/BSID10" }, 802 810 { kAudioFormatXiphVorbis, "A_VORBIS" }, 803 811 { kAudioFormatXiphFLAC, "A_FLAC" }, trunk/MatroskaImport.cpp
r794 r806 116 116 err = store->ImportDataRef((Handle)alias, rAliasType, theMovie, targetTrack, 117 117 usedTrack, atTime, durationAdded, inFlags, outFlags); 118 if (err) goto bail; 119 120 LoadExternalSubtitles(&theFileFSRef, theMovie); 121 118 122 119 bail: 123 120 if (alias) … … 131 128 Track *usedTrack, TimeValue atTime, TimeValue *durationAdded, long inFlags, long *outFlags) 132 129 { 133 returnstore->ImportDataRef(dataRef, dataRefType, theMovie, targetTrack,130 ComponentResult res = store->ImportDataRef(dataRef, dataRefType, theMovie, targetTrack, 134 131 usedTrack, atTime, durationAdded, inFlags, outFlags); 132 133 LoadExternalSubtitlesFromFileDataRef(dataRef, dataRefType, theMovie); 134 return res; 135 135 } 136 136 … … 254 254 // invalid file, validate should catch this 255 255 return invalidMovie; 256 256 257 257 err = SetupMovie(); 258 258 if (err) return err; trunk/MatroskaImportPrivate.cpp
r714 r806 657 657 dataRef, HandleDataHandlerSubType); 658 658 if (chapterMedia == NULL) { 659 Codecprintf(NULL, "MKV: Error creating chapter media %d\n", GetMoviesError()); 659 OSErr err = GetMoviesError(); 660 Codecprintf(NULL, "MKV: Error creating chapter media %d\n", err); 660 661 DisposeMovieTrack(chapterTrack); 661 return GetMoviesError();662 return err; 662 663 } 663 664 … … 966 967 bool replaceSoundDesc = false; 967 968 968 switch ((*desc)->dataFormat) { 969 case kAudioFormatAC3: 970 replaceSoundDesc = parse_ac3_bitstream(&asbd, &acl, block.GetBuffer(0).Buffer(), block.GetFrameSize(0)); 971 break; 969 if (desc) { 970 switch ((*desc)->dataFormat) { 971 case kAudioFormatAC3: 972 case kAudioFormatAC3MS: 973 replaceSoundDesc = parse_ac3_bitstream(&asbd, &acl, block.GetBuffer(0).Buffer(), block.GetFrameSize(0)); 974 break; 975 } 972 976 } 973 977 trunk/MatroskaImportVersion.h
r794 r806 24 24 25 25 // The high word is the codecInterfaceVersion 26 #define kMatroskaImportVersion (0x0002000 1)26 #define kMatroskaImportVersion (0x00020002) trunk/Perian.xcodeproj/project.pbxproj
r792 r806 1804 1804 buildSettings = { 1805 1805 COPY_PHASE_STRIP = NO; 1806 FRAMEWORK_SEARCH_PATHS = (1807 "$(inherited)",1808 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",1809 );1810 FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";1811 1806 GCC_DYNAMIC_NO_PIC = NO; 1812 1807 GCC_ENABLE_FIX_AND_CONTINUE = YES; … … 1836 1831 buildSettings = { 1837 1832 COPY_PHASE_STRIP = YES; 1838 FRAMEWORK_SEARCH_PATHS = (1839 "$(inherited)",1840 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",1841 );1842 FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";1843 1833 GCC_ENABLE_FIX_AND_CONTINUE = NO; 1844 1834 GCC_ENABLE_OBJC_EXCEPTIONS = YES; … … 1868 1858 DEAD_CODE_STRIPPING = NO; 1869 1859 EXPORTED_SYMBOLS_FILE = "$(SOURCE_ROOT)/exportedSymbols"; 1870 FRAMEWORK_SEARCH_PATHS = (1871 "$(inherited)",1872 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",1873 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",1874 );1875 FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";1876 FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";1877 1860 GCC_DYNAMIC_NO_PIC = NO; 1878 1861 GCC_ENABLE_FIX_AND_CONTINUE = YES; … … 1897 1880 INFOPLIST_FILE = "Plists/Perian-Info.plist"; 1898 1881 INSTALL_PATH = "$(HOME)/Library/QuickTime"; 1899 LIBRARY_SEARCH_PATHS = ( 1900 $SYMROOT/Universal, 1901 "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 1902 ); 1903 LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Universal\""; 1882 LIBRARY_SEARCH_PATHS = $SYMROOT/Universal; 1904 1883 OTHER_LDFLAGS = ( 1905 1884 "-framework", … … 1915 1894 PRODUCT_NAME = Perian; 1916 1895 REZ_PREPROCESSOR_DEFINITIONS = ""; 1917 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;1918 1896 WRAPPER_EXTENSION = component; 1919 1897 ZERO_LINK = NO; … … 1929 1907 GCC_DYNAMIC_NO_PIC = NO; 1930 1908 GCC_ENABLE_FIX_AND_CONTINUE = NO; 1909 GCC_ENABLE_OBJC_GC = YES; 1931 1910 GCC_GENERATE_DEBUGGING_SYMBOLS = NO; 1932 1911 GCC_MODEL_TUNING = G5; … … 1947 1926 INFOPLIST_FILE = "Plists/Perian-Info.plist"; 1948 1927 INSTALL_PATH = "$(HOME)/Library/QuickTime"; 1949 LIBRARY_SEARCH_PATHS = ( 1950 $SYMROOT/Universal, 1951 "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 1952 ); 1928 LIBRARY_SEARCH_PATHS = $SYMROOT/Universal; 1953 1929 OTHER_CFLAGS = "$(OTHER_CFLAGS_$(CURRENT_ARCH))"; 1954 1930 OTHER_CFLAGS_i386 = "-march=pentium-m -mtune=nocona $(OTHER_CFLAGS)"; … … 1983 1959 GCC_ALTIVEC_EXTENSIONS = YES; 1984 1960 GCC_MODEL_TUNING = G5; 1961 OTHER_LDFLAGS = ( 1962 "-read_only_relocs", 1963 suppress, 1964 ); 1985 1965 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 1986 1966 }; … … 1999 1979 GCC_STRICT_ALIASING = YES; 2000 1980 MACOSX_DEPLOYMENT_TARGET = 10.4; 1981 OTHER_LDFLAGS = ( 1982 "-read_only_relocs", 1983 suppress, 1984 ); 2001 1985 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 2002 1986 STRIP_INSTALLED_PRODUCT = NO; … … 2049 2033 DEAD_CODE_STRIPPING = YES; 2050 2034 EXPORTED_SYMBOLS_FILE = "$(SOURCE_ROOT)/exportedSymbols"; 2051 FRAMEWORK_SEARCH_PATHS = (2052 "$(inherited)",2053 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",2054 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_2)",2055 );2056 FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";2057 FRAMEWORK_SEARCH_PATHS_QUOTED_2 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";2058 2035 GCC_ALTIVEC_EXTENSIONS = YES; 2059 2036 GCC_DYNAMIC_NO_PIC = NO; 2060 2037 GCC_ENABLE_FIX_AND_CONTINUE = NO; 2038 GCC_ENABLE_OBJC_GC = YES; 2061 2039 GCC_FAST_MATH = YES; 2062 2040 GCC_MODEL_TUNING = G5; … … 2078 2056 INFOPLIST_FILE = "Plists/Perian-Info.plist"; 2079 2057 INSTALL_PATH = "$(HOME)/Library/QuickTime"; 2080 LIBRARY_SEARCH_PATHS = ( 2081 $SYMROOT/Universal, 2082 "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 2083 ); 2084 LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/build/Universal\""; 2058 LIBRARY_SEARCH_PATHS = $SYMROOT/Universal; 2085 2059 OTHER_CFLAGS = "$(OTHER_CFLAGS_$(CURRENT_ARCH))"; 2086 2060 OTHER_CFLAGS_i386 = "-march=pentium-m -mtune=nocona $(OTHER_CFLAGS)"; … … 2096 2070 PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES; 2097 2071 PRODUCT_NAME = Perian; 2098 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;2099 2072 WRAPPER_EXTENSION = component; 2100 2073 ZERO_LINK = NO; … … 2187 2160 PREBINDING = NO; 2188 2161 PRODUCT_NAME = Perian; 2189 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;2190 2162 WRAPPER_EXTENSION = prefPane; 2191 2163 ZERO_LINK = NO; … … 2197 2169 buildSettings = { 2198 2170 COPY_PHASE_STRIP = YES; 2199 FRAMEWORK_SEARCH_PATHS = (2200 "$(inherited)",2201 "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)",2202 );2203 FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SYSTEM_DEVELOPER_DIR)/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks\"";2204 2171 GCC_ENABLE_FIX_AND_CONTINUE = NO; 2205 2172 GCC_ENABLE_OBJC_EXCEPTIONS = YES; … … 2231 2198 GCC_PREPROCESSOR_DEFINITIONS = DEBUG_BUILD; 2232 2199 GCC_STRICT_ALIASING = YES; 2200 OTHER_LDFLAGS = ( 2201 "-read_only_relocs", 2202 suppress, 2203 ); 2233 2204 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; 2234 2205 STRIP_INSTALLED_PRODUCT = NO; … … 2336 2307 PREBINDING = NO; 2337 2308 PRODUCT_NAME = Perian; 2338 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;2339 2309 WRAPPER_EXTENSION = prefPane; 2340 2310 ZERO_LINK = YES; … … 2361 2331 PREBINDING = NO; 2362 2332 PRODUCT_NAME = Perian; 2363 SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;2364 2333 WRAPPER_EXTENSION = prefPane; 2365 2334 ZERO_LINK = NO; trunk/PerianAviImporter.r
r708 r806 21 21 ****************************************************************************/ 22 22 23 #define kChristophManufacturer ' Rafz'23 #define kChristophManufacturer 'Peri' 24 24 25 25 #define thng_RezTemplateVersion 2 trunk/Plists/Perian-Info.plist
r612 r806 8 8 <string>Perian</string> 9 9 <key>CFBundleGetInfoString</key> 10 <string>1. 0.9999(SVNREVISION ffmpeg: FFMPEGREVISION), Copyright 2007 The Perian Team</string>10 <string>1.1 (SVNREVISION ffmpeg: FFMPEGREVISION), Copyright 2007 The Perian Team</string> 11 11 <key>CFBundleIdentifier</key> 12 12 <string>org.perian.Perian</string> … … 16 16 <string>BNDL</string> 17 17 <key>CFBundleShortVersionString</key> 18 <string>1. 0.9999</string>18 <string>1.1</string> 19 19 <key>CFBundleSignature</key> 20 20 <string>????</string> 21 21 <key>CFBundleVersion</key> 22 <string>1. 0.9999</string>22 <string>1.1</string> 23 23 <key>CSResourcesFileMapped</key> 24 24 <string>yes</string> trunk/Plists/PerianPane-Info.plist
r612 r806 33 33 <string>????</string> 34 34 <key>CFBundleVersion</key> 35 <string>1. 0.9999</string>35 <string>1.1</string> 36 36 <key>CFBundleName</key> 37 37 <string>Perian</string> trunk/Plists/PerianUpdateChecker-Info.plist
r612 r806 18 18 <string>????</string> 19 19 <key>CFBundleVersion</key> 20 <string>1. 0.9999</string>20 <string>1.1</string> 21 21 <key>NSMainNibFile</key> 22 22 <string>UpdateCheckerMainMenu</string> trunk/Release/Changes.txt
r731 r806 3 3 - TrueAudio, MP1, and DTS audio support 4 4 - Slice-based multithreaded decoding for MPEG-1/2/H.264 5 - Better support for interlaced H.2646 - Compatibility fixes for QuickTime 7. 2and Leopard5 - Apple H.264 now handles AVCHD/interlaced video 6 - Compatibility fixes for QuickTime 7.4 and Leopard 7 7 - Objective-C GC compatibility 8 8 - Fixed a crash in Toast trunk/Release/Makefile
r528 r806 4 4 # Check the Perian.component target and PerianPane target. 5 5 6 VERSION=1. 0b56 VERSION=1.1 7 7 BETA=FALSE 8 8 SRC_DIR=.. trunk/Release/Read Me.rtf
r792 r806 2 2 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 3 {\colortbl;\red255\green255\blue255;} 4 \margl1440\margr1440\vieww16040\viewh15820\viewkind0 4 5 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural 5 6 6 7 \f0\b\fs24 \cf0 About 7 8 \b0 \ 8 Perian aims at providing a single package to provideall your playback needs. It is a collection of QuickTime components incorporating several libraries:\9 Perian aims to provide a single package for all your playback needs. It is a collection of QuickTime components incorporating several libraries:\ 9 10 \'95 libavcodec, from the ffmpeg project, along with code from the old FFusion component:\ 10 11 \'95 MS-MPEG4 v1 & v2\ 11 12 \'95 DivX\ 12 \'95 3iv X\13 \'95 3ivx\ 13 14 \'95 H.264\ 14 15 \'95 Flash Video\ … … 19 20 \'95 HuffYUV\ 20 21 \'95 ffvhuff\ 21 \'95 MPEG-1 & 2 video\22 \'95 F RAPS\22 \'95 MPEG-1 & 2 Video\ 23 \'95 Fraps (up to v4)\ 23 24 \'95 Windows Media Audio v1 & v2\ 24 25 \'95 Flash ADPCM\ 25 26 \'95 Xiph Vorbis (in Matroska)\ 26 \'95 MPEG Layer II Audio\ 27 \'95 MPEG Layer I and II audio\ 28 \'95 DTS Coherent Acoustics audio\ 29 \'95 Snow wavelet video\ 27 30 \'95 libavformat, from the ffmpeg project. along with AVIImporter.component:\ 28 31 \'95 AVI file format\ … … 30 33 \'95 libmatroska, along with matroska-qt.component:\ 31 34 \'95 MKV file format\ 32 \'95 Subtitle parsing\35 \'95 Subtitles:\ 33 36 \'95 SSA file format\ 34 37 \'95 SRT file format\ 35 \'95 liba52, via A52Codec \38 \'95 liba52, via A52Codec:\ 36 39 \'95 AC3 audio\ 37 40 \ 38 The code is available under the LGPL. The project site is located at <http://trac.perian.org/> and the project subversion repository is located at <http://svn.perian.org/>.\39 The code for A52Codec is available under GPL. The project site is located at <http://trac.cod3r.com/a52codec/> and the project subversion repository is located at <http://svn.cod3r.com/a52codec/>.\41 The code is available under the LGPL. The project site is located at <http://trac.perian.org/> and the project Subversion repository is located at <http://svn.perian.org/>.\ 42 The code for A52Codec is available under the GPL. The project site is located at <http://trac.cod3r.com/a52codec/> and the project Subversion repository is located at <http://svn.cod3r.com/a52codec/>.\ 40 43 \ 41 44 … … 58 61 \b0 \ 59 62 J\'e9r\'f4me Cornet and his FFusion project for giving me the idea and code to start from Christoph N\'e4geli's AVI Importer from his XviD component, which allowed us to leverage libavformat.\ 60 FFMPEG project for providing such a rich library.\ 63 \ 64 The FFmpeg project for providing such a rich library.\ 65 (http://ffmpeg.mplayerhq.hu/)\ 66 \ 61 67 The Mozilla Foundation and Dag \'c5gren for the universal charset detector.\ 68 (http://www.mozilla.org/projects/intl/UniversalCharsetDetection.html, http://wakaba.c3.cx/s/apps/unarchiver.html)\ 69 \ 62 70 Adrian Thurston for the Ragel parser generator.\ 71 (http://www.cs.queensu.ca/~thurston/ragel/)\ 72 \ 63 73 Matroska for their library.\ 74 (http://www.matroska.org/)\ 64 75 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural 65 \cf0 Bryan Bortz for the icon.\ 76 \cf0 \ 77 Bryan Bortz for the icon.\ 78 (http://www.owlboy.com/)\ 66 79 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural 67 \cf0 Ken Aspeslagh for releasing the source to his QuickTime Component Manager (http://macdaddyworld.com/quicktime-component-manager/) which gives us most of the smarts for the component manager tab.\ 80 \cf0 \ 81 All the people that put up with my insane requests for help and free testing, notably MartianSteve from #macsb for the first ICBM test, and Graham Booker for joining up with me and fixing the build every time I add a feature and then run off somewhere like the overcommitted madman I am.\ 82 \ 68 83 \ 69 84 \ trunk/Subtitles/SubATSUIRenderer.m
r731 r806 262 262 free(ubuffer); 263 263 UCDisposeTextBreakLocator(&breakLocator); 264 ATSUDisposeTextLayout(layout); 264 265 [super dealloc]; 265 266 } … … 269 270 free(ubuffer); 270 271 UCDisposeTextBreakLocator(&breakLocator); 272 ATSUDisposeTextLayout(layout); 271 273 [super finalize]; 272 274 } … … 349 351 } 350 352 351 -(void)releaseStyleEx :(void*)ex353 -(void)releaseStyleExtra:(void*)ex 352 354 { 353 355 ATSUDisposeStyle(ex); … … 541 543 } 542 544 543 static void GetTypographicRectangleForLayout(ATSUTextLayout layout, UniCharArrayOffset *breaks, ItemCount breakCount, Fixed *lX, Fixed *lY, Fixed *height, Fixed *width)545 static void GetTypographicRectangleForLayout(ATSUTextLayout layout, UniCharArrayOffset *breaks, ItemCount breakCount, Fixed extraHeight, Fixed *lX, Fixed *lY, Fixed *height, Fixed *width) 544 546 { 545 547 ATSTrapezoid trap = {0}; … … 555 557 ATSUGetGlyphBounds(layout, 0, baseY, breaks[i], end-breaks[i], kATSUseDeviceOrigins, 1, &trap, &trapCount); 556 558 557 baseY += GetLineHeight(layout, breaks[i]) ;559 baseY += GetLineHeight(layout, breaks[i]) + extraHeight; 558 560 559 561 rect.bottom = MAX(trap.lowerLeft.y, trap.lowerRight.y); … … 575 577 *width = largeRect.right - largeRect.left; 576 578 } 579 580 #if 0 581 static void GetImageBoundingBoxForLayout(ATSUTextLayout layout, UniCharArrayOffset *breaks, ItemCount breakCount, Fixed extraHeight, Fixed *lX, Fixed *lY, Fixed *height, Fixed *width) 582 { 583 Rect largeRect = {0}; 584 ATSUTextMeasurement baseY = 0; 585 int i; 586 587 for (i = breakCount; i >= 0; i--) { 588 UniCharArrayOffset end = breaks[i+1]; 589 Rect rect; 590 591 ATSUMeasureTextImage(layout, breaks[i], end-breaks[i], 0, baseY, &rect); 592 593 baseY += GetLineHeight(layout, breaks[i]) + extraHeight; 594 595 if (i == breakCount) largeRect = rect; 596 597 largeRect.bottom = MAX(largeRect.bottom, rect.bottom); 598 largeRect.left = MIN(largeRect.left, rect.left); 599 largeRect.top = MIN(largeRect.top, rect.top); 600 largeRect.right = MAX(largeRect.right, rect.right); 601 } 602 603 604 if (lX) *lX = IntToFixed(largeRect.left); 605 if (lY) *lY = IntToFixed(largeRect.bottom); 606 *height = IntToFixed(largeRect.bottom - largeRect.top); 607 *width = IntToFixed(largeRect.right - largeRect.left); 608 } 609 #endif 577 610 578 611 enum {fillc, strokec}; … … 806 839 ATSUTextMeasurement lineWidth, lineHeight, lineX, lineY; 807 840 UniCharArrayOffset breaks[2] = {thisBreak, thisBreak + lineLen}; 808 GetTypographicRectangleForLayout(layout, breaks, 0, &lineX, &lineY, &lineHeight, &lineWidth);841 GetTypographicRectangleForLayout(layout, breaks, 0, FloatToFixed(spanEx->outlineRadius), &lineX, &lineY, &lineHeight, &lineWidth); 809 842 810 843 CGRect borderRect = CGRectMake(FixedToFloat(lineX + penX), FixedToFloat(penY - lineY), FixedToFloat(lineWidth), FixedToFloat(lineHeight)); … … 867 900 (textType == kTextLayerShadow) ? (penY - FloatToFixed(spanEx->shadowDist)) : penY, c, div, spanEx, textType); 868 901 extraHeight = MAX(extraHeight, spanEx->outlineRadius); 902 lastSpanEx = spanEx; 869 903 } 870 904 … … 954 988 ATSUTextMeasurement imageWidth, imageHeight; 955 989 956 if (div->posX != -1 || div->alignV == kSubAlignmentMiddle) GetTypographicRectangleForLayout(layout, breaks, breakCount, NULL, NULL, &imageHeight, &imageWidth);990 if (div->posX != -1 || div->alignV == kSubAlignmentMiddle) GetTypographicRectangleForLayout(layout, breaks, breakCount, FloatToFixed(div->styleLine->outlineRadius), NULL, NULL, &imageHeight, &imageWidth); 957 991 958 992 if (div->posX == -1) { … … 974 1008 } else penY = centerPen; 975 1009 976 storePen = ¢erPen; breakc.lStart = 0; breakc.lEnd = breakCount+1; breakc.direction = -1;1010 storePen = ¢erPen; breakc.lStart = breakCount; breakc.lEnd = -1; breakc.direction = 1; 977 1011 break; 978 1012 case kSubAlignmentTop: … … 984 1018 break; 985 1019 } 986 } else { 1020 } else { 1021 ATSUTextMeasurement descent; 987 1022 penX = FloatToFixed(div->posX * screenScaleX); 988 1023 penY = FloatToFixed((context->resY - div->posY) * screenScaleY); … … 993 1028 } 994 1029 1030 ATSUGetLineControl(layout, kATSUFromTextBeginning, kATSULineDescentTag, sizeof(ATSUTextMeasurement), &descent, NULL); 1031 995 1032 switch (div->alignV) { 996 1033 case kSubAlignmentMiddle: penY -= imageHeight / 2; break; 997 case kSubAlignmentTop: penY -= imageHeight; 998 } 999 1034 case kSubAlignmentTop: penY -= imageHeight; break; 1035 } 1036 1037 penY += descent; 1038 1000 1039 SetLayoutPositioning(layout, imageWidth, div->alignH); 1001 1040 storePen = NULL; breakc.lStart = breakCount; breakc.lEnd = -1; breakc.direction = 1; … … 1023 1062 } 1024 1063 1025 extern SubtitleRendererPtr SubInitForSSA(char *header, size_t headerLen, int width, int height) 1026 { 1064 SubtitleRendererPtr SubInitForSSA(char *header, size_t headerLen, int width, int height) 1065 { 1066 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 1027 1067 NSString *hdr = [[NSString alloc] initWithBytesNoCopy:(void*)header length:headerLen encoding:NSUTF8StringEncoding freeWhenDone:NO]; 1028 1068 1029 1069 SubtitleRendererPtr s = [[SubATSUIRenderer alloc] initWithSSAHeader:hdr videoWidth:width videoHeight:height]; 1030 1070 [hdr release]; 1071 CFRetain(s); 1072 [pool release]; 1031 1073 return s; 1032 1074 } 1033 1075 1034 extern SubtitleRendererPtr SubInitNonSSA(int width, int height) 1035 { 1036 return [[SubATSUIRenderer alloc] initWithVideoWidth:width videoHeight:height]; 1037 } 1038 1039 extern CGColorSpaceRef SubGetColorSpace(SubtitleRendererPtr s) 1076 SubtitleRendererPtr SubInitNonSSA(int width, int height) 1077 { 1078 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 1079 SubtitleRendererPtr s = [[SubATSUIRenderer alloc] initWithVideoWidth:width videoHeight:height]; 1080 CFRetain(s); 1081 [pool release]; 1082 return s; 1083 } 1084 1085 CGColorSpaceRef SubGetColorSpace(SubtitleRendererPtr s) 1040 1086 { 1041 1087 return s->srgbCSpace; 1042 1088 } 1043 1089 1044 externvoid SubRenderPacket(SubtitleRendererPtr s, CGContextRef c, CFStringRef str, int cWidth, int cHeight)1090 void SubRenderPacket(SubtitleRendererPtr s, CGContextRef c, CFStringRef str, int cWidth, int cHeight) 1045 1091 { 1046 1092 [s renderPacket:(NSString*)str inContext:c width:cWidth height:cHeight]; 1047 1093 } 1048 1094 1049 extern void SubDisposeRenderer(SubtitleRendererPtr s) 1050 { 1095 void SubDisposeRenderer(SubtitleRendererPtr s) 1096 { 1097 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 1098 CFRelease(s); 1051 1099 [s release]; 1100 [pool release]; 1052 1101 } 1053 1102 @end trunk/Subtitles/SubContext.h
r695 r806 30 30 BOOL bold, italic, underline, strikeout; 31 31 UInt8 alignH, alignV, borderStyle; 32 void* ex;32 __strong void* ex; 33 33 Float32 platformSizeScale; 34 34 SubRenderer *delegate; trunk/Subtitles/SubContext.m
r729 r806 52 52 { 53 53 switch (a) { 54 case 1 ... 3: *alignV = kSubAlignmentBottom; break;54 default: case 1 ... 3: *alignV = kSubAlignmentBottom; break; 55 55 case 4 ... 6: *alignV = kSubAlignmentMiddle; break; 56 56 case 7 ... 9: *alignV = kSubAlignmentTop; break; … … 59 59 switch (a) { 60 60 case 1: case 4: case 7: *alignH = kSubAlignmentLeft; break; 61 case 2: case 5: case 8: *alignH = kSubAlignmentCenter; break;61 default: case 2: case 5: case 8: *alignH = kSubAlignmentCenter; break; 62 62 case 3: case 6: case 9: *alignH = kSubAlignmentRight; break; 63 63 } … … 84 84 sty->alignH = kSubAlignmentCenter; 85 85 sty->alignV = kSubAlignmentBottom; 86 sty->borderStyle = 0;86 sty->borderStyle = kSubBorderStyleNormal; 87 87 sty->ex = [delegate completedStyleParsing:sty]; 88 88 sty->delegate = delegate; … … 96 96 delegate = delegate_; 97 97 98 #define sv(fn, n) fn = [ s objectForKey: @""#n]98 #define sv(fn, n) fn = [[s objectForKey: @""#n] retain] 99 99 #define fv(fn, n) fn = [[s objectForKey:@""#n] floatValue] 100 100 #define iv(fn, n) fn = [[s objectForKey:@""#n] intValue] … … 175 175 176 176 // obscure res rules copied from VSFilter 177 if ( !resXS && !resYS) {177 if ((!resXS && !resYS) || (!resX && !resY)) { 178 178 resX = 384; resY = 288; 179 179 } else if (!resYS) { … … 200 200 for (i=0; i < nstyles; i++) { 201 201 NSDictionary *style = [styles_ objectAtIndex:i]; 202 [sdict setObject:[[ SubStyle alloc] initWithDictionary:style scriptVersion:scriptType delegate:delegate]202 [sdict setObject:[[[SubStyle alloc] initWithDictionary:style scriptVersion:scriptType delegate:delegate] autorelease] 203 203 forKey:[style objectForKey:@"Name"]]; 204 204 } trunk/Subtitles/SubImport.h
r674 r806 12 12 #include <QuickTime/QuickTime.h> 13 13 14 #ifndef __OBJC_GC__ 15 #ifndef __strong 16 #define __strong 17 #endif 18 #endif 19 14 20 #ifdef __cplusplus 15 21 extern "C" … … 19 25 short GetFilenameLanguage(CFStringRef filename); 20 26 ComponentResult LoadExternalSubtitles(const FSRef *theFile, Movie theMovie); 27 ComponentResult LoadExternalSubtitlesFromFileDataRef(Handle dataRef, OSType dataRefType, Movie theMovie); 21 28 Track CreatePlaintextSubTrack(Movie theMovie, ImageDescriptionHandle imgDesc, TimeScale timescale, Handle dataRef, OSType dataRefType, FourCharCode subType, Handle imageExtension, Rect movieBox); 22 29 … … 57 64 class CXXSubSerializer 58 65 { 59 void *priv;66 __strong void *priv; 60 67 61 68 public: … … 73 80 class CXXAutoreleasePool 74 81 { 75 void *pool;82 __strong void *pool; 76 83 public: 77 84 CXXAutoreleasePool(); trunk/Subtitles/SubImport.mm
r685 r806 315 315 316 316 bail: 317 [ss release]; 317 318 [pool release]; 318 319 … … 443 444 } 444 445 446 ComponentResult LoadExternalSubtitlesFromFileDataRef(Handle dataRef, OSType dataRefType, Movie theMovie) 447 { 448 if (dataRefType != AliasDataHandlerSubType) return noErr; 449 450 CFStringRef cfPath; 451 FSRef ref; 452 uint8_t path[PATH_MAX]; 453 454 QTGetDataReferenceFullPathCFString(dataRef, dataRefType, kQTPOSIXPathStyle, &cfPath); 455 CFStringGetCString(cfPath, (char*)path, PATH_MAX, kCFStringEncodingUTF8); 456 FSPathMakeRef(path, &ref, NULL); 457 CFRelease(cfPath); 458 459 return LoadExternalSubtitles(&ref, theMovie); 460 } 461 445 462 #pragma mark Obj-C Classes 446 463 trunk/Subtitles/SubParsing.h
r697 r806 37 37 @public; 38 38 UniCharArrayOffset offset; 39 void *ex;39 __strong void *ex; 40 40 SubRenderer *delegate; 41 41 } trunk/Subtitles/SubParsing.m.rl
r731 r806 48 48 { 49 49 int i, sc = [spans count]; 50 NSMutableString *tmp = [NSMutableString stringWithFormat:@"div %d spans:",sc];50 NSMutableString *tmp = [NSMutableString stringWithFormat:@"div \"%@\" with %d spans:", text, sc]; 51 51 for (i = 0; i < sc; i++) {[tmp appendFormat:@" %d",((SubRenderSpan*)[spans objectAtIndex:i])->offset];} 52 52 [tmp appendFormat:@" %d", [text length]]; trunk/Subtitles/SubRenderer.h
r675 r806 15 15 tag_alpha, tag_1a, tag_2a, tag_3a, tag_4a, tag_r} SSATagType; 16 16 17 #ifndef __OBJC_GC__ 18 #ifndef __strong 19 #define __strong 20 #endif 21 #endif 22 17 23 @interface SubRenderer : NSObject 18 24 -(void)completedHeaderParsing:(SubContext*)sc; trunk/TextSubCodec.c
r794 r806 233 233 glob->ssa = NULL; 234 234 235 return noErr;236 }237 238 // ImageCodecBeginBand239 // The ImageCodecBeginBand function allows your image decompressor component to save information about240 // a band before decompressing it. This function is never called at interrupt time. The base image decompressor241 // preserves any changes your component makes to any of the fields in the ImageSubCodecDecompressRecord242 // or CodecDecompressParams structures. If your component supports asynchronous scheduled decompression, it243 // may receive more than one ImageCodecBeginBand call before receiving an ImageCodecDrawBand call.244 pascal ComponentResult TextSubCodecBeginBand(TextSubGlobals glob, CodecDecompressParams *p, ImageSubCodecDecompressRecord *drp, long flags)245 {246 long offsetH, offsetV;247 TextSubDecompressRecord *myDrp = (TextSubDecompressRecord *)drp->userDecompressRecord;248 249 offsetH = (long)(p->dstRect.left - p->dstPixMap.bounds.left) * (long)(p->dstPixMap.pixelSize >> 3);250 offsetV = (long)(p->dstRect.top - p->dstPixMap.bounds.top) * (long)drp->rowBytes;251 252 drp->baseAddr = p->dstPixMap.baseAddr + offsetH + offsetV;253 254 // Let base codec know that all our frames are key frames (a.k.a., sync samples)255 // This allows the base codec to perform frame dropping on our behalf if needed256 drp->frameType = kCodecFrameTypeKey;257 258 myDrp->width = p->dstRect.right - p->dstRect.left;259 myDrp->height = p->dstRect.bottom - p->dstRect.top;260 myDrp->depth = (**p->imageDescription).depth;261 myDrp->dataSize = p->bufferSize;262 263 235 if (!glob->ssa) { 264 236 if ((**p->imageDescription).cType == kSubFormatSSA) { … … 271 243 GetImageDescriptionExtension(p->imageDescription,&ssaheader,kSubFormatSSA,1); 272 244 273 glob->ssa = SubInitForSSA(*ssaheader, GetHandleSize(ssaheader), myDrp->width, myDrp->height);245 glob->ssa = SubInitForSSA(*ssaheader, GetHandleSize(ssaheader), (**p->imageDescription).width, (**p->imageDescription).height); 274 246 } 275 247 } 276 248 277 if (!glob->ssa) glob->ssa = SubInitNonSSA( myDrp->width,myDrp->height);249 if (!glob->ssa) glob->ssa = SubInitNonSSA((**p->imageDescription).width,(**p->imageDescription).height); 278 250 279 251 //SSA_PrerollFonts(glob->ssa); … … 281 253 glob->colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); 282 254 } 255 256 return noErr; 257 } 258 259 // ImageCodecBeginBand 260 // The ImageCodecBeginBand function allows your image decompressor component to save information about 261 // a band before decompressing it. This function is never called at interrupt time. The base image decompressor 262 // preserves any changes your component makes to any of the fields in the ImageSubCodecDecompressRecord 263 // or CodecDecompressParams structures. If your component supports asynchronous scheduled decompression, it 264 // may receive more than one ImageCodecBeginBand call before receiving an ImageCodecDrawBand call. 265 pascal ComponentResult TextSubCodecBeginBand(TextSubGlobals glob, CodecDecompressParams *p, ImageSubCodecDecompressRecord *drp, long flags) 266 { 267 long offsetH, offsetV; 268 TextSubDecompressRecord *myDrp = (TextSubDecompressRecord *)drp->userDecompressRecord; 269 270 offsetH = (long)(p->dstRect.left - p->dstPixMap.bounds.left) * (long)(p->dstPixMap.pixelSize >> 3); 271 offsetV = (long)(p->dstRect.top - p->dstPixMap.bounds.top) * (long)drp->rowBytes; 272 273 drp->baseAddr = p->dstPixMap.baseAddr + offsetH + offsetV; 274 275 // Let base codec know that all our frames are key frames (a.k.a., sync samples) 276 // This allows the base codec to perform frame dropping on our behalf if needed 277 drp->frameType = kCodecFrameTypeKey; 278 279 myDrp->width = p->dstRect.right - p->dstRect.left; 280 myDrp->height = p->dstRect.bottom - p->dstRect.top; 281 myDrp->depth = (**p->imageDescription).depth; 282 myDrp->dataSize = p->bufferSize; 283 283 284 284 return noErr; trunk/TextSubCodec.r
r794 r806 59 59 // These flags specify information about the capabilities of the component 60 60 // Works with 1-bit, 8-bit, 16-bit and 32-bit Pixel Maps 61 #define kTextSubDecoFlags ( codecInfoDoes32 | codecInfoDoes16 | codecInfoDoes8 | codecInfoDoes1 | c odecInfoDoesSpool | cmpThreadSafe | codecInfoDoesStretch | codecInfoDoesShrink)61 #define kTextSubDecoFlags ( codecInfoDoes32 | codecInfoDoes16 | codecInfoDoes8 | codecInfoDoes1 | cmpThreadSafe | codecInfoDoesStretch | codecInfoDoesShrink) 62 62 63 63 // These flags specify the possible format of compressed data produced by the component trunk/UniversalDetector/UniversalDetector.xcodeproj/project.pbxproj
r729 r806 668 668 isa = XCBuildConfiguration; 669 669 buildSettings = { 670 GCC_ENABLE_OBJC_GC = YES; 670 671 GCC_WARN_ABOUT_RETURN_TYPE = YES; 671 672 GCC_WARN_UNUSED_VARIABLE = YES; trunk/VobSubCodec.r
r794 r806 60 60 // These flags specify information about the capabilities of the component 61 61 // Works with 1-bit, 8-bit, 16-bit and 32-bit Pixel Maps 62 #define kVobSubDecoFlags ( codecInfoDoes32 | codecInfoDoes16 | codecInfoDoes8 | codecInfoDoes1 | c odecInfoDoesSpool | cmpThreadSafe )62 #define kVobSubDecoFlags ( codecInfoDoes32 | codecInfoDoes16 | codecInfoDoes8 | codecInfoDoes1 | cmpThreadSafe ) 63 63 64 64 // These flags specify the possible format of compressed data produced by the component trunk/bitstream_info.c
r719 r806 12 12 #include <AudioToolbox/AudioToolbox.h> 13 13 #include <QuickTime/QuickTime.h> 14 #include "CodecIDs.h" 14 15 15 16 #import "ac3tab.h" … … 128 129 memset(asbd, 0, sizeof(AudioStreamBasicDescription)); 129 130 asbd->mSampleRate = sample_rate >> shift; 130 asbd->mFormatID = kAudioFormatAC3 ;131 asbd->mFormatID = kAudioFormatAC3MS; 131 132 asbd->mFramesPerPacket = 1; 132 133 asbd->mChannelsPerFrame = nfchans_tbl[acmod] + lfe; … … 249 250 int num_ref_frames_in_pic_order_cnt_cycle; 250 251 int sum_of_offset_for_ref_frames; 252 253 int chroma_format_idc; 251 254 }H264ParserContext; 252 255 … … 330 333 if(profile_idc >= 100) 331 334 { 335 context->chroma_format_idc = get_ue_golomb(gb); 332 336 //high profile 333 if( get_ue_golomb(gb)== 3) //chroma_format_idc337 if(context->chroma_format_idc == 3) //chroma_format_idc 334 338 get_bits1(gb); //residual_color_transfrom_flag 335 339 get_ue_golomb(gb); //bit_depth_luma_minus8 … … 353 357 for(i=0; i<context->num_ref_frames_in_pic_order_cnt_cycle; i++) 354 358 context->sum_of_offset_for_ref_frames += get_se_golomb(gb); //offset_for_ref_frame[i] 355 get_ue_golomb(gb); //num_ref_frames356 get_bits1(gb); //gaps_in_frame_num_value_allowed_flag357 get_ue_golomb(gb); //pic_width_in_mbs_minus1358 get_ue_golomb(gb); //pic_height_in_map_units_minus1359 context->frame_mbs_only_flag = get_bits1(gb);360 }359 } 360 get_ue_golomb(gb); //num_ref_frames 361 get_bits1(gb); //gaps_in_frame_num_value_allowed_flag 362 get_ue_golomb(gb); //pic_width_in_mbs_minus1 363 get_ue_golomb(gb); //pic_height_in_map_units_minus1 364 context->frame_mbs_only_flag = get_bits1(gb); 361 365 } 362 366 … … 525 529 start_offset = buf_index + 1; 526 530 //do start code prefix search 527 for( ; buf_index < buf_size; buf_index++)531 for(buf_index++; buf_index < buf_size; buf_index++) 528 532 { 529 533 if(buf[buf_index] == 0) … … 732 736 av_free(parser->avctx); 733 737 if(parser->internalContext) 734 free(parser->internalContext);738 av_free(parser->internalContext); 735 739 free(parser); 736 740 } … … 783 787 parserContext->parserStructure = ffParser; 784 788 if(ffParser->internalContextSize) 785 parserContext->internalContext = malloc(ffParser->internalContextSize);789 parserContext->internalContext = av_mallocz(ffParser->internalContextSize); 786 790 else 787 791 parserContext->internalContext = NULL; … … 819 823 return 0; 820 824 } 825 826 int ffusionIsParsedVideoDecodable(FFusionParserContext *parser) 827 { 828 if (parser->parserStructure == &ffusionH264Parser) { 829 H264ParserContext *h264parser = parser->internalContext; 830 831 // don't try to decode interlaced or 4:2:2 H.264 832 return (h264parser->frame_mbs_only_flag == 1) && (h264parser->chroma_format_idc <= 1); 833 } 834 835 return 1; 836 } trunk/bitstream_info.h
r588 r806 43 43 int ffusionParseExtraData(FFusionParserContext *parser, const uint8_t *buf, int buf_size); 44 44 int ffusionParse(FFusionParserContext *parser, const uint8_t *buf, int buf_size, int *out_buf_size, int *type, int *skippable); 45 int ffusionIsParsedVideoDecodable(FFusionParserContext *parser); 45 46 46 47 #ifdef __cplusplus trunk/createStaticLibs.sh
r733 r806 54 54 exit 0 55 55 fi 56 57 if [ -e ffmpeg/patched ] ; then 58 (cd ffmpeg && svn revert -R . && rm patched) 59 fi 60 61 (cd ffmpeg; patch -p1 < ../Patches/ffmpeg.diff) 56 62 57 63 if [ "$buildid_ffmpeg" = "$oldbuildid_ffmpeg" ] ; then trunk/ff_MovieImport.c
r708 r806 322 322 } else if (tag == 'strh'){ 323 323 // 4-byte offset to the fourcc 324 url_fskip(pb, 4); 325 return get_be32(pb); 324 OSType tag1 = get_be32(pb); 325 if(tag1 == 'iavs' || tag1 == 'ivas') 326 return get_be32(pb); 327 else 328 url_fskip(pb, size + (size & 1) - 4); 326 329 } else 327 330 url_fskip(pb, size + (size & 1)); … … 336 339 uint8_t buf[PROBE_BUF_SIZE]; 337 340 AVProbeData *pd = (AVProbeData *)malloc(sizeof(AVProbeData)); 338 ByteIOContext byteContext;341 ByteIOContext *byteContext; 339 342 340 343 /* default */ … … 361 364 if (IS_AVI(storage->componentType)) { 362 365 /* Prepare the iocontext structure */ 363 memset(&byteContext, 0, sizeof(byteContext));364 366 result = url_open_dataref(&byteContext, dataRef, dataRefType, NULL, NULL, NULL); 365 367 require_noerr(result, bail); 366 368 367 OSType fourcc = get_avi_strf_fourcc( &byteContext);369 OSType fourcc = get_avi_strf_fourcc(byteContext); 368 370 enum CodecID id = codec_get_id(codec_bmp_tags, BSWAP(fourcc)); 369 371 370 if (id == CODEC_ID_MJPEG || id == CODEC_ID_DVVIDEO || id == CODEC_ID_RAWVIDEO || id == CODEC_ID_NONE )372 if (id == CODEC_ID_MJPEG || id == CODEC_ID_DVVIDEO || id == CODEC_ID_RAWVIDEO || id == CODEC_ID_NONE || id == CODEC_ID_MSVIDEO1) 371 373 *valid = 0; 372 374 373 url_fclose( &byteContext);375 url_fclose(byteContext); 374 376 } 375 377 } … … 403 405 result = FSpMakeFSRef(theFile, &theFileFSRef); 404 406 require_noerr(result, bail); 405 406 LoadExternalSubtitles(&theFileFSRef, theMovie); 407 407 408 408 bail: 409 409 if(dataRef) … … 417 417 { 418 418 ComponentResult result = noErr; 419 ByteIOContext byteContext;419 ByteIOContext *byteContext; 420 420 AVFormatContext *ic = NULL; 421 421 AVFormatParameters params; … … 432 432 if(valid != 255) 433 433 goto bail; 434 434 435 435 /* Prepare the iocontext structure */ 436 memset(&byteContext, 0, sizeof(byteContext));437 436 result = url_open_dataref(&byteContext, dataRef, dataRefType, &storage->dataHandler, &storage->dataHandlerSupportsWideOffsets, &storage->dataSize); 438 437 storage->isStreamed = dataRefType == URLDataHandlerSubType; … … 441 440 /* Open the Format Context */ 442 441 memset(¶ms, 0, sizeof(params)); 443 result = av_open_input_stream(&ic, &byteContext, "", storage->format, ¶ms);442 result = av_open_input_stream(&ic, byteContext, "", storage->format, ¶ms); 444 443 require_noerr(result,bail); 445 444 storage->format_context = ic; … … 547 546 } 548 547 548 LoadExternalSubtitlesFromFileDataRef(dataRef, dataRefType, theMovie); 549 549 550 bail: 550 551 if(result == noErr) … … 552 553 else 553 554 storage->movieLoadState == kMovieLoadStateError; 554 555 555 556 return result; 556 557 } /* FFAvi_MovieImportDataRef */ trunk/ff_MovieImportVersion.h
r708 r806 24 24 #define __FF_MOVIEIMPORTVERSION__ 25 25 26 #define kFFAviComponentVersion 0x0001000 226 #define kFFAviComponentVersion 0x00010003 27 27 28 #define kChristophManufacturer ' Rafz'28 #define kChristophManufacturer 'Peri' 29 29 30 30 #define kAVIthngResID 512 trunk/ff_dataref.c
r703 r806 199 199 200 200 /* This is the public function to open bytecontext withs datarefs */ 201 OSStatus url_open_dataref(ByteIOContext * pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize)201 OSStatus url_open_dataref(ByteIOContext **pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize) 202 202 { 203 203 URLContext *uc; … … 217 217 return err; 218 218 } 219 uc->filename [0] = '\0';219 uc->filename = NULL; 220 220 uc->prot = up; 221 221 uc->flags = URL_RDONLY; // we're just using the read access... trunk/ff_private.c
r716 r806 320 320 break; 321 321 case CODEC_ID_AC3: 322 asbd->mFormatID = kAudioFormatAC3 ;322 asbd->mFormatID = kAudioFormatAC3MS; 323 323 map->vbr = 1; 324 324 break; … … 606 606 if(result < 0) goto bail; 607 607 608 av_read_frame(formatContext, &packet); 608 result = av_read_frame(formatContext, &packet); 609 if(result < 0) goto bail; 609 610 st = formatContext->streams[packet.stream_index]; 610 611 trunk/ff_private.h
r716 r806 93 93 94 94 /* Public interface of the DataRef interface */ 95 OSStatus url_open_dataref(ByteIOContext * pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize);95 OSStatus url_open_dataref(ByteIOContext **pb, Handle dataRef, OSType dataRefType, DataHandler *dataHandler, Boolean *wideSupport, int64_t *dataSize); 96 96 97 97 /* Import routines */ trunk/ffmpeg-patch
r721 r806 1 Index: libavcodec/i386/motion_est_mmx.c 2 =================================================================== 3 --- libavcodec/i386/motion_est_mmx.c (revision 10865) 4 +++ libavcodec/i386/motion_est_mmx.c (working copy) 5 @@ -167,7 +167,7 @@ 6 static inline void sad8_4_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h) 1 diff -ru ffmpeg/libavcodec/dsputil.c ffmpeg-/libavcodec/dsputil.c 2 --- ffmpeg/libavcodec/dsputil.c 2008-01-20 15:05:32.000000000 -0500 3 +++ ffmpeg-/libavcodec/dsputil.c 2008-01-20 17:09:12.000000000 -0500 4 @@ -1440,6 +1440,7 @@ 5 \ 6 assert(x<8 && y<8 && x>=0 && y>=0);\ 7 \ 8 + if(D){\ 9 for(i=0; i<h; i++)\ 10 {\ 11 OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ 12 @@ -1447,9 +1448,20 @@ 13 dst+= stride;\ 14 src+= stride;\ 15 }\ 16 + }else{\ 17 + const int E= B+C;\ 18 + const int step= C ? stride : 1;\ 19 + for(i=0; i<h; i++)\ 20 + {\ 21 + OP(dst[0], (A*src[0] + E*src[step+0]));\ 22 + OP(dst[1], (A*src[1] + E*src[step+1]));\ 23 + dst+= stride;\ 24 + src+= stride;\ 25 + }\ 26 + }\ 27 }\ 28 \ 29 -static void OPNAME ## h264_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ 30 +void OPNAME ## h264_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ 31 const int A=(8-x)*(8-y);\ 32 const int B=( x)*(8-y);\ 33 const int C=(8-x)*( y);\ 34 @@ -1458,6 +1470,7 @@ 35 \ 36 assert(x<8 && y<8 && x>=0 && y>=0);\ 37 \ 38 + if(D){\ 39 for(i=0; i<h; i++)\ 40 {\ 41 OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ 42 @@ -1467,6 +1480,19 @@ 43 dst+= stride;\ 44 src+= stride;\ 45 }\ 46 + }else{\ 47 + const int E= B+C;\ 48 + const int step= C ? stride : 1;\ 49 + for(i=0; i<h; i++)\ 50 + {\ 51 + OP(dst[0], (A*src[0] + E*src[step+0]));\ 52 + OP(dst[1], (A*src[1] + E*src[step+1]));\ 53 + OP(dst[2], (A*src[2] + E*src[step+2]));\ 54 + OP(dst[3], (A*src[3] + E*src[step+3]));\ 55 + dst+= stride;\ 56 + src+= stride;\ 57 + }\ 58 + }\ 59 }\ 60 \ 61 static void OPNAME ## h264_chroma_mc8_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){\ 62 @@ -1478,6 +1504,7 @@ 63 \ 64 assert(x<8 && y<8 && x>=0 && y>=0);\ 65 \ 66 + if(D){\ 67 for(i=0; i<h; i++)\ 68 {\ 69 OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ 70 @@ -1491,6 +1518,23 @@ 71 dst+= stride;\ 72 src+= stride;\ 73 }\ 74 + }else{\ 75 + const int E= B+C;\ 76 + const int step= C ? stride : 1;\ 77 + for(i=0; i<h; i++)\ 78 + {\ 79 + OP(dst[0], (A*src[0] + E*src[step+0]));\ 80 + OP(dst[1], (A*src[1] + E*src[step+1]));\ 81 + OP(dst[2], (A*src[2] + E*src[step+2]));\ 82 + OP(dst[3], (A*src[3] + E*src[step+3]));\ 83 + OP(dst[4], (A*src[4] + E*src[step+4]));\ 84 + OP(dst[5], (A*src[5] + E*src[step+5]));\ 85 + OP(dst[6], (A*src[6] + E*src[step+6]));\ 86 + OP(dst[7], (A*src[7] + E*src[step+7]));\ 87 + dst+= stride;\ 88 + src+= stride;\ 89 + }\ 90 + }\ 91 } 92 93 #define op_avg(a, b) a = (((a)+(((b) + 32)>>6)+1)>>1) 94 diff -ru ffmpeg/libavcodec/i386/dsputil_h264_template_mmx.c ffmpeg-/libavcodec/i386/dsputil_h264_template_mmx.c 95 --- ffmpeg/libavcodec/i386/dsputil_h264_template_mmx.c 2008-01-20 15:05:31.000000000 -0500 96 +++ ffmpeg-/libavcodec/i386/dsputil_h264_template_mmx.c 2008-01-20 17:08:31.000000000 -0500 97 @@ -182,14 +182,26 @@ 98 } 99 } 100 101 +extern void put_h264_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y); 102 +extern void avg_h264_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y); 103 + 104 static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 4*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y) 7 105 { 106 + if (!(x*y)) { 107 +#if H264_CHROMA_MC4_TMPL == put_h264_chroma_mc4_mmx 108 + put_h264_chroma_mc4_c(dst,src,stride,h,x,y); 109 +#else 110 + avg_h264_chroma_mc4_c(dst,src,stride,h,x,y); 111 +#endif 112 + return; 113 + } 114 + 8 115 asm volatile( 9 - "movq "MANGLE(bone)", %%mm5 \n\t"10 + "movq %4, %%mm5 \n\t"11 "movq (%1), %%mm0 \n\t"12 "pavgb 1(%1), %%mm0 \n\t"13 "add %3, %1 \n\t"14 @@ -190,7 +190,7 @@15 "sub $2, %0 \n\t"16 " jg 1b \n\t"17 : "+r" (h), "+r" (blk1), "+r" (blk2)18 - : "r" ((long)stride)19 + : "r" ((long)stride), "m" (bone)20 );21 }22 23 @@ -258,7 +258,7 @@24 "punpckhbw %%mm7, %%mm5 \n\t"25 "paddw %%mm4, %%mm2 \n\t"26 "paddw %%mm5, %%mm3 \n\t"27 - "movq 16+"MANGLE(round_tab)", %%mm5 \n\t"28 + "movq 16+%5, %%mm5 \n\t"29 "paddw %%mm2, %%mm0 \n\t"30 "paddw %%mm3, %%mm1 \n\t"31 "paddw %%mm5, %%mm0 \n\t"32 @@ -281,7 +281,7 @@33 "add %4, %%"REG_a" \n\t"34 " js 1b \n\t"35 : "+a" (len)36 - : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((long)stride)37 + : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((long)stride), "m" (round_tab[0])38 );39 }40 41 Index: libavcodec/i386/dsputil_h264_template_mmx.c42 ===================================================================43 --- libavcodec/i386/dsputil_h264_template_mmx.c (revision 10865)44 +++ libavcodec/i386/dsputil_h264_template_mmx.c (working copy)45 @@ -188,8 +188,8 @@46 116 "pxor %%mm7, %%mm7 \n\t" 47 117 "movd %5, %%mm2 \n\t" … … 54 124 "punpcklwd %%mm3, %%mm3 \n\t" 55 125 "punpcklwd %%mm2, %%mm2 \n\t" 56 @@ -246,7 +2 46,7 @@126 @@ -246,7 +258,7 @@ 57 127 "sub $2, %2 \n\t" 58 128 "jnz 1b \n\t" … … 63 133 } 64 134 65 Index: libavcodec/i386/dsputil_mmx.c 66 =================================================================== 67 --- libavcodec/i386/dsputil_mmx.c (revision 10865) 68 +++ libavcodec/i386/dsputil_mmx.c (working copy) 69 @@ -1917,7 +1917,7 @@ 135 diff -ru ffmpeg/libavcodec/i386/dsputil_mmx.c ffmpeg-/libavcodec/i386/dsputil_mmx.c 136 --- ffmpeg/libavcodec/i386/dsputil_mmx.c 2008-01-20 15:05:31.000000000 -0500 137 +++ ffmpeg-/libavcodec/i386/dsputil_mmx.c 2008-01-20 17:03:15.000000000 -0500 138 @@ -1918,7 +1918,7 @@ 70 139 71 140 #define QPEL_V_LOW(m3,m4,m5,m6, pw_20, pw_3, rnd, in0, in1, in2, in7, out, OP)\ … … 76 145 "movq "#in7", " #m3 " \n\t" /* d */\ 77 146 "movq "#in0", %%mm5 \n\t" /* D */\ 78 @@ -19 29,7 +1929,7 @@147 @@ -1930,7 +1930,7 @@ 79 148 "paddw " #m5 ", %%mm6 \n\t" /* x2 */\ 80 149 "paddw %%mm6, %%mm6 \n\t" /* 2x2 */\ … … 85 154 "paddw %%mm4, %%mm5 \n\t" /* 20x1 - 6x2 + 3x3 - x4 */\ 86 155 "psraw $5, %%mm5 \n\t"\ 87 @@ -196 3,10 +1963,10 @@156 @@ -1964,10 +1964,10 @@ 88 157 "paddw %%mm5, %%mm5 \n\t" /* 2b */\ 89 158 "psubw %%mm5, %%mm6 \n\t" /* c - 2b */\ … … 98 167 "paddw %6, %%mm6 \n\t"\ 99 168 "paddw %%mm6, %%mm0 \n\t" /* 20a - 6b + 3c - d */\ 100 @@ -19 89,10 +1989,10 @@169 @@ -1990,10 +1990,10 @@ 101 170 "psrlq $24, %%mm6 \n\t" /* IJKLM000 */\ 102 171 "punpcklbw %%mm7, %%mm2 \n\t" /* 0F0G0H0I */\ … … 111 180 "paddw %6, %%mm1 \n\t"\ 112 181 "paddw %%mm1, %%mm3 \n\t" /* 20a - 6b +3c - d */\ 113 @@ -201 5,7 +2015,7 @@182 @@ -2016,7 +2016,7 @@ 114 183 "psubw %%mm5, %%mm0 \n\t" /* c - 2b */\ 115 184 "movq %%mm3, %%mm5 \n\t" /* JKLMNOPQ */\ … … 120 189 "paddw %%mm3, %%mm2 \n\t" /* d */\ 121 190 "psubw %%mm2, %%mm0 \n\t" /* -6b + 3c - d */\ 122 @@ -202 3,7 +2023,7 @@191 @@ -2024,7 +2024,7 @@ 123 192 "punpcklbw %%mm7, %%mm2 \n\t" /* 0J0K0L0M */\ 124 193 "punpckhbw %%mm7, %%mm5 \n\t" /* 0N0O0P0Q */\ … … 129 198 "paddw %%mm6, %%mm0 \n\t" /* 20a - 6b + 3c - d */\ 130 199 "psraw $5, %%mm0 \n\t"\ 131 @@ -203 8,8 +2038,8 @@200 @@ -2039,8 +2039,8 @@ 132 201 "paddw %%mm2, %%mm5 \n\t" /* d */\ 133 202 "paddw %%mm6, %%mm6 \n\t" /* 2b */\ … … 140 209 "paddw %6, %%mm4 \n\t"\ 141 210 "paddw %%mm3, %%mm4 \n\t" /* 20a - 6b + 3c - d */\ 142 @@ -205 2,7 +2052,9 @@211 @@ -2053,7 +2053,9 @@ 143 212 "decl %2 \n\t"\ 144 213 " jnz 1b \n\t"\ … … 151 220 );\ 152 221 }\ 153 @@ -213 0,10 +2132,10 @@222 @@ -2131,10 +2133,10 @@ 154 223 "paddw %%mm5, %%mm5 \n\t" /* 2b */\ 155 224 "psubw %%mm5, %%mm6 \n\t" /* c - 2b */\ … … 164 233 "paddw %6, %%mm6 \n\t"\ 165 234 "paddw %%mm6, %%mm0 \n\t" /* 20a - 6b + 3c - d */\ 166 @@ -215 1,8 +2153,8 @@235 @@ -2152,8 +2154,8 @@ 167 236 "paddw %%mm5, %%mm4 \n\t" /* d */\ 168 237 "paddw %%mm2, %%mm2 \n\t" /* 2b */\ … … 175 244 "paddw %6, %%mm1 \n\t"\ 176 245 "paddw %%mm1, %%mm3 \n\t" /* 20a - 6b + 3c - d */\ 177 @@ -216 5,7 +2167,9 @@246 @@ -2166,7 +2168,9 @@ 178 247 "decl %2 \n\t"\ 179 248 " jnz 1b \n\t"\ … … 186 255 );\ 187 256 }\ 188 @@ -224 4,31 +2248,31 @@257 @@ -2245,31 +2249,31 @@ 189 258 "movq 8(%0), %%mm1 \n\t"\ 190 259 "movq 16(%0), %%mm2 \n\t"\ … … 234 303 "add $136, %0 \n\t"\ 235 304 "add %6, %1 \n\t"\ 236 @@ -227 6,7 +2280,9 @@305 @@ -2277,7 +2281,9 @@ 237 306 " jnz 1b \n\t"\ 238 307 \ … … 245 314 );\ 246 315 }\ 247 @@ -231 6,19 +2322,19 @@316 @@ -2317,19 +2323,19 @@ 248 317 "movq 8(%0), %%mm1 \n\t"\ 249 318 "movq 16(%0), %%mm2 \n\t"\ … … 273 342 "add $72, %0 \n\t"\ 274 343 "add %6, %1 \n\t"\ 275 @@ -233 6,7 +2342,9 @@344 @@ -2337,7 +2343,9 @@ 276 345 " jnz 1b \n\t"\ 277 346 \ … … 284 353 );\ 285 354 }\ 286 @@ -29 67,7 +2975,6 @@355 @@ -2972,7 +2980,6 @@ 287 356 double c = 2.0 / (len-1.0); 288 357 int n2 = len>>1; … … 292 361 "movsd %0, %%xmm7 \n\t" 293 362 "movapd %1, %%xmm6 \n\t" 294 @@ -29 85,17 +2992,18 @@363 @@ -2990,17 +2997,18 @@ 295 364 "movapd %%xmm6, %%xmm0 \n\t"\ 296 365 "subpd %%xmm1, %%xmm0 \n\t"\ … … 317 386 "r"(data+n2), "r"(data+len-2-n2)\ 318 387 ); 319 Index: libavcodec/i386/h264dsp_mmx.c 320 =================================================================== 321 --- libavcodec/i386/h264dsp_mmx.c (revision 10865) 322 +++ libavcodec/i386/h264dsp_mmx.c (working copy) 388 diff -ru ffmpeg/libavcodec/i386/h264dsp_mmx.c ffmpeg-/libavcodec/i386/h264dsp_mmx.c 389 --- ffmpeg/libavcodec/i386/h264dsp_mmx.c 2008-01-20 15:05:31.000000000 -0500 390 +++ ffmpeg-/libavcodec/i386/h264dsp_mmx.c 2008-01-20 17:03:15.000000000 -0500 323 391 @@ -341,21 +341,21 @@ 324 392 // in: mm0=p1 mm1=p0 mm2=q0 mm3=q1 mm7=(tc&mask) … … 380 448 } 381 449 382 Index: libavcodec/i386/simple_idct_mmx.c 383 =================================================================== 384 --- libavcodec/i386/simple_idct_mmx.c (revision 10865) 385 +++ libavcodec/i386/simple_idct_mmx.c (working copy) 450 diff -ru ffmpeg/libavcodec/i386/motion_est_mmx.c ffmpeg-/libavcodec/i386/motion_est_mmx.c 451 --- ffmpeg/libavcodec/i386/motion_est_mmx.c 2008-01-20 15:05:31.000000000 -0500 452 +++ ffmpeg-/libavcodec/i386/motion_est_mmx.c 2008-01-20 17:03:15.000000000 -0500 453 @@ -167,7 +167,7 @@ 454 static inline void sad8_4_mmx2(uint8_t *blk1, uint8_t *blk2, int stride, int h) 455 { 456 asm volatile( 457 - "movq "MANGLE(bone)", %%mm5 \n\t" 458 + "movq %4, %%mm5 \n\t" 459 "movq (%1), %%mm0 \n\t" 460 "pavgb 1(%1), %%mm0 \n\t" 461 "add %3, %1 \n\t" 462 @@ -190,7 +190,7 @@ 463 "sub $2, %0 \n\t" 464 " jg 1b \n\t" 465 : "+r" (h), "+r" (blk1), "+r" (blk2) 466 - : "r" ((long)stride) 467 + : "r" ((long)stride), "m" (bone) 468 ); 469 } 470 471 @@ -258,7 +258,7 @@ 472 "punpckhbw %%mm7, %%mm5 \n\t" 473 "paddw %%mm4, %%mm2 \n\t" 474 "paddw %%mm5, %%mm3 \n\t" 475 - "movq 16+"MANGLE(round_tab)", %%mm5 \n\t" 476 + "movq 16+%5, %%mm5 \n\t" 477 "paddw %%mm2, %%mm0 \n\t" 478 "paddw %%mm3, %%mm1 \n\t" 479 "paddw %%mm5, %%mm0 \n\t" 480 @@ -281,7 +281,7 @@ 481 "add %4, %%"REG_a" \n\t" 482 " js 1b \n\t" 483 : "+a" (len) 484 - : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((long)stride) 485 + : "r" (blk1 - len), "r" (blk1 -len + stride), "r" (blk2 - len), "r" ((long)stride), "m" (round_tab[0]) 486 ); 487 } 488 489 diff -ru ffmpeg/libavcodec/i386/simple_idct_mmx.c ffmpeg-/libavcodec/i386/simple_idct_mmx.c 490 --- ffmpeg/libavcodec/i386/simple_idct_mmx.c 2008-01-20 15:05:31.000000000 -0500 491 +++ ffmpeg-/libavcodec/i386/simple_idct_mmx.c 2008-01-20 17:03:15.000000000 -0500 386 492 @@ -363,7 +363,7 @@ 387 493 "movq " #src4 ", %%mm1 \n\t" /* R6 R2 r6 r2 */\
