Revision c83a5281 libavcodec/flashsv2enc.c

View differences:

libavcodec/flashsv2enc.c
315 315
    buf[buf_pos++] = b->flags;
316 316

  
317 317
    if (b->flags & HAS_DIFF_BLOCKS) {
318
        buf[buf_pos++] = (uint8_t) (b->start);
319
        buf[buf_pos++] = (uint8_t) (b->len);
318
        buf[buf_pos++] = (b->start);
319
        buf[buf_pos++] = (b->len);
320 320
    }
321 321

  
322 322
    if (b->flags & ZLIB_PRIME_COMPRESS_CURRENT) {
323 323
        //This feature of the format is poorly understood, and as of now, unused.
324
        buf[buf_pos++] = (uint8_t) (b->col);
325
        buf[buf_pos++] = (uint8_t) (b->row);
324
        buf[buf_pos++] = (b->col);
325
        buf[buf_pos++] = (b->row);
326 326
    }
327 327

  
328 328
    memcpy(buf + buf_pos, b->data, b->data_size);
......
437 437
    int c7 = pixel_color7_fast(palette, c15);
438 438
    int d7 = chroma_diff(color, palette->colors[c7]);
439 439
    if (dist + d15 >= d7) {
440
        dest[0] = (uint8_t) c7;
440
        dest[0] = c7;
441 441
        return 1;
442 442
    } else {
443
        dest[0] = 0x80 | (uint8_t) (c15 >> 8);
443
        dest[0] = 0x80 | (c15 >> 8);
444 444
        dest[1] = c15 & 0xff;
445 445
        return 2;
446 446
    }

Also available in: Unified diff