[MPlayer-cvslog] r31799 - trunk/spudec.c

reimar subversion at mplayerhq.hu
Sun Jul 25 11:41:30 CEST 2010


Author: reimar
Date: Sun Jul 25 11:41:30 2010
New Revision: 31799

Log:
Slightly simplify rle decoding.

Modified:
   trunk/spudec.c

Modified: trunk/spudec.c
==============================================================================
--- trunk/spudec.c	Sun Jul 25 11:33:49 2010	(r31798)
+++ trunk/spudec.c	Sun Jul 25 11:41:30 2010	(r31799)
@@ -300,13 +300,12 @@ static void spudec_process_data(spudec_h
     unsigned int rle = 0;
     rle = get_nibble(packet);
     if (rle < 0x04) {
-      rle = (rle << 4) | get_nibble(packet);
-      if (rle < 0x10) {
+      if (rle == 0) {
 	rle = (rle << 4) | get_nibble(packet);
-	if (rle < 0x040) {
+	if (rle < 0x04)
 	  rle = (rle << 4) | get_nibble(packet);
-	}
       }
+      rle = (rle << 4) | get_nibble(packet);
     }
     color = 3 - (rle & 0x3);
     len = rle >> 2;


More information about the MPlayer-cvslog mailing list