Commit 8daa05a2 authored by reimar's avatar reimar

Simplify color_flags calculation, remove a pointless initialization

and use AV_RB16 where possible.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19925 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4f35ac15
...@@ -366,16 +366,11 @@ static void smc_decode_stream(SmcContext *s) ...@@ -366,16 +366,11 @@ static void smc_decode_stream(SmcContext *s)
flags_a = xx012456, flags_b = xx89A37B flags_a = xx012456, flags_b = xx89A37B
*/ */
/* build the color flags */ /* build the color flags */
color_flags_a = color_flags_b = 0;
color_flags_a = color_flags_a =
(s->buf[stream_ptr + 0] << 16) | ((AV_RB16(s->buf + stream_ptr ) & 0xFFF0) << 8) |
((s->buf[stream_ptr + 1] & 0xF0) << 8) | (AV_RB16(s->buf + stream_ptr + 2) >> 4);
((s->buf[stream_ptr + 2] & 0xF0) << 4) |
((s->buf[stream_ptr + 2] & 0x0F) << 4) |
((s->buf[stream_ptr + 3] & 0xF0) >> 4);
color_flags_b = color_flags_b =
(s->buf[stream_ptr + 4] << 16) | ((AV_RB16(s->buf + stream_ptr + 4) & 0xFFF0) << 8) |
((s->buf[stream_ptr + 5] & 0xF0) << 8) |
((s->buf[stream_ptr + 1] & 0x0F) << 8) | ((s->buf[stream_ptr + 1] & 0x0F) << 8) |
((s->buf[stream_ptr + 3] & 0x0F) << 4) | ((s->buf[stream_ptr + 3] & 0x0F) << 4) |
(s->buf[stream_ptr + 5] & 0x0F); (s->buf[stream_ptr + 5] & 0x0F);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment