shithub: h264bsd

Download patch

ref: 947024fb1ce0ab5b51a4464184969c6c06b4c966
parent: 12456bf78730f24735bce5d7a2fdd9700df78d3e
author: Matthew Stephure <[email protected]>
date: Tue Feb 4 12:18:11 EST 2014

Fix defect in yuv converter.
Clean up spaces/tabs

--- a/src/h264bsd_decoder.c
+++ b/src/h264bsd_decoder.c
@@ -1062,8 +1062,8 @@
 
 void yuvtorgb(int Y, int U, int V, u8 *rgb)
 {
-	int r, g, b, c, d, e;
-	
+    int r, g, b, c, d, e;
+    
     c = Y - 16;
     d = U - 128;
     e = V - 128;
@@ -1073,8 +1073,8 @@
    
     rgb[0] = 0xff;
     rgb[1] = CLIP1(r);
-	rgb[2] = CLIP1(g);
-	rgb[3] = CLIP1(b);
+    rgb[2] = CLIP1(g);
+    rgb[3] = CLIP1(b);
 }
 
 
@@ -1117,10 +1117,10 @@
     }
 
     out = pStorage->rgbConversionBuffer;
-
+    
     for(; h -= 2;){
         for(j = w_2; j--; ) {
-		    int u,v,y1,y2;
+            int u,v,y1,y2;
             
             y2 = yuvBytes[luma + w];
             y1 = yuvBytes[luma++];
@@ -1128,16 +1128,16 @@
             u = yuvBytes[uoffset++];
             v = yuvBytes[voffset++];
 
-		    yuvtorgb(y2, u, v, out);	
-            yuvtorgb(y1, u, v, (out+W));
-
+            yuvtorgb(y1, u, v, out);    
+            yuvtorgb(y2, u, v, (out+W));
+           
             out += 4;
 
             y2 = yuvBytes[luma + w];
             y1 = yuvBytes[luma++];
 
-            yuvtorgb(y2, u, v, out);	
-            yuvtorgb(y1, u, v, (out+W));
+            yuvtorgb(y1, u, v, out);    
+            yuvtorgb(y2, u, v, (out+W));
 
             out += 4;
         }
@@ -1144,6 +1144,7 @@
 
         luma += w;
         out += W;
-	}
+    }
+   
     return pStorage->rgbConversionBuffer;
 }
\ No newline at end of file