Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Setting the OSD colors; method cPalette::Colors
Hi,
in dvbosd.c (near line 63):
const eDvbColor *cPalette::Colors(int &FirstColor, int &LastColor)
{
for (FirstColor = 0; FirstColor < numColors; FirstColor++) {
if (!fetched[FirstColor]) {
for (LastColor = FirstColor; LastColor < numColors &&
!fetched[LastColor]; LastColor++)
fetched[LastColor] = true;
LastColor--; // the loop ended one past the last one!
return &color[FirstColor];
}
}
return NULL;
}
As far as I understand this, this method should deliver the color values for
the used palette entries. I think the result should be: from entry FirstColor
to entry LastColor the color is xxx. By iterative calling this method, all
colors for all used palette entries should be delivered. This is used to set
the OSD color in the DVB card.
I think in this method is a bug. Because, as it is implemented the method
will still run from the first !fetched color to the last !fetched color and
will deliver the color from the first entry, ignoring all the other colors.
The correct method should have:
for (LastColor = FirstColor; LastColor < numColors &&
!fetched[LastColor] && color[LastColor]==color[FirstColor]; LastColor++)
as the inner loop. With color[LastColor]==color[FirstColor] we assure that
the palette index is increased only when the color stays the same.
In my opinion this could be the reason for the problem with the changed OSD
colors.
After this change I see no difference in VDR's behavior. I'm wondering why
the OSD is working with the 'buggy' method. With the buggy method all palette
entries should be set to the first color which is usually the 0x0000007f
(half transparent black). From where does the OSD know the other colors (like
yellow a.s.o)? Could someone who has the changing color problem please check
if the correcture solves it?
Bye, Mike
Home |
Main Index |
Thread Index