shithub: h264bsd

Download patch

ref: 58835957cf497b4f9dd9d7bb8252bc1a9f3c5a11
parent: 50eb34662722e6ee8d48f9f5109d4ea3e5d8cddc
author: Sam Leitch <sam.leitch@calgaryscientific.com>
date: Tue Mar 18 12:51:11 EDT 2014

Cleaned up some dead code.

binary files a/flex/lib/h264bsd_asm.swc b/flex/lib/h264bsd_asm.swc differ
--- a/src/h264bsd_decoder.c
+++ b/src/h264bsd_decoder.c
@@ -1167,11 +1167,11 @@
     int y = 0;
 
     size_t ySize = w * h;
-    size_t uSize = w/2 * h/2;
+    size_t cbSize = w/2 * h/2;
 
     u8* luma = data;
     u8* cb = data + ySize;
-    u8* cr = data + ySize + uSize;
+    u8* cr = data + ySize + cbSize;
     u32* rgba = pOutput;
 
     while(y < h)
@@ -1248,11 +1248,11 @@
     int y = 0;
 
     size_t ySize = w * h;
-    size_t uSize = w/2 * h/2;
+    size_t cbSize = w/2 * h/2;
 
     u8* luma = data;
     u8* cb = data + ySize;
-    u8* cr = data + ySize + uSize;
+    u8* cr = data + ySize + cbSize;
     u32* bgra = pOutput;
 
     while(y < h)
@@ -1328,23 +1328,15 @@
     int y = 0;
 
     size_t ySize = w * h;
-    size_t uSize = w/2 * h/2;
+    size_t cbSize = w/2 * h/2;
 
     u8* luma = data;
     u8* cb = data + ySize;
-    u8* cr = data + ySize + uSize;
+    u8* cr = data + ySize + cbSize;
     u32* yCbCr = pOutput;
 
     while(y < h)
     {
-        int c =  - 16;
-        int d =  - 128;
-        int e = *cr - 128;
-
-        u32 r = (u32)CLIP1((298*c         + 409*e + 128) >> 8);
-        u32 g = (u32)CLIP1((298*c - 100*d - 208*e + 128) >> 8);
-        u32 b = (u32)CLIP1((298*c + 516*d         + 128) >> 8);
-
         u32 pixel = 0xff;
         pixel = (pixel << 8) + *cr;
         pixel = (pixel << 8) + *cb;