mirror of https://github.com/mpv-player/mpv
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:
parent
599647ff8c
commit
68200fa565
7
spudec.c
7
spudec.c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue