[FFmpeg-cvslog] r22855 - trunk/libavcodec/dca.c
mru
subversion
Mon Apr 12 18:05:10 CEST 2010
Author: mru
Date: Mon Apr 12 18:05:10 2010
New Revision: 22855
Log:
DCA: use FASTDIV in decode_blockcode()
Modified:
trunk/libavcodec/dca.c
Modified: trunk/libavcodec/dca.c
==============================================================================
--- trunk/libavcodec/dca.c Mon Apr 12 17:16:52 2010 (r22854)
+++ trunk/libavcodec/dca.c Mon Apr 12 18:05:10 2010 (r22855)
@@ -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, in
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)
More information about the ffmpeg-cvslog
mailing list