diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-31 14:06:22 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-03-31 14:06:22 +0000 |
commit | 1548839e513b4f782b1b5ebac3cdecb0abd1d84c (patch) | |
tree | 6a9acff07737300a48c0e128d1a349d66d276fc5 /libavcodec | |
parent | 268a618ba6f94f01fe8762de13fa7c29d50e9cdc (diff) | |
download | ffmpeg-1548839e513b4f782b1b5ebac3cdecb0abd1d84c.tar.gz |
Deduplicate code by moving it outside the if/else
Originally committed as revision 18269 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/interplayvideo.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index ac0656c5d5..821181b5a6 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -421,13 +421,13 @@ static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s) } } else { - if (P[2] <= P[3]) { uint64_t flags; - /* 1 of 4 colors for each 2x1 block, need 8 more bytes */ + /* 1 of 4 colors for each 2x1 or 1x2 block, need 8 more bytes */ CHECK_STREAM_PTR(8); flags = bytestream_get_le64(&s->stream_ptr); + if (P[2] <= P[3]) { for (y = 0; y < 8; y++) { for (x = 0; x < 8; x += 2, flags >>= 2) { s->pixel_ptr[x ] = @@ -436,12 +436,6 @@ static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s) s->pixel_ptr += s->stride; } } else { - uint64_t flags; - - /* 1 of 4 colors for each 1x2 block, need 8 more bytes */ - CHECK_STREAM_PTR(8); - - flags = bytestream_get_le64(&s->stream_ptr); for (y = 0; y < 8; y += 2) { for (x = 0; x < 8; x++, flags >>= 2) { s->pixel_ptr[x ] = |