Merge commit 'a1926a29fb4325afa46842883f197c74d4535c36'

* commit 'a1926a29fb4325afa46842883f197c74d4535c36':
  hevc: avoid invalid shifts of negative values

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
Hendrik Leppkes 2015-08-24 10:29:26 +02:00
commit 001ea567ff
1 changed files with 2 additions and 2 deletions

View File

@ -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 ||