git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b7b7e23
)
snow: fix edge emu switch
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 11 Nov 2012 18:02:05 +0000
(19:02 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 11 Nov 2012 18:02:31 +0000
(19:02 +0100)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/snow.c
patch
|
blob
|
history
diff --git
a/libavcodec/snow.c
b/libavcodec/snow.c
index
a4fe8b6
..
2f3ddbe
100644
(file)
--- a/
libavcodec/snow.c
+++ b/
libavcodec/snow.c
@@
-343,8
+343,8
@@
void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride,
sx += (mx>>4) - (HTAPS_MAX/2-1);
sy += (my>>4) - (HTAPS_MAX/2-1);
src += sx + sy*stride;
- if( (unsigned)sx >=
w - b_w - (HTAPS_MAX-2
)
- || (unsigned)sy >=
h - b_h - (HTAPS_MAX-2
)){
+ if( (unsigned)sx >=
FFMAX(w - b_w - (HTAPS_MAX-2), 0
)
+ || (unsigned)sy >=
FFMAX(h - b_h - (HTAPS_MAX-2), 0
)){
s->dsp.emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h);
src= tmp + MB_SIZE;
}