diff options
author | Rostislav Pehlivanov <rpehlivanov@ob-encoder.com> | 2016-06-23 20:06:59 +0300 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2016-07-12 01:38:01 +0300 |
commit | 09d89d940635e34b0f61266d66fbb9802b18564c (patch) | |
tree | 972503d5dd77694917501c035e0e5ad4e253df95 /libavcodec/vc2enc.c | |
parent | b9c6c5f4539dfaf26e8484aece1b39f0a55f8fff (diff) |
diractab: expose the maximum quantization index as a macro
Prevents having to have random magic values in the decoder and a
separate macro in the encoder.
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
Diffstat (limited to 'libavcodec/vc2enc.c')
-rw-r--r-- | libavcodec/vc2enc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index bbbeaa090e..eda390163f 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -29,11 +29,8 @@ #include "vc2enc_dwt.h" #include "diractab.h" -/* Quantizations above this usually zero coefficients and lower the quality */ -#define MAX_QUANT_INDEX FF_ARRAY_ELEMS(ff_dirac_qscale_tab) - /* Total range is -COEF_LUT_TAB to +COEFF_LUT_TAB, but total tab size is half - * (COEF_LUT_TAB*MAX_QUANT_INDEX) since the sign is appended during encoding */ + * (COEF_LUT_TAB*DIRAC_MAX_QUANT_INDEX), as the sign is appended during encoding */ #define COEF_LUT_TAB 2048 /* The limited size resolution of each slice forces us to do this */ @@ -109,7 +106,7 @@ typedef struct Plane { typedef struct SliceArgs { PutBitContext pb; - int cache[MAX_QUANT_INDEX]; + int cache[DIRAC_MAX_QUANT_INDEX]; void *ctx; int x; int y; @@ -1074,7 +1071,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) s->picture_number = 0; /* Total allowed quantization range */ - s->q_ceil = MAX_QUANT_INDEX; + s->q_ceil = DIRAC_MAX_QUANT_INDEX; s->ver.major = 2; s->ver.minor = 0; |