X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Faacsbr_fixed.c;h=eeada0b9f2b7ee88d5d96e38a07b142c26864750;hb=9a15af48284b951701b7e6b9dcc81b4212c6ca95;hp=3d5875a4690d201e745155634637099b98544dc1;hpb=dae6d27aa0b02e05790b7c4dc99f7f6b07223ea1;p=ffmpeg diff --git a/libavcodec/aacsbr_fixed.c b/libavcodec/aacsbr_fixed.c index 3d5875a4690..eeada0b9f2b 100644 --- a/libavcodec/aacsbr_fixed.c +++ b/libavcodec/aacsbr_fixed.c @@ -568,7 +568,8 @@ static void sbr_hf_assemble(int Y1[38][64][2], int A = (1-((indexsine+(kx & 1))&2)); int B = (A^(-idx)) + idx; int *out = &Y1[i][kx][idx]; - int shift, round; + int shift; + unsigned round; SoftFloat *in = sbr->s_m[e]; for (m = 0; m+1 < m_max; m+=2) { @@ -581,12 +582,12 @@ static void sbr_hf_assemble(int Y1[38][64][2], } if (shift < 32) { round = 1 << (shift-1); - out[2*m ] += (in[m ].mant * A + round) >> shift; + out[2*m ] += (int)(in[m ].mant * A + round) >> shift; } if (shift2 < 32) { round = 1 << (shift2-1); - out[2*m+2] += (in[m+1].mant * B + round) >> shift2; + out[2*m+2] += (int)(in[m+1].mant * B + round) >> shift2; } } if(m_max&1) @@ -597,7 +598,7 @@ static void sbr_hf_assemble(int Y1[38][64][2], return; } else if (shift < 32) { round = 1 << (shift-1); - out[2*m ] += (in[m ].mant * A + round) >> shift; + out[2*m ] += (int)(in[m ].mant * A + round) >> shift; } } }