# HG changeset patch # User michael # Date 1116319600 0 # Node ID 9cd85de24bcbad7658bdc191366332a5d824f7aa # Parent ed0ab6f8216725820fdd646137340b75d0a7c441 fix last coeff diff -r ed0ab6f82167 -r 9cd85de24bcb vp3.c --- a/vp3.c Tue May 17 00:52:29 2005 +0000 +++ b/vp3.c Tue May 17 08:46:40 2005 +0000 @@ -833,7 +833,7 @@ for (i = 0; i < s->fragment_count; i++) { s->all_fragments[i].coeffs = zero_block; s->all_fragments[i].coeff_count = 0; - s->all_fragments[i].last_coeff = 0; + s->all_fragments[i].last_coeff = -1; s->all_fragments[i].motion_x = 0xbeef; s->all_fragments[i].motion_y = 0xbeef; } @@ -2036,6 +2036,8 @@ /* save the DC */ last_dc[current_frame_type] = s->all_fragments[i].coeffs[0]; + if(s->all_fragments[i].coeffs[0] && s->all_fragments[i].last_coeff<0) + s->all_fragments[i].last_coeff= 0; } } }