[FFmpeg-cvslog] r23667 - trunk/libavcodec/ps.c
alexc
subversion
Mon Jun 21 00:03:01 CEST 2010
Author: alexc
Date: Mon Jun 21 00:03:00 2010
New Revision: 23667
Log:
psdec: Replace a division with a shift.
Modified:
trunk/libavcodec/ps.c
Modified: trunk/libavcodec/ps.c
==============================================================================
--- trunk/libavcodec/ps.c Sun Jun 20 23:53:51 2010 (r23666)
+++ trunk/libavcodec/ps.c Mon Jun 21 00:03:00 2010 (r23667)
@@ -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 *avct
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++) {
More information about the ffmpeg-cvslog
mailing list