Commit 58d14d1b authored by michael's avatar michael

Snow segfault bug in revision 1.43 patch by (Yartrebo /yartrebo earthlink net/)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4126 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fd7e4da4
...@@ -2758,7 +2758,7 @@ static always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * ...@@ -2758,7 +2758,7 @@ static always_inline void predict_slice_buffered(SnowContext *s, slice_buffer *
return; return;
if(add){ if(add){
for(y=block_w*mb_y; y<block_w*(mb_y+1); y++) for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++)
{ {
// DWTELEM * line = slice_buffer_get_line(sb, y); // DWTELEM * line = slice_buffer_get_line(sb, y);
DWTELEM * line = sb->line[y]; DWTELEM * line = sb->line[y];
...@@ -2772,7 +2772,7 @@ static always_inline void predict_slice_buffered(SnowContext *s, slice_buffer * ...@@ -2772,7 +2772,7 @@ static always_inline void predict_slice_buffered(SnowContext *s, slice_buffer *
} }
} }
}else{ }else{
for(y=block_w*mb_y; y<block_w*(mb_y+1); y++) for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++)
{ {
// DWTELEM * line = slice_buffer_get_line(sb, y); // DWTELEM * line = slice_buffer_get_line(sb, y);
DWTELEM * line = sb->line[y]; DWTELEM * line = sb->line[y];
...@@ -2826,7 +2826,7 @@ static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_ ...@@ -2826,7 +2826,7 @@ static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_
return; return;
if(add){ if(add){
for(y=block_w*mb_y; y<block_w*(mb_y+1); y++){ for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++){
for(x=0; x<w; x++){ for(x=0; x<w; x++){
int v= buf[x + y*w] + (128<<FRAC_BITS) + (1<<(FRAC_BITS-1)); int v= buf[x + y*w] + (128<<FRAC_BITS) + (1<<(FRAC_BITS-1));
v >>= FRAC_BITS; v >>= FRAC_BITS;
...@@ -2835,7 +2835,7 @@ static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_ ...@@ -2835,7 +2835,7 @@ static always_inline void predict_slice(SnowContext *s, DWTELEM *buf, int plane_
} }
} }
}else{ }else{
for(y=block_w*mb_y; y<block_w*(mb_y+1); y++){ for(y=block_w*mb_y; y<FFMIN(h,block_w*(mb_y+1)); y++){
for(x=0; x<w; x++){ for(x=0; x<w; x++){
buf[x + y*w]-= 128<<FRAC_BITS; buf[x + y*w]-= 128<<FRAC_BITS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment