/alps/ipecamera

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/ipecamera

« back to all changes in this revision

Viewing changes to data.c

  • Committer: Suren A. Chilingaryan
  • Date: 2015-04-28 21:35:25 UTC
  • Revision ID: csa@suren.me-20150428213525-i4m5dxn8xda8ow0y
Simplify size tracking in the reader

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
                
54
54
    pixels = ctx->image + buf_ptr * ctx->image_size;
55
55
    memset(ctx->cmask + ctx->buffer_pos * ctx->dim.height, 0, ctx->dim.height * sizeof(ipecamera_change_mask_t));
56
 
/*
57
 
    printf("decoding %lx...\n", ctx->raw_size);
 
56
 
 
57
/*    printf("decoding %lx...\n", ctx->raw_size);
58
58
    FILE *f = fopen("/mnt/frame.xxx", "w");
59
 
    fwrite(ctx->buffer + buf_ptr * ctx->padded_size, 1, ctx->raw_size, f);
60
 
    fclose(f);*/
61
 
    res = ufo_decoder_decode_frame(ctx->ipedec, ctx->buffer + buf_ptr * ctx->padded_size, ctx->raw_size, pixels, &ctx->frame[buf_ptr].event.meta);
62
 
//    puts("done\n");
 
59
    fwrite(ctx->buffer + buf_ptr * ctx->padded_size, 1, ctx->roi_raw_size, f);
 
60
    fclose(f);
 
61
    printf("%lu\n", ctx->raw_size);*/
 
62
    res = ufo_decoder_decode_frame(ctx->ipedec, ctx->buffer + buf_ptr * ctx->padded_size, ctx->frame[buf_ptr].event.raw_size, pixels, &ctx->frame[buf_ptr].event.meta);
63
63
    if (!res) {
64
64
#ifdef IPECAMERA_DEBUG_BROKEN_FRAMES
65
65
        char name[128];