Commit 843c7aa8 authored by Måns Rullgård's avatar Måns Rullgård

DCA: use FASTDIV in decode_blockcode()

Originally committed as revision 22855 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 6a36798f
......@@ -30,6 +30,7 @@
#include <stddef.h>
#include <stdio.h>
#include "libavutil/intmath.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "dsputil.h"
......@@ -907,8 +908,9 @@ static int decode_blockcode(int code, int levels, int *values)
int offset = (levels - 1) >> 1;
for (i = 0; i < 4; i++) {
values[i] = (code % levels) - offset;
code /= levels;
int div = FASTDIV(code, levels);
values[i] = code - offset - div*levels;
code = div;
}
if (code == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment