spudec.c: Slightly simplify rle decoding

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31799 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-07-25 09:41:30 +00:00 committed by Uoti Urpala
parent 599647ff8c
commit 68200fa565
1 changed files with 3 additions and 4 deletions

View File

@ -298,13 +298,12 @@ static void spudec_process_data(spudec_handle_t *this, packet_t *packet)
unsigned int rle = 0;
rle = get_nibble(packet);
if (rle < 0x04) {
rle = (rle << 4) | get_nibble(packet);
if (rle < 0x10) {
if (rle == 0) {
rle = (rle << 4) | get_nibble(packet);
if (rle < 0x040) {
if (rle < 0x04)
rle = (rle << 4) | get_nibble(packet);
}
}
rle = (rle << 4) | get_nibble(packet);
}
color = 3 - (rle & 0x3);
len = rle >> 2;