Revision e3905ce0 libavcodec/ppc/imgresample_altivec.c

View differences:

libavcodec/ppc/imgresample_altivec.c
46 46
    vector signed short zeros, sumhv, sumlv;
47 47
    s = src;
48 48

  
49
    for(i=0;i<4;i++)
50
    {
49
    for(i=0;i<4;i++) {
51 50
        /*
52 51
           The vec_madds later on does an implicit >>15 on the result.
53 52
           Since FILTER_BITS is 8, and we have 15 bits of magnitude in
......
86 85

  
87 86
    /* Do our altivec resampling on 16 pixels at once. */
88 87
    while(dst_width>=16) {
89
        /*
90
           Read 16 (potentially unaligned) bytes from each of
88
        /* Read 16 (potentially unaligned) bytes from each of
91 89
           4 lines into 4 vectors, and split them into shorts.
92 90
           Interleave the multipy/accumulate for the resample
93 91
           filter with the loads to hide the 3 cycle latency
94
           the vec_madds have.
95
        */
92
           the vec_madds have. */
96 93
        tv = (vector unsigned char *) &s[0 * wrap];
97 94
        tmp = vec_perm(tv[0], tv[1], vec_lvsl(0, &s[i * wrap]));
98 95
        srchv[0].v = (vector signed short) vec_mergeh(zero, tmp);
......
121 118
        sumhv = vec_madds(srchv[3].v, fv[3].v, sumhv);
122 119
        sumlv = vec_madds(srclv[3].v, fv[3].v, sumlv);
123 120

  
124
        /*
125
           Pack the results into our destination vector,
126
           and do an aligned write of that back to memory.
127
        */
121
        /* Pack the results into our destination vector,
122
           and do an aligned write of that back to memory. */
128 123
        dstv = vec_packsu(sumhv, sumlv) ;
129 124
        vec_st(dstv, 0, (vector unsigned char *) dst);
130 125

  
......
133 128
        dst_width-=16;
134 129
    }
135 130

  
136
    /*
137
       If there are any leftover pixels, resample them
138
       with the slow scalar method.
139
    */
131
    /* If there are any leftover pixels, resample them
132
       with the slow scalar method. */
140 133
    while(dst_width>0) {
141 134
        sum = s[0 * wrap] * filter[0] +
142 135
        s[1 * wrap] * filter[1] +

Also available in: Unified diff