]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Deduplicate code by moving it outside the if/else
authorreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 31 Mar 2009 14:06:22 +0000 (14:06 +0000)
committerreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 31 Mar 2009 14:06:22 +0000 (14:06 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18269 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/interplayvideo.c

index ac0656c5d5ebc39a8cea9ca65de2461d80d59261..821181b5a6bdf8b9aa5d4a45123c60bc2bc880bd 100644 (file)
@@ -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            ] =