Mercurial > libavcodec.hg
comparison wmadec.c @ 797:308e973c3fda libavcodec
use lrintf to avoid double conversion
author | bellard |
---|---|
date | Tue, 29 Oct 2002 22:39:11 +0000 |
parents | 55add0e7eafb |
children | e9bfaabcf07d |
comparison
equal
deleted
inserted
replaced
796:8a5b70c68fbd | 797:308e973c3fda |
---|---|
1182 for(ch = 0; ch < s->nb_channels; ch++) { | 1182 for(ch = 0; ch < s->nb_channels; ch++) { |
1183 ptr = samples + ch; | 1183 ptr = samples + ch; |
1184 iptr = s->frame_out[ch]; | 1184 iptr = s->frame_out[ch]; |
1185 | 1185 |
1186 for(i=0;i<n;i++) { | 1186 for(i=0;i<n;i++) { |
1187 a = lrint(*iptr++); | 1187 a = lrintf(*iptr++); |
1188 if (a > 32767) | 1188 if (a > 32767) |
1189 a = 32767; | 1189 a = 32767; |
1190 else if (a < -32768) | 1190 else if (a < -32768) |
1191 a = -32768; | 1191 a = -32768; |
1192 *ptr = a; | 1192 *ptr = a; |