projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e87222
)
qdm2: fix signed multiplication overflow
author
Mans Rullgard
<mans@mansr.com>
Tue, 11 Oct 2011 16:45:55 +0000
(17:45 +0100)
committer
Mans Rullgard
<mans@mansr.com>
Wed, 12 Oct 2011 11:28:08 +0000
(12:28 +0100)
This code relies on the result wrapping as for unsigned
values, and the sign is not used. Thus an unsigned type
is proper here.
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/qdm2_tablegen.h
patch
|
blob
|
history
diff --git
a/libavcodec/qdm2_tablegen.h
b/libavcodec/qdm2_tablegen.h
index
b2bb294
..
bb73d92
100644
(file)
--- a/
libavcodec/qdm2_tablegen.h
+++ b/
libavcodec/qdm2_tablegen.h
@@
-90,7
+90,7
@@
static av_cold void rnd_table_init(void) {
static av_cold void init_noise_samples(void) {
int i;
-
int
random_seed = 0;
+
unsigned
random_seed = 0;
float delta = 1.0 / 16384.0;
for (i = 0; i < 128;i++) {
random_seed = random_seed * 214013 + 2531011;