changeset 250:3449316664b5 libavcodec

- Bug fix on RTYPE (rounding type) not being honoured by H.263+ decoder.
author pulento
date Fri, 22 Feb 2002 03:35:41 +0000
parents 42a0b7b16738
children 75091bfc577b
files h263.c i386/mpegvideo_mmx.c
diffstat 2 files changed, 15 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/h263.c	Tue Feb 19 19:23:34 2002 +0000
+++ b/h263.c	Fri Feb 22 03:35:41 2002 +0000
@@ -1447,7 +1447,10 @@
         if (s->pict_type != I_TYPE &&
             s->pict_type != P_TYPE)
             return -1;
-        skip_bits(&s->gb, 7);
+        skip_bits(&s->gb, 2);
+        s->no_rounding = get_bits1(&s->gb);
+        //fprintf(stderr, "\nRTYPE: %d", s->no_rounding);
+        skip_bits(&s->gb, 4);
         
         /* Get the picture dimensions */
         if (ufep) {
--- a/i386/mpegvideo_mmx.c	Tue Feb 19 19:23:34 2002 +0000
+++ b/i386/mpegvideo_mmx.c	Fri Feb 22 03:35:41 2002 +0000
@@ -95,17 +95,17 @@
             else
                 block[0] = block[0] * s->c_dc_scale;
         }
-	    for(i=1; i<8; i++) {
-		    level = block[i];
-		    if (level) {
-			    if (level < 0) {
-				    level = level * qmul - qadd;
-			    } else {
-				    level = level * qmul + qadd;
-			    }
-			    block[i] = level;
-		    }
-	    }
+        for(i=1; i<8; i++) {
+    	    level = block[i];
+	        if (level) {
+		        if (level < 0) {
+			        level = level * qmul - qadd;
+		        } else {
+			        level = level * qmul + qadd;
+		        }
+		        block[i] = level;
+            }
+        }
         nCoeffs=64;
     } else {
         i = 0;