git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57c4d40
)
overflow fix
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 25 Jun 2004 18:39:57 +0000
(18:39 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 25 Jun 2004 18:39:57 +0000
(18:39 +0000)
Originally committed as revision 3250 to svn://svn.ffmpeg.org/ffmpeg/trunk
tests/tiny_psnr.c
patch
|
blob
|
history
diff --git
a/tests/tiny_psnr.c
b/tests/tiny_psnr.c
index
84ad90e
..
572dd27
100644
(file)
--- a/
tests/tiny_psnr.c
+++ b/
tests/tiny_psnr.c
@@
-68,9
+68,10
@@
static uint64_t log16(uint64_t a){
a<<=16;
for(i=19;i>=0;i--){
- if(a<(exp16_table[i]<<16)) continue;
+ int64_t b= exp16_table[i];
+ if(a<(b<<16)) continue;
out |= 1<<i;
- a = ((a
<<16) + exp16_table[i]/2)/exp16_table[i]
;
+ a = ((a
/b)<<16) + (((a%b)<<16) + b/2)/b
;
}
return out;
}