diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-08-24 10:29:26 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-08-24 10:29:26 +0200 |
commit | 001ea567ff80c8b2d791b0ab86db8a442d1527f1 (patch) | |
tree | f5ab89ad4ad7cb7c2c9f006893f6e02e8938b434 | |
parent | fea156367d3074a3d3c743b49a9f03e23290ff4b (diff) | |
parent | a1926a29fb4325afa46842883f197c74d4535c36 (diff) | |
download | ffmpeg-001ea567ff80c8b2d791b0ab86db8a442d1527f1.tar.gz |
Merge commit 'a1926a29fb4325afa46842883f197c74d4535c36'
* commit 'a1926a29fb4325afa46842883f197c74d4535c36':
hevc: avoid invalid shifts of negative values
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavcodec/hevc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index d8da18d95a..3f1a2bb8ac 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -1331,7 +1331,7 @@ static void luma_mc_uni(HEVCContext *s, uint8_t *dst, ptrdiff_t dststride, x_off += mv->x >> 2; y_off += mv->y >> 2; - src += y_off * srcstride + x_off * (1 << s->ps.sps->pixel_shift); + src += y_off * srcstride + (x_off * (1 << s->ps.sps->pixel_shift)); if (x_off < QPEL_EXTRA_BEFORE || y_off < QPEL_EXTRA_AFTER || x_off >= pic_width - block_w - QPEL_EXTRA_AFTER || @@ -1486,7 +1486,7 @@ static void chroma_mc_uni(HEVCContext *s, uint8_t *dst0, x_off += mv->x >> (2 + hshift); y_off += mv->y >> (2 + vshift); - src0 += y_off * srcstride + x_off * (1 << s->ps.sps->pixel_shift); + src0 += y_off * srcstride + (x_off * (1 << s->ps.sps->pixel_shift)); if (x_off < EPEL_EXTRA_BEFORE || y_off < EPEL_EXTRA_AFTER || x_off >= pic_width - block_w - EPEL_EXTRA_AFTER || |