Mercurial > libavcodec.hg
comparison qcelpdec.c @ 9594:a0517e3590fd libavcodec
Properly handle SILENCE frame. Patch by Kenan Gillet.
author | reynaldo |
---|---|
date | Mon, 04 May 2009 03:25:57 +0000 |
parents | 0dce4fe6e6f3 |
children | 3c98f3e1b719 |
comparison
equal
deleted
inserted
replaced
9593:b8140a218b1d | 9594:a0517e3590fd |
---|---|
247 gain[4] = 0.8*gain[2] + 0.2*gain[3]; | 247 gain[4] = 0.8*gain[2] + 0.2*gain[3]; |
248 gain[3] = 0.2*gain[1] + 0.8*gain[2]; | 248 gain[3] = 0.2*gain[1] + 0.8*gain[2]; |
249 gain[2] = gain[1]; | 249 gain[2] = gain[1]; |
250 gain[1] = 0.6*gain[0] + 0.4*gain[1]; | 250 gain[1] = 0.6*gain[0] + 0.4*gain[1]; |
251 } | 251 } |
252 }else | 252 }else if (q->bitrate != SILENCE) |
253 { | 253 { |
254 if(q->bitrate == RATE_OCTAVE) | 254 if(q->bitrate == RATE_OCTAVE) |
255 { | 255 { |
256 g1[0] = 2 * q->frame.cbgain[0] | 256 g1[0] = 2 * q->frame.cbgain[0] |
257 + av_clip((q->prev_g1[0] + q->prev_g1[1]) / 2 - 5, 0, 54); | 257 + av_clip((q->prev_g1[0] + q->prev_g1[1]) / 2 - 5, 0, 54); |