diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-09-29 17:17:25 +0200 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-09-29 17:17:25 +0200 |
commit | a5b7097da6f19c3c6b260f4675c55e83c6db9285 (patch) | |
tree | 6069fcd510ec0f4b54707ef205f6fde39256925d /spuencoder.c | |
parent | 635ca78b8455523c99408ec68684dbed70f40164 (diff) | |
download | vdr-plugin-dxr3-a5b7097da6f19c3c6b260f4675c55e83c6db9285.tar.gz vdr-plugin-dxr3-a5b7097da6f19c3c6b260f4675c55e83c6db9285.tar.bz2 |
fix wrong indexes used color and constrat write
Diffstat (limited to 'spuencoder.c')
-rw-r--r-- | spuencoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spuencoder.c b/spuencoder.c index a3b3395..d4f1e8a 100644 --- a/spuencoder.c +++ b/spuencoder.c @@ -161,14 +161,14 @@ void cSpuEncoder::writeColorAndAlpha(sSection *sec, bool withCMD) if (withCMD) { spu[written++] = CMD_SET_COLOR; } - spu[written++] = (sec->colIndex[0] << 4) | (sec->colIndex[1] & 0x0f); - spu[written++] = (sec->colIndex[2] << 4) | (sec->colIndex[3] & 0x0f); + spu[written++] = (sec->colIndex[3] << 4) | (sec->colIndex[2] & 0x0f); + spu[written++] = (sec->colIndex[1] << 4) | (sec->colIndex[0] & 0x0f); if (withCMD) { spu[written++] = CMD_SET_ALPHA; } - spu[written++] = (opacity[sec->colIndex[0]] << 4) | (opacity[sec->colIndex[1]] & 0x0f); - spu[written++] = (opacity[sec->colIndex[2]] << 4) | (opacity[sec->colIndex[3]] & 0x0f); + spu[written++] = (opacity[sec->colIndex[3]] << 4) | (opacity[sec->colIndex[2]] & 0x0f); + spu[written++] = (opacity[sec->colIndex[1]] << 4) | (opacity[sec->colIndex[0]] & 0x0f); } void cSpuEncoder::writeRegionInformation() |