Ticket #6535: sse_gcc_2.patch

File sse_gcc_2.patch, 1.2 KB (added by Jeff Lu <jll544@…>, 12 years ago)

Revised patch

  • libs/libmythsoundtouch/sse_gcc.cpp

     
    1313long TDStretchSSE2::calcCrossCorrMulti(const short *mPos, const short *cPos) const
    1414{
    1515    long corr = 0;
    16     int i, out[4];
     16    // Need 16-byte align for int out[4], but gcc bug #16660 prevents use of
     17    //  attribute(aligned()), so align it ourselves. Fixed in gcc >4.4 r138335
     18    int i, x[8];
     19    int *out=(int *)(((uintptr_t)&x+15) & ~(uintptr_t)0xf);
    1720    int count = (overlapLength * channels) - channels;
    1821    long loops = count >> 5;
    1922    long remainder = count - (loops<<5);
     
    6770long TDStretchSSE2::calcCrossCorrStereo(const short *mPos, const short *cPos) const
    6871{
    6972    long corr = 0;
    70     int i, out[4];
     73    // Need 16-byte align for int out[4], but gcc bug #16660 prevents use of
     74    //  attribute(aligned()), so align it ourselves. Fixed in gcc >4.4 r138335
     75    int i, x[8];
     76    int *out=(int *)(((uintptr_t)&x+15) & ~(uintptr_t)0xf);
    7177    int count = (overlapLength<<1) - 2;
    7278    long loops = count >> 5;
    7379    long remainder = count - (loops<<5);