Académique Documents
Professionnel Documents
Culture Documents
“ART001”
By Laxer3A
1
Why we need more colors ?
PProcessing
i power, pin i count,t memory…
Everything increase, even in hobby electronic.
But most of the FPGA boards out there just
plain sucks to do nice 888 output.
“low end” (100$~500$)
$ $
Most of the time RGB111, 323, 333, etc...
“Middl
“Middle-end”
d” (500$
(500$~1000$)
1000$)
RGB 555 / 565, some 888 but not the other
feature you want.
want
“High-end” (>1000$)
RGB888 10-10-10
RGB888,10 10 10 and DVI
DVI, but
but… 2500$ ?
2
How do we simply display high colors
data on poor color depth displays.
MSB LSB
7 6 5 4 3 2 1 0
3
Ok now what ?
Ok,
Well we could average a color value by
the neighbor pixels (known as “dithering”)
7 6 5 4 3 2 1 0 Use the unused LSB, if “1”, the color
can be “averaged”.
5
Ok now what ?
Ok,
Previously,
Previously we have always the same pixel lit “up”
and lit “down”.
Whyy not switch at each frame ?
A B B A
B A A B
Frame 1 Frame 0
0 1 X LSB 0 1 X LSB
0 0 1 0 1 0
1 1
1 0 0 1
Y LSB Y LSB
(X xor Y) gives “Frame 1” pattern,
thus,, ((
((X xor Y)) == Frame)) for all cases.
To display. 8
No problem ? Part 1.
1
Add 1 or 0
Add 1 or 0
When B6-B1
Wh B6 B1 iis 111111 already,
l d overflow
fl occurs, result
lt is
i 000000 !
Let’s fix it by detecting the overflow case first.
Add
+ 0 B6 B5 B4 B3 B2 B1 B0
9
Overflow detector.
No problem ? Part 2.
2
We detect overflow, now fix the value.
Add
+ 0 B6 B5 B4 B3 B2 B1 B0
S7 S6 S5 S4 S3 S2 S1
OR S7 S7 S7 S7 S7 S7 If overflow,
S t to
Set t “max”
“ ” legal
l l value.
l
S’6 S’5 S’4 S’3 S’2 S’1 (111111) else do nothing
(OR with 000000)
Per pixel.
A ge
general
e a ADD b bitt co
computed
puted o
once
ce pe
per coo
coordinate.
d ate
(x xor y) == frame.
Globally.
A frame register bit inversed at each frame.
11
Results fpga ARE fun !
Results,
Original With this basic
RGB component post process
333 : 512 colors (15^3) 3,375 colors.
444 : 4,096
4 096 colors (31^3)
(31 3) 29,791
29 791 colors.
colors
13
Comments
Any comments are welcome.
laxer3a [[at-no-spam]
p ] hotmail dot com
14
References
Dithering (for further interest)
15