The minimum weight value is 32 so this test can be skipped for the
10-bit case. Overall speedup 3-4%.
Signed-off-by: Mans Rullgard <mans@mansr.com>
| ... | ... |
@@ -239,7 +239,7 @@ static av_always_inline void dnxhd_decode_dct_block(DNXHDContext *ctx, |
| 239 | 239 |
//av_log(ctx->avctx, AV_LOG_DEBUG, "j %d\n", j); |
| 240 | 240 |
//av_log(ctx->avctx, AV_LOG_DEBUG, "level %d, weight %d\n", level, weight_matrix[i]); |
| 241 | 241 |
level = (2*level+1) * qscale * weight_matrix[i]; |
| 242 |
- if (weight_matrix[i] != level_bias) |
|
| 242 |
+ if (level_bias < 32 || weight_matrix[i] != level_bias) |
|
| 243 | 243 |
level += level_bias; |
| 244 | 244 |
level >>= level_shift; |
| 245 | 245 |
|