changeset 604:4344cc8033bd libavcodec

skip blocks with small chroma dc too (if the user wants it) needed to avoid IDCT(input coeffs !=0) == 0 problems which cause catastrophic error accumulation at qp=1
author michaelni
date Sat, 17 Aug 2002 20:10:27 +0000
parents 442dede8795b
children 40874804a5af
files mpegvideo.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo.c	Tue Aug 13 18:51:11 2002 +0000
+++ b/mpegvideo.c	Sat Aug 17 20:10:27 2002 +0000
@@ -1589,7 +1589,11 @@
     const int last_index= s->block_last_index[n];
 
     if(skip_dc) skip_dc=1;
-    
+    if(threshold<0){
+        skip_dc=0;
+        threshold= -threshold;
+    }
+
     /* are all which we could set to zero are allready zero? */
     if(last_index<=skip_dc - 1) return;