From acecd6b4d7fd7ca7e8a37e9c0aa4bc1868a5ae93 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 20 Oct 2013 00:33:29 +0200 Subject: [PATCH] avcodec/hevc_cabac: trivial simplifications Signed-off-by: Michael Niedermayer --- libavcodec/hevc_cabac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c index a1edf58c41..b7d77d24a8 100644 --- a/libavcodec/hevc_cabac.c +++ b/libavcodec/hevc_cabac.c @@ -1340,13 +1340,13 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, int last_coeff_abs_level_remaining = coeff_abs_level_remaining_decode(s, trans_coeff_level, c_rice_param); trans_coeff_level += last_coeff_abs_level_remaining; - if ((trans_coeff_level) > (3 * (1 << c_rice_param))) + if (trans_coeff_level > (3 << c_rice_param)) c_rice_param = FFMIN(c_rice_param + 1, 4); } if (s->pps->sign_data_hiding_flag && sign_hidden) { sum_abs += trans_coeff_level; - if (n == first_nz_pos_in_cg && ((sum_abs&1) == 1)) + if (n == first_nz_pos_in_cg && (sum_abs&1)) trans_coeff_level = -trans_coeff_level; } if (coeff_sign_flag >> 15)