# HG changeset patch # User michael # Date 1136414051 0 # Node ID 088920c095fc8d75e6a0855c5b65480a48ea8fb2 # Parent 037518fde4bd73548b67d1824039fb1f490a2105 cleanup fix 4mv playback distortions diff -r 037518fde4bd -r 088920c095fc snow.c --- a/snow.c Wed Jan 04 17:07:30 2006 +0000 +++ b/snow.c Wed Jan 04 22:34:11 2006 +0000 @@ -1359,15 +1359,11 @@ static void spatial_compose53i_dy_buffered(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line){ int y= cs->y; - int mirror0 = mirror(y-1, height-1); - int mirror1 = mirror(y , height-1); - int mirror2 = mirror(y+1, height-1); - int mirror3 = mirror(y+2, height-1); DWTELEM *b0= cs->b0; DWTELEM *b1= cs->b1; - DWTELEM *b2= slice_buffer_get_line(sb, mirror2 * stride_line); - DWTELEM *b3= slice_buffer_get_line(sb, mirror3 * stride_line); + DWTELEM *b2= slice_buffer_get_line(sb, mirror(y+1, height-1) * stride_line); + DWTELEM *b3= slice_buffer_get_line(sb, mirror(y+2, height-1) * stride_line); {START_TIMER if(y+1<(unsigned)height) vertical_compose53iL0(b1, b2, b3, width); @@ -1511,18 +1507,12 @@ static void spatial_compose97i_dy_buffered(dwt_compose_t *cs, slice_buffer * sb, int width, int height, int stride_line){ int y = cs->y; - int mirror0 = mirror(y - 1, height - 1); - int mirror1 = mirror(y + 0, height - 1); - int mirror2 = mirror(y + 1, height - 1); - int mirror3 = mirror(y + 2, height - 1); - int mirror4 = mirror(y + 3, height - 1); - int mirror5 = mirror(y + 4, height - 1); DWTELEM *b0= cs->b0; DWTELEM *b1= cs->b1; DWTELEM *b2= cs->b2; DWTELEM *b3= cs->b3; - DWTELEM *b4= slice_buffer_get_line(sb, mirror4 * stride_line); - DWTELEM *b5= slice_buffer_get_line(sb, mirror5 * stride_line); + DWTELEM *b4= slice_buffer_get_line(sb, mirror(y + 3, height - 1) * stride_line); + DWTELEM *b5= slice_buffer_get_line(sb, mirror(y + 4, height - 1) * stride_line); {START_TIMER if(y>0 && y+4400 && mirror0 <= mirror2){ +if(width>400 && y+0<(unsigned)height){ STOP_TIMER("horizontal_compose97i")}} cs->b0=b2; @@ -1558,14 +1548,6 @@ DWTELEM *b4= buffer + mirror(y+3, height-1)*stride; DWTELEM *b5= buffer + mirror(y+4, height-1)*stride; - if(stride == width && y+4 < height && 0){ - int x; - for(x=0; x> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + 2: 0); - end_y = (((block_w * our_mb_end) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + 2); + const int extra= 3; + start_y = (mb_y ? ((block_w * our_mb_start) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra: 0); + end_y = (((block_w * our_mb_end) >> (s->spatial_decomposition_count - level)) + s->spatial_decomposition_count - level + extra); if (!(s->keyframe || s->avctx->debug&512)){ start_y = FFMAX(0, start_y - (block_w >> (1+s->spatial_decomposition_count - level))); end_y = FFMAX(0, end_y - (block_w >> (1+s->spatial_decomposition_count - level)));