Author: conrad
Date: Thu Dec 4 22:10:25 2008
New Revision: 3859
Log:
Use shifts rather than division
Modified:
dirac/libavcodec/dirac.h
Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h (original)
+++ dirac/libavcodec/dirac.h Thu Dec 4 22:10:25 2008
@@ -271,7 +271,7 @@ static int inline subband_height(DiracCo
// which schoedinger and dirac-research also assume
static unsigned int inline coeff_quant_factor(unsigned int quant)
{
- uint64_t base = 1 << (quant / 4);
+ uint64_t base = 1 << (quant >> 2);
switch(quant & 3) {
case 0:
return base << 2;
@@ -298,7 +298,7 @@ static unsigned int inline coeff_quant_o
return (coeff_quant_factor(quant) + 1) >> 1;
}
- return (coeff_quant_factor(quant) * 3 + 4) / 8;
+ return (coeff_quant_factor(quant) * 3 + 4) >> 3;
}
/**
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc