projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d122943
)
dca: fix signed overflow in shift
author
Mans Rullgard
<mans@mansr.com>
Sat, 8 Oct 2011 12:49:42 +0000
(13:49 +0100)
committer
Mans Rullgard
<mans@mansr.com>
Sat, 8 Oct 2011 19:03:55 +0000
(20:03 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/dca.c
patch
|
blob
|
history
diff --git
a/libavcodec/dca.c
b/libavcodec/dca.c
index
e963fe0
..
3233f60
100644
(file)
--- a/
libavcodec/dca.c
+++ b/
libavcodec/dca.c
@@
-909,7
+909,8
@@
static void qmf_32_subbands(DCAContext * s, int chans,
for (subindex = 0; subindex < 8; subindex++) {
/* Load in one sample from each subband and clear inactive subbands */
for (i = 0; i < sb_act; i++){
- uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ ((i-1)&2)<<30;
+ unsigned sign = (i - 1) & 2;
+ uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ sign << 30;
AV_WN32A(&s->raXin[i], v);
}