Changeset 347

Show
Ignore:
Timestamp:
02/22/07 02:23:48 (2 years ago)
Author:
astrange
Message:

Remove/comment out various unused variables.
Enable -fstrict-aliasing for ffmpeg build: 56% -> 49% CPU on test h264 video.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ColorConversions.c

    r344 r347  
    288288void RGB32toRGB32(UInt8 *baseAddr, unsigned rowBytes, unsigned width, unsigned height, AVFrame *picture) 
    289289{ 
    290         unsigned x, y; 
     290        unsigned y; 
    291291        UInt8 *srcPtr = picture->data[0]; 
    292292         
     
    295295                memcpy(baseAddr, srcPtr, width * 4); 
    296296#else 
     297                unsigned x; 
    297298                UInt32 *oRow = (UInt32 *)baseAddr, *iRow = (UInt32 *)srcPtr; 
    298299                for (x = 0; x < width; x++) {oRow[x] = EndianU32_BtoN(iRow[x]);} 
     
    307308{ 
    308309        UInt8          *yc = picture->data[0], *u = picture->data[1], *v = picture->data[2]; 
    309         unsigned       rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2], y, x, x2, halfwidth = width / 2; 
     310        unsigned       rY = picture->linesize[0], rU = picture->linesize[1], rV = picture->linesize[2], y, x, halfwidth = width / 2; 
    310311         
    311312        for (y = 0; y < height; y++) { 
  • trunk/CommonUtils.c

    r331 r347  
    230230static int readDescr(UInt8 **buffer, int *tag) 
    231231{ 
    232         int len; 
    233232        *tag = *(*buffer)++; 
    234233        return readDescrLen(buffer); 
  • trunk/FFusionCodec.c

    r318 r347  
    236236pascal ComponentResult FFusionCodecClose(FFusionGlobals glob, ComponentInstance self) 
    237237{ 
    238     // Make sure to close the base component and dealocate our storage 
    239     int i; 
     238    // Make sure to close the base component and deallocate our storage 
    240239     
    241240    if (glob)  
     
    390389{ 
    391390    OSType *pos; 
    392     int index, i
     391    int index
    393392    CodecCapabilities *capabilities = p->capabilities; 
    394     long bitfield; 
    395     char altivec = 0; 
    396393    Byte* myptr; 
    397394        long count = 0; 
     
    715712         
    716713    ////// 
    717     IBNibRef          nibRef; 
     714  /*  IBNibRef                nibRef; 
    718715    WindowRef           window; 
    719716    OSStatus            err; 
     
    724721    ControlRef          theControl; 
    725722    KeyMap              currentKeyMap; 
    726     int                 userPreference; 
     723    int                 userPreference; */ 
    727724    /////// 
    728725         
     
    12311228static void FFusionReleaseBuffer(AVCodecContext *s, AVFrame *pic) 
    12321229{ 
    1233       FFusionGlobals glob = s->opaque; 
     1230//    FFusionGlobals glob = s->opaque; 
    12341231        FFusionBuffer *buf = pic->opaque; 
    12351232         
  • trunk/MatroskaImportPrivate.cpp

    r340 r347  
    889889void MatroskaTrack::FinishTrack(bool addSamples) 
    890890{ 
    891         OSStatus err = noErr; 
    892891         
    893892        if (type == track_subtitle && !is_vobsub) 
  • trunk/SSADocument.m

    r343 r347  
    117117                 
    118118                ATSUAttributeValuePtr vals[] = {&font, &matrix, &opt, &size, &tracking, &s->bold, &s->italic, &s->underline, &s->strikeout}; 
    119               char fname[256] = {0}; 
    120               ByteCount fl = 256; 
     119//            char fname[256] = {0}; 
     120//            ByteCount fl = 256; 
    121121                 
    122122                font = FMGetFontFromATSFontRef(ATSFontFindFromName((CFStringRef)s->font,kATSOptionFlagsDefault)); 
     
    311311        NSArray *lines = [ssa componentsSeparatedByString:@"\n"]; 
    312312        NSEnumerator *lenum = [lines objectEnumerator]; 
    313         NSString *nextLine, *styleType, *ns; 
     313        NSString *nextLine, *ns; 
    314314        NSArray *format; 
    315315        NSMutableDictionary *headers, *styleDict; 
     
    378378-(void) loadHeader:(NSString*)ssa width:(float)width height:(float)height 
    379379{ 
    380         NSError *err; 
    381         NSStringEncoding se = NSUTF8StringEncoding; 
    382380        if (!ssa) return; 
    383381        NSArray *lines = [[ssa stringByStandardizingNewlines] componentsSeparatedByString:@"\n"]; 
     
    390388        unichar cai; 
    391389        int formatc; 
    392         int readorder = 0; 
    393390         
    394391        headers = [[NSMutableDictionary alloc] init]; 
     
    491488        SSADocument *ssa = [[SSADocument alloc] init]; 
    492489        Handle sampleHndl = NULL, headerHndl=NULL, drefHndl; 
    493         Ptr initData = NewPtr(0); 
    494490        const char *header; 
    495491        int i, packetCount, sampleLen; 
  • trunk/SubImport.mm

    r343 r347  
    118118        UInt8 *path = (UInt8*)malloc(PATH_MAX); 
    119119        NSString *srtfile; 
    120         NSError *nserr = nil; 
    121         Handle sampleHndl = NULL; 
     120        Handle sampleHndl; 
    122121         
    123122        FSRefMakePath(theDirectory, path, PATH_MAX); 
     
    409408        unsigned times[num*2], last_last_end = 0; 
    410409        SubLine *slines[num], *last=nil; 
    411         bool last_has_invalid_end = false, all_overlap = true
     410        bool last_has_invalid_end = false
    412411         
    413412        [lines sortUsingFunction:cmp_line context:nil]; 
  • trunk/bitstream_info.c

    r263 r347  
    9595         
    9696        /* This is a valid frame!!! */ 
    97       uint8_t bitrate = ac3_bitratetab[frmsizecod >> 1]; 
     97//    uint8_t bitrate = ac3_bitratetab[frmsizecod >> 1]; 
    9898        int sample_rate = ac3_freqs[fscod]; 
    9999         
  • trunk/createStaticLibs.sh

    r292 r347  
    3434        mkdir "$BUILDDIR" 
    3535         
    36         export optCFlags="-mtune=nocona"  
     36        export optCFlags="-mtune=nocona -fstrict-aliasing"  
    3737 
    3838        cd "$BUILDDIR" 
     
    4242                "$SRCROOT/ffmpeg/configure" $extraConfigureOptions $generalConfigureOptions --cpu=pentium-m --extra-cflags='-gdwarf-2 $optCFlags' 
    4343        fi 
     44         
    4445        make -C libavutil   depend 
    4546        make -C libavcodec  depend 
     
    6263        mkdir "$BUILDDIR" 
    6364         
    64         export optCFlags="-mcpu=G3 -mtune=G5 -mmultiple
     65        export optCFlags="-mcpu=G3 -mtune=G5 -mmultiple -fstrict-aliasing
    6566         
    6667        cd "$BUILDDIR" 
     
    7071                "$SRCROOT/ffmpeg/configure" --cross-compile --arch=ppc  --extra-ldflags='-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk' --extra-cflags='-arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -gdwarf-2 $optCFlags' $extraConfigureOptions $generalConfigureOptions 
    7172        fi 
     73         
    7274        make -C libavutil   depend 
    7375        make -C libavcodec  depend 
  • trunk/ff_MovieImport.c

    r331 r347  
    295295        AVProbeData *pd = (AVProbeData *)malloc(sizeof(AVProbeData)); 
    296296        ByteIOContext byteContext; 
    297         AVFormatParameters params; 
    298         int success, i; 
    299297 
    300298        /* default */ 
     
    380378        AVFormatContext *ic = NULL; 
    381379        AVFormatParameters params; 
    382         AVPacket pkt; 
    383380        OSType mediaType; 
    384381        Media media; 
    385         int count, hadIndex, i, j; 
     382        int count, hadIndex, j; 
    386383                 
    387384        /* make sure that in case of error, the flag movieImportResultComplete is not set */ 
     
    482479        } else if(inFlags & movieImportWithIdle) { 
    483480                if(addedDuration && ic->duration > 0) { 
    484                         TimeValue sampleTime; 
    485481                        TimeScale movieTimeScale = GetMovieTimeScale(theMovie); 
    486482                        *addedDuration = movieTimeScale * ic->duration / AV_TIME_BASE;