aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/jpeg2000.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-27 17:46:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-27 17:50:54 +0200
commit1b5cb6c00a170ebd850dc14cf23b33b5644f7909 (patch)
tree1a17ba2e867a89c7eebfdb9f6b2b75c98ffe9a89 /libavcodec/jpeg2000.c
parent9a18395b92f021938e1db29100f6c8ca690d3ab7 (diff)
downloadffmpeg-1b5cb6c00a170ebd850dc14cf23b33b5644f7909.tar.gz
j2k/jpeg2000: Partially merge quantization code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000.c')
-rw-r--r--libavcodec/jpeg2000.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 988adeba5f..5b15efcc29 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -267,15 +267,15 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
int numbps;
case JPEG2000_QSTY_NONE:
/* TODO: to verify. No quantization in this case */
+ band->stepsize = (float) (1 << 13);
+ break;
+ case JPEG2000_QSTY_SI:
+ /*TODO: Compute formula to implement. */
numbps = cbps +
lut_gain[codsty->transform][bandno + reslevelno > 0];
band->stepsize = (float)SHL(2048 + qntsty->mant[gbandno],
2 + numbps - qntsty->expn[gbandno]);
break;
- case JPEG2000_QSTY_SI:
- /*TODO: Compute formula to implement. */
- band->stepsize = (float) (1 << 13);
- break;
case JPEG2000_QSTY_SE:
/* Exponent quantization step.
* Formula: