dvisampler/dma: better 8:8:8 -> 10:10:10 conversion
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 9 May 2013 09:27:24 +0000 (11:27 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 9 May 2013 09:27:24 +0000 (11:27 +0200)
milkymist/dvisampler/dma.py

index 0013bc184108e5ef5a485b9dbb5fabe1e4c7ad61..1eddc4221a1ac4bda068d8a16f0c3500ca2a4a50 100644 (file)
@@ -98,9 +98,9 @@ class DMA(Module):
                encoded_pixel = Signal(32)
                self.comb += [
                        encoded_pixel.eq(Cat(
-                               Replicate(0, 2), self.frame.payload.b,
-                               Replicate(0, 2), self.frame.payload.g,
-                               Replicate(0, 2), self.frame.payload.r))
+                               self.frame.payload.b[6:], self.frame.payload.b,
+                               self.frame.payload.g[6:], self.frame.payload.g,
+                               self.frame.payload.r[6:], self.frame.payload.r))
                ]
                pack_factor = bus_dw//32
                assert(pack_factor & (pack_factor - 1) == 0) # only support powers of 2