Merge commit 'ff486c0f7f6b2ace3f0238660bc06cc35b389676'

* commit 'ff486c0f7f6b2ace3f0238660bc06cc35b389676':
  hevc: Do not right shift a negative value in get_pcm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-02-23 22:10:58 +01:00
commit a2e4b23bfe
1 changed files with 8 additions and 4 deletions

View File

@ -283,11 +283,15 @@ static void sao_filter_CTB(HEVCContext *s, int x, int y)
static int get_pcm(HEVCContext *s, int x, int y) static int get_pcm(HEVCContext *s, int x, int y)
{ {
int log2_min_pu_size = s->sps->log2_min_pu_size; int log2_min_pu_size = s->sps->log2_min_pu_size;
int x_pu = x >> log2_min_pu_size; int x_pu, y_pu;
int y_pu = y >> log2_min_pu_size;
if (x < 0 || x_pu >= s->sps->min_pu_width || if (x < 0 || y < 0)
y < 0 || y_pu >= s->sps->min_pu_height) return 2;
x_pu = x >> log2_min_pu_size;
y_pu = y >> log2_min_pu_size;
if (x_pu >= s->sps->min_pu_width || y_pu >= s->sps->min_pu_height)
return 2; return 2;
return s->is_pcm[y_pu * s->sps->min_pu_width + x_pu]; return s->is_pcm[y_pu * s->sps->min_pu_width + x_pu];
} }