summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/hevc_filter.c')
-rw-r--r--libavcodec/hevc_filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index bb1e360dd4..f3c655416a 100644
--- a/libavcodec/hevc_filter.c
+++ b/libavcodec/hevc_filter.c
@@ -158,8 +158,8 @@ void ff_hevc_set_qPy(HEVCContext *s, int xC, int yC,
if (s->HEVClc.tu.cu_qp_delta != 0) {
int off = s->sps->qp_bd_offset;
- s->HEVClc.qp_y = ((qp_y + s->HEVClc.tu.cu_qp_delta + 52 + 2 * off) %
- (52 + off)) - off;
+ s->HEVClc.qp_y = FFUMOD(qp_y + s->HEVClc.tu.cu_qp_delta + 52 + 2 * off,
+ 52 + off) - off;
} else
s->HEVClc.qp_y = qp_y;
}