aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-06-20 22:03:00 +0000
committerAlex Converse <alex.converse@gmail.com>2010-06-20 22:03:00 +0000
commitc6b0947171ef34f0334441b663795658bda1afc7 (patch)
tree6acb789b9ddbeae6378b05654da49a9c2402410f
parent3fa1a93265c77abb23732a8a93a4a98d40f6c792 (diff)
downloadffmpeg-c6b0947171ef34f0334441b663795658bda1afc7.tar.gz
psdec: Replace a division with a shift.
Originally committed as revision 23667 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ps.c b/libavcodec/ps.c
index 7b86dd7767..acec35df73 100644
--- a/libavcodec/ps.c
+++ b/libavcodec/ps.c
@@ -20,6 +20,7 @@
*/
#include <stdint.h>
+#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "avcodec.h"
#include "get_bits.h"
@@ -191,7 +192,7 @@ int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps
ps->border_position[e] = get_bits(gb, 5);
} else
for (e = 1; e <= ps->num_env; e++)
- ps->border_position[e] = e * numQMFSlots / ps->num_env - 1;
+ ps->border_position[e] = (e * numQMFSlots >> ff_log2_tab[ps->num_env]) - 1;
if (ps->enable_iid) {
for (e = 0; e < ps->num_env; e++) {