Author: kmalaussene
Date: Wed Mar 4 22:42:26 2009
New Revision: 4166
Log:
cosmetics: use ? : instead of if else for more compact code.
Modified:
amr/amrnbfloatdec.c
Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c Wed Mar 4 22:38:51 2009 (r4165)
+++ amr/amrnbfloatdec.c Wed Mar 4 22:42:26 2009 (r4166)
@@ -704,13 +704,7 @@ static float fixed_gain_smooth(AMRContex
}
// if diff has been >0.65 for 10 frames (40 subframes) no smoothing is
applied
- if(diff > 0.65) {
- p->diff_count++;
- }else {
- p->diff_count = 0;
- }
-
- if(p->diff_count < 40) {
+ if((p->diff_count = diff > 0.65 ? p->diff_count+1 : 0) < 40) {
// calculate the fixed gain smoothing factor (k_m)
const float smoothing_factor = FFMIN(0.25, FFMAX(0.0, diff -
0.4))/0.25;
// calculate the mean fixed gain for the current subframe
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc