~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/ac3dsp.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
    int i;
165
165
 
166
166
    for (i = 0; i < nb_coefs; i++) {
167
 
        int e;
168
167
        int v = abs(coef[i]);
169
 
        if (v == 0)
170
 
            e = 24;
171
 
        else {
172
 
            e = 23 - av_log2(v);
173
 
            if (e >= 24) {
174
 
                e = 24;
175
 
                coef[i] = 0;
176
 
            } else if (e < 0) {
177
 
                e = 0;
178
 
                coef[i] = av_clip(coef[i], -16777215, 16777215);
179
 
            }
180
 
        }
181
 
        exp[i] = e;
 
168
        exp[i] = v ? 23 - av_log2(v) : 24;
182
169
    }
183
170
}
184
171