Browse Source

hqx: Fix clipping error in idct put function

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
tags/n2.7
Ferdinand Oeinck Vittorio Giovara 10 years ago
parent
commit
0266988ccd
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      libavcodec/hqx.c
  2. +1
    -1
      tests/ref/fate/canopus-hqx422a

+ 1
- 1
libavcodec/hqx.c View File

@@ -182,7 +182,7 @@ static void hqx_idct_put(uint16_t *dst, ptrdiff_t stride,

for (i = 0; i < 8; i++) {
for (j = 0; j < 8; j++) {
int v = av_clip(block[j + i * 8] + 0x800, 0, 0x1000);
int v = av_clip(block[j + i * 8] + 0x800, 0, 0xFFF);
dst[j] = (v << 4) | (v >> 8);
}
dst += stride >> 1;


+ 1
- 1
tests/ref/fate/canopus-hqx422a View File

@@ -1,2 +1,2 @@
#tb 0: 1/25
0, 0, 0, 1, 8294400, 0x9b38264d
0, 0, 0, 1, 8294400, 0x9a22bebf

Loading…
Cancel
Save