summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-30 14:34:33 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-30 14:43:09 +0200
commit09e03a84674f9b86415f47f09494a5730aae2a5f (patch)
tree1caee21c87ac0109a5eb3ce7fa1e086a4b22888d /libavcodec
parentefc2df2e27cc00e241b54292b0080af7245552ce (diff)
jpeg2000: merges quantization fixes from j2k
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/jpeg2000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index da74184b79..1610a210cd 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -273,12 +273,12 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
int numbps;
case JPEG2000_QSTY_NONE:
/* TODO: to verify. No quantization in this case */
- band->f_stepsize = (float) (1 << 13);
+ band->f_stepsize = 1;
break;
case JPEG2000_QSTY_SI:
/*TODO: Compute formula to implement. */
numbps = cbps +
- lut_gain[codsty->transform][bandno + (reslevelno > 0)];
+ lut_gain[codsty->transform == FF_DWT53][bandno + (reslevelno > 0)];
band->f_stepsize = (float)SHL(2048 + qntsty->mant[gbandno],
2 + numbps - qntsty->expn[gbandno]);
break;