VSU works now
This commit is contained in:
+14
-2
@@ -40,6 +40,18 @@ static const uint8_t BG_TEMPLATES[][64] = {
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7 }
|
||||
};
|
||||
|
||||
/* 8-bit color magnitude by brightness level */
|
||||
static const uint8_t BRIGHT8[] = {
|
||||
0, 10, 16, 21, 25, 30, 33, 37, 40, 44, 47, 50, 53, 56, 59, 61,
|
||||
64, 67, 69, 72, 74, 77, 79, 82, 84, 86, 89, 91, 93, 95, 97,100,
|
||||
102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,131,
|
||||
133,135,137,139,141,142,144,146,148,149,151,153,155,156,158,160,
|
||||
161,163,165,166,168,170,171,173,175,176,178,179,181,183,184,186,
|
||||
187,189,190,192,194,195,197,198,200,201,203,204,206,207,209,210,
|
||||
212,213,215,216,217,219,220,222,223,225,226,227,229,230,232,233,
|
||||
235,236,237,239,240,241,243,244,246,247,248,250,251,252,254,255
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***************************** Module Functions ******************************/
|
||||
@@ -392,9 +404,9 @@ static void vipComputeBrightness(VB *sim) {
|
||||
brt[2] = repeat * sim->vip.brtRest[1];
|
||||
brt[3] = repeat * sim->vip.brtRest[2] + brt[2] + brt[1];
|
||||
|
||||
/* Scale brightness values to 0..255 */
|
||||
/* Transform brightness values to 0..255 */
|
||||
for (x = 1; x < 4; x++)
|
||||
sim->vip.dp.brt[x] = ((brt[x] > 127 ? 127 : brt[x]) * 510 + 127) / 254;
|
||||
sim->vip.dp.brt[x] = brt[x] > 127 ? 255 : BRIGHT8[brt[x]];
|
||||
}
|
||||
|
||||
/* Transfer one column of frame buffer pixels to output */
|
||||
|
||||
Reference in New Issue
Block a user