mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-15 11:44:49 +00:00
simplify
Originally committed as revision 5571 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7943355485
commit
78f67b7ad3
@ -301,20 +301,19 @@ static void calc_sums(int pmax, uint32_t *data, int n, int pred_order,
|
|||||||
uint32_t sums[][256])
|
uint32_t sums[][256])
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
int parts, cnt;
|
int parts;
|
||||||
uint32_t *res;
|
uint32_t *res, *res_end;
|
||||||
|
|
||||||
/* sums for highest level */
|
/* sums for highest level */
|
||||||
parts = (1 << pmax);
|
parts = (1 << pmax);
|
||||||
res = &data[pred_order];
|
res = &data[pred_order];
|
||||||
cnt = (n >> pmax) - pred_order;
|
res_end = &data[n >> pmax];
|
||||||
for(i=0; i<parts; i++) {
|
for(i=0; i<parts; i++) {
|
||||||
if(i == 1) cnt = (n >> pmax);
|
|
||||||
if(i > 0) res = &data[i*cnt];
|
|
||||||
sums[pmax][i] = 0;
|
sums[pmax][i] = 0;
|
||||||
for(j=0; j<cnt; j++) {
|
while(res < res_end){
|
||||||
sums[pmax][i] += res[j];
|
sums[pmax][i] += *(res++);
|
||||||
}
|
}
|
||||||
|
res_end+= n >> pmax;
|
||||||
}
|
}
|
||||||
/* sums for lower levels */
|
/* sums for lower levels */
|
||||||
for(i=pmax-1; i>=0; i--) {
|
for(i=pmax-1; i>=0; i--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user