Revision f02bd7e4 libavcodec/interplayvideo.c

View differences:

libavcodec/interplayvideo.c
212 212
        CHECK_STREAM_PTR(8);
213 213

  
214 214
        for (y = 0; y < 8; y++) {
215
            flags = *s->stream_ptr++;
216
            for (x = 0x01; x <= 0x80; x <<= 1) {
217
                *s->pixel_ptr++ = P[!!(flags & x)];
215
            flags = *s->stream_ptr++ | 0x100;
216
            for (; flags != 1; flags >>= 1) {
217
                *s->pixel_ptr++ = P[flags & 1];
218 218
            }
219 219
            s->pixel_ptr += s->line_inc;
220 220
        }
......
354 354
            /* horizontal split; top & bottom halves are 2-color encoded */
355 355

  
356 356
            for (y = 0; y < 8; y++) {
357
                int bitmask;
358

  
359 357
                if (y == 4) {
360 358
                    P[0] = *s->stream_ptr++;
361 359
                    P[1] = *s->stream_ptr++;
362 360
                }
363
                flags = *s->stream_ptr++;
361
                flags = *s->stream_ptr++ | 0x100;
364 362

  
365
                for (bitmask = 0x01; bitmask <= 0x80; bitmask <<= 1) {
363
                for (; flags != 1; flags >>= 1) {
366 364

  
367
                    *s->pixel_ptr++ = P[!!(flags & bitmask)];
365
                    *s->pixel_ptr++ = P[flags & 1];
368 366
                }
369 367
                s->pixel_ptr += s->line_inc;
370 368
            }

Also available in: Unified diff