repositories
/
deb_ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Debian version 2.5.2~trusty
[deb_ffmpeg.git]
/
ffmpeg
/
libavcodec
/
utvideodec.c
diff --git
a/ffmpeg/libavcodec/utvideodec.c
b/ffmpeg/libavcodec/utvideodec.c
index afd56ea1bdf6ed9860e21e147443e55a32f6190f..3a3c46e0bc6695052dcd753e116efae3fd892dd8 100644
(file)
--- a/
ffmpeg/libavcodec/utvideodec.c
+++ b/
ffmpeg/libavcodec/utvideodec.c
@@
-56,13
+56,14
@@
static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
*fsym = he[0].sym;
return 0;
}
*fsym = he[0].sym;
return 0;
}
- if (he[0].len > 32)
- return -1;
last = 255;
while (he[last].len == 255 && last)
last--;
last = 255;
while (he[last].len == 255 && last)
last--;
+ if (he[last].len > 32)
+ return -1;
+
code = 1;
for (i = last; i >= 0; i--) {
codes[i] = code >> (32 - he[i].len);
code = 1;
for (i = last; i >= 0; i--) {
codes[i] = code >> (32 - he[i].len);
@@
-214,6
+215,8
@@
static void restore_median(uint8_t *src, int step, int stride,
slice_height = ((((slice + 1) * height) / slices) & cmask) -
slice_start;
slice_height = ((((slice + 1) * height) / slices) & cmask) -
slice_start;
+ if (!slice_height)
+ continue;
bsrc = src + slice_start * stride;
// first line - left neighbour prediction
bsrc = src + slice_start * stride;
// first line - left neighbour prediction
@@
-224,7
+227,7
@@
static void restore_median(uint8_t *src, int step, int stride,
A = bsrc[i];
}
bsrc += stride;
A = bsrc[i];
}
bsrc += stride;
- if (slice_height
=
= 1)
+ if (slice_height
<
= 1)
continue;
// second line - first element has top prediction, the rest uses median
C = bsrc[-stride];
continue;
// second line - first element has top prediction, the rest uses median
C = bsrc[-stride];
@@
-269,6
+272,8
@@
static void restore_median_il(uint8_t *src, int step, int stride,
slice_height = ((((slice + 1) * height) / slices) & cmask) -
slice_start;
slice_height >>= 1;
slice_height = ((((slice + 1) * height) / slices) & cmask) -
slice_start;
slice_height >>= 1;
+ if (!slice_height)
+ continue;
bsrc = src + slice_start * stride;
bsrc = src + slice_start * stride;
@@
-284,7
+289,7
@@
static void restore_median_il(uint8_t *src, int step, int stride,
A = bsrc[stride + i];
}
bsrc += stride2;
A = bsrc[stride + i];
}
bsrc += stride2;
- if (slice_height
=
= 1)
+ if (slice_height
<
= 1)
continue;
// second line - first element has top prediction, the rest uses median
C = bsrc[-stride2];
continue;
// second line - first element has top prediction, the rest uses median
C = bsrc[-stride2];