changeset 2690:9cd85de24bcb libavcodec

fix last coeff
author michael
date Tue, 17 May 2005 08:46:40 +0000
parents ed0ab6f82167
children a24b82b5a704
files vp3.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
             }
         }
     }