Skip to content

Commit

Permalink
Improve 6847 palette discrimination
Browse files Browse the repository at this point in the history
  • Loading branch information
IanSB committed Nov 9, 2020
1 parent 5a8645b commit 6c07ad3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/osd.c
Expand Up @@ -2166,8 +2166,8 @@ void generate_palettes() {
switch (luma) {
case 0x00:
case 0x10: //alt
case 0x02: //alt
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, black_ref, 2000, 2000, &r, &g, &b, &m); break; // black
case 0x02: //alt
case 0x12:
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 420, 2000, 2000, &r, &g, &b, &m); break; // white (buff)
}
Expand Down Expand Up @@ -2216,8 +2216,8 @@ void generate_palettes() {
switch (luma) {
case 0x00:
case 0x10: //alt
case 0x02: //alt
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 720, 2000, 2000, &r, &g, &b, &m); break; // black
case 0x02: //alt
case 0x12:
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 420, 2000, 2000, &r, &g, &b, &m); break; // white (buff)
}
Expand Down Expand Up @@ -2266,8 +2266,8 @@ void generate_palettes() {
switch (luma) {
case 0x00:
case 0x10: //alt
case 0x02: //alt
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 720, 2000, 2000, &r, &g, &b, &m); r = 9; g = 9; b = 9; break; // black
case 0x02: //alt
case 0x12:
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 420, 2000, 2000, &r, &g, &b, &m); r = 255; g = 255; b = 255; break; // white (buff)
}
Expand Down Expand Up @@ -2316,8 +2316,8 @@ void generate_palettes() {
switch (luma) {
case 0x00:
case 0x10: //alt
case 0x02: //alt
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, black_ref, 2000, 2000, &r, &g, &b, &m); r=0x00; g=0x00; b=0x00; break; // black
case 0x02: //alt
case 0x12:
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 420, 2000, 2000, &r, &g, &b, &m); r=0xff; g=0xff; b=0xff; break; // white (buff)
}
Expand Down Expand Up @@ -2366,8 +2366,8 @@ void generate_palettes() {
switch (luma) {
case 0x00:
case 0x10: //alt
case 0x02: //alt
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, black_ref, 2000, 2000, &r, &g, &b, &m); r=0x00; g=0x00; b=0x00; break; // black
case 0x02: //alt
case 0x12:
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 420, 2000, 2000, &r, &g, &b, &m); r=0xff; g=0xff; b=0xff; break; // white (buff)
}
Expand Down Expand Up @@ -2416,8 +2416,8 @@ void generate_palettes() {
switch (luma) {
case 0x00:
case 0x10: //alt
case 0x02: //alt
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 720, 2000, 2000, &r, &g, &b, &m); r=0x00; g=0x00; b=0x00; break; // black
case 0x02: //alt
case 0x12:
yuv2rgb(maxdesat, mindesat, luma_scale, black_ref, 420, 2000, 2000, &r, &g, &b, &m); r=0xff; g=0xff; b=0xff; break; // white (buff)
}
Expand Down

0 comments on commit 6c07ad3

Please sign in to comment.