comparison vorbis_enc.c @ 3907:5f5525341673 libavcodec

Original Commit: r108 | ods15 | 2006-10-01 18:46:06 +0200 (Sun, 01 Oct 2006) | 2 lines prevent division/modulo
author ods15
date Mon, 02 Oct 2006 06:09:39 +0000
parents 5ae5224790d3
children 045c650f0951
comparison
equal deleted inserted replaced
3906:5ae5224790d3 3907:5f5525341673
1290 float * a = put_vector(book, pb, &buf[k]); 1290 float * a = put_vector(book, pb, &buf[k]);
1291 int l; 1291 int l;
1292 for (l = 0; l < book->ndimentions; l++) buf[k + l] -= a[l]; 1292 for (l = 0; l < book->ndimentions; l++) buf[k + l] -= a[l];
1293 } 1293 }
1294 } else { 1294 } else {
1295 int s = rc->begin + p * psize, a1, b1;
1296 a1 = (s % real_ch) * samples;
1297 b1 = s / real_ch;
1298 s = real_ch * samples;
1295 for (k = 0; k < psize; k += book->ndimentions) { 1299 for (k = 0; k < psize; k += book->ndimentions) {
1296 int dim = book->ndimentions, s = rc->begin + p * psize + k, l; 1300 int dim, a2 = a1, b2 = b1;
1297 float vec[dim], * a = vec; 1301 float vec[book->ndimentions], * pv = vec;
1298 for (l = s; l < s + dim; l++) 1302 for (dim = book->ndimentions; dim--; ) {
1299 *a++ = coeffs[(l % real_ch) * samples + l / real_ch]; 1303 *pv++ = coeffs[a2 + b2];
1300 a = put_vector(book, pb, vec); 1304 if ((a2 += samples) == s) { a2=0; b2++; }
1301 for (l = s; l < s + dim; l++) 1305 }
1302 coeffs[(l % real_ch) * samples + l / real_ch] -= *a++; 1306 pv = put_vector(book, pb, vec);
1307 for (dim = book->ndimentions; dim--; ) {
1308 coeffs[a1 + b1] -= *pv++;
1309 if ((a1 += samples) == s) { a1=0; b1++; }
1310 }
1303 } 1311 }
1304 } 1312 }
1305 } 1313 }
1306 } 1314 }
1307 } 1315 }