コード例 #1
0
SPAN_DECLARE(int) t4_rx_start_page(t4_rx_state_t *s)
{
    span_log(&s->logging, SPAN_LOG_FLOW, "Start rx page %d - compression %s\n", s->current_page, t4_encoding_to_str(s->line_encoding));

    switch (s->line_encoding)
    {
    case T4_COMPRESSION_ITU_T4_1D:
    case T4_COMPRESSION_ITU_T4_2D:
    case T4_COMPRESSION_ITU_T6:
        t4_t6_decode_restart(&s->decoder.t4_t6, s->image_width);
        break;
    case T4_COMPRESSION_ITU_T42:
        t42_decode_restart(&s->decoder.t42);
        break;
#if defined(SPANDSP_SUPPORT_T43)
    case T4_COMPRESSION_ITU_T43:
        t43_decode_restart(&s->decoder.t43);
        break;
#endif
    case T4_COMPRESSION_ITU_T85:
    case T4_COMPRESSION_ITU_T85_L0:
        t85_decode_restart(&s->decoder.t85);
        break;
    }
    s->line_image_size = 0;
    s->tiff.image_size = 0;

    time (&s->tiff.page_start_time);

    return 0;
}
コード例 #2
0
ファイル: t4_rx.c プロジェクト: odmanV2/freecenter
SPAN_DECLARE(int) t4_rx_start_page(t4_rx_state_t *s)
{
    span_log(&s->logging, SPAN_LOG_FLOW, "Start rx page %d - compression %s\n", s->current_page, t4_compression_to_str(s->metadata.compression));

    switch (s->current_decoder)
    {
    case 0:
        pre_encoded_restart(&s->decoder.no_decoder);
        s->image_put_handler = (t4_image_put_handler_t) pre_encoded_put;
        break;
    case T4_COMPRESSION_T4_1D | T4_COMPRESSION_T4_2D | T4_COMPRESSION_T6:
        t4_t6_decode_restart(&s->decoder.t4_t6, s->metadata.image_width);
        s->image_put_handler = (t4_image_put_handler_t) t4_t6_decode_put;
        break;
    case T4_COMPRESSION_T85 | T4_COMPRESSION_T85_L0:
        t85_decode_restart(&s->decoder.t85);
        s->image_put_handler = (t4_image_put_handler_t) t85_decode_put;
        break;
#if defined(SPANDSP_SUPPORT_T88)
    case T4_COMPRESSION_T88:
        t88_decode_restart(&s->decoder.t88);
        s->image_put_handler = (t4_image_put_handler_t) t88_decode_put;
        break;
#endif
    case T4_COMPRESSION_T42_T81:
        t42_decode_restart(&s->decoder.t42);
        s->image_put_handler = (t4_image_put_handler_t) t42_decode_put;
        break;
    case T4_COMPRESSION_T43:
        t43_decode_restart(&s->decoder.t43);
        s->image_put_handler = (t4_image_put_handler_t) t43_decode_put;
        break;
#if defined(SPANDSP_SUPPORT_T45)
    case T4_COMPRESSION_T45:
        t45_decode_restart(&s->decoder.t45);
        s->image_put_handler = (t4_image_put_handler_t) t45_decode_put;
        break;
#endif
    }
    s->line_image_size = 0;
    s->tiff.image_size = 0;

    time (&s->tiff.page_start_time);

    return 0;
}