Commit 0312b77c authored by Reimar Döffinger's avatar Reimar Döffinger

Slightly simplify part of ipvideo_decode_block_opcode_0x8

Originally committed as revision 18264 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 51e35028
...@@ -306,14 +306,15 @@ static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s) ...@@ -306,14 +306,15 @@ static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s)
/* need 10 more bytes */ /* need 10 more bytes */
CHECK_STREAM_PTR(10); CHECK_STREAM_PTR(10);
B[0] = *s->stream_ptr++; B[1] = *s->stream_ptr++;
B[2] = *s->stream_ptr++; B[3] = *s->stream_ptr++;
P[2] = *s->stream_ptr++; P[3] = *s->stream_ptr++;
B[4] = *s->stream_ptr++; B[5] = *s->stream_ptr++;
B[6] = *s->stream_ptr++; B[7] = *s->stream_ptr++;
if (P[2] <= P[3]) { if (P[2] <= P[3]) {
B[0] = *s->stream_ptr++; B[1] = *s->stream_ptr++;
B[2] = *s->stream_ptr++; B[3] = *s->stream_ptr++;
P[2] = *s->stream_ptr++; P[3] = *s->stream_ptr++;
B[4] = *s->stream_ptr++; B[5] = *s->stream_ptr++;
B[6] = *s->stream_ptr++; B[7] = *s->stream_ptr++;
/* vertical split; left & right halves are 2-color encoded */ /* vertical split; left & right halves are 2-color encoded */
for (y = 0; y < 8; y++) { for (y = 0; y < 8; y++) {
...@@ -355,18 +356,15 @@ static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s) ...@@ -355,18 +356,15 @@ static int ipvideo_decode_block_opcode_0x8(IpvideoContext *s)
for (y = 0; y < 8; y++) { for (y = 0; y < 8; y++) {
int bitmask; int bitmask;
flags = B[y]; if (y == 4) {
if (y == 0) { P[0] = *s->stream_ptr++;
P0 = P[0]; P[1] = *s->stream_ptr++;
P1 = P[1];
} else if (y == 4) {
P0 = P[2];
P1 = P[3];
} }
flags = *s->stream_ptr++;
for (bitmask = 0x01; bitmask <= 0x80; bitmask <<= 1) { for (bitmask = 0x01; bitmask <= 0x80; bitmask <<= 1) {
*s->pixel_ptr++ = flags & bitmask ? P1 : P0; *s->pixel_ptr++ = P[!!(flags & bitmask)];
} }
s->pixel_ptr += s->line_inc; s->pixel_ptr += s->line_inc;
} }
......
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