More tweaks towards colour FAXing

This commit is contained in:
Steve Underwood committed 2013-05-29 10:07:08 +08:00
1 parent 3b595efc60
commit 3519e0f4c3
7 files changed
+19 -19

No files matched your search

+3 -3
View File
@@ -444,7 +444,7 @@ typedef struct
/*! \brief The number of vertical pixels in the exchanged page. */
int length;
/*! \brief The type of compression used between the FAX machines */
int encoding;
int compression;
/*! \brief The size of the image on the line, in bytes */
int line_image_size;
} t4_stats_t;
@@ -535,11 +535,11 @@ SPAN_DECLARE(void) t4_rx_set_model(t4_rx_state_t *s, const char *model);
\param t A pointer to a statistics structure. */
SPAN_DECLARE(void) t4_rx_get_transfer_statistics(t4_rx_state_t *s, t4_stats_t *t);
/*! Get the short text name of an encoding format.
/*! Get the short text name of a compression format.
\brief Get the short text name of an encoding format.
\param encoding The encoding type.
\return A pointer to the string. */
SPAN_DECLARE(const char *) t4_encoding_to_str(int encoding);
SPAN_DECLARE(const char *) t4_compression_to_str(int compression);
/*! Get the short text name of an image format.
\brief Get the short text name of an image format.
+5 -5
View File
@@ -563,7 +563,7 @@ static void report_rx_ecm_page_result(t30_state_t *s)
span_log(&s->logging, SPAN_LOG_FLOW, "Page no = %d\n", stats.pages_transferred);
span_log(&s->logging, SPAN_LOG_FLOW, "Image size = %d x %d pixels\n", stats.width, stats.length);
span_log(&s->logging, SPAN_LOG_FLOW, "Image resolution = %d/m x %d/m\n", stats.x_resolution, stats.y_resolution);
span_log(&s->logging, SPAN_LOG_FLOW, "Compression = %s (%d)\n", t4_encoding_to_str(stats.encoding), stats.encoding);
span_log(&s->logging, SPAN_LOG_FLOW, "Compression = %s (%d)\n", t4_compression_to_str(stats.compression), stats.compression);
span_log(&s->logging, SPAN_LOG_FLOW, "Compressed image size = %d bytes\n", stats.line_image_size);
}
/*- End of function --------------------------------------------------------*/
@@ -587,7 +587,7 @@ static int copy_quality(t30_state_t *s)
span_log(&s->logging, SPAN_LOG_FLOW, "Page no = %d\n", stats.pages_transferred + 1);
span_log(&s->logging, SPAN_LOG_FLOW, "Image size = %d x %d pixels\n", stats.width, stats.length);
span_log(&s->logging, SPAN_LOG_FLOW, "Image resolution = %d/m x %d/m\n", stats.x_resolution, stats.y_resolution);
span_log(&s->logging, SPAN_LOG_FLOW, "Compression = %s (%d)\n", t4_encoding_to_str(stats.encoding), stats.encoding);
span_log(&s->logging, SPAN_LOG_FLOW, "Compression = %s (%d)\n", t4_compression_to_str(stats.compression), stats.compression);
span_log(&s->logging, SPAN_LOG_FLOW, "Compressed image size = %d bytes\n", stats.line_image_size);
span_log(&s->logging, SPAN_LOG_FLOW, "Bad rows = %d\n", stats.bad_rows);
span_log(&s->logging, SPAN_LOG_FLOW, "Longest bad row run = %d\n", stats.longest_bad_row_run);
@@ -2367,7 +2367,7 @@ static int analyze_rx_dcs(t30_state_t *s, const uint8_t *msg, int len)
t30_set_status(s, T30_ERR_INCOMPATIBLE);
return -1;
}
span_log(&s->logging, SPAN_LOG_FLOW, "Far end selected compression %s (%d)\n", t4_encoding_to_str(s->line_compression), s->line_compression);
span_log(&s->logging, SPAN_LOG_FLOW, "Far end selected compression %s (%d)\n", t4_compression_to_str(s->line_compression), s->line_compression);
if (x < 0)
{
@@ -2788,7 +2788,7 @@ static int process_rx_dis_dtc(t30_state_t *s, const uint8_t *msg, int len)
else
s->line_compression = T4_COMPRESSION_T4_1D;
span_log(&s->logging, SPAN_LOG_FLOW, "Choose compression %s (%d)\n", t4_encoding_to_str(s->line_compression), s->line_compression);
span_log(&s->logging, SPAN_LOG_FLOW, "Choose compression %s (%d)\n", t4_compression_to_str(s->line_compression), s->line_compression);
if (s->phase_b_handler)
{
@@ -6704,7 +6704,7 @@ SPAN_DECLARE(void) t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
t->width = stats.width;
t->length = stats.length;
t->compression = stats.encoding;
t->compression = stats.compression;
t->image_size = stats.line_image_size;
t->current_status = s->current_status;
t->rtn_events = s->rtn_events;
+4 -4
View File
@@ -91,9 +91,9 @@ typedef struct
extern TIFFFieldArray tiff_fx_field_array;
#endif
SPAN_DECLARE(const char *) t4_encoding_to_str(int encoding)
SPAN_DECLARE(const char *) t4_compression_to_str(int compression)
{
switch (encoding)
switch (compression)
{
case T4_COMPRESSION_NONE:
return "None";
@@ -905,7 +905,7 @@ SPAN_DECLARE(void) t4_rx_get_transfer_statistics(t4_rx_state_t *s, t4_stats_t *t
t->image_y_resolution = s->metadata.y_resolution;
t->x_resolution = s->metadata.x_resolution;
t->y_resolution = s->metadata.y_resolution;
t->encoding = s->metadata.compression;
t->compression = s->metadata.compression;
switch (s->metadata.compression)
{
case T4_COMPRESSION_T4_1D:
@@ -965,7 +965,7 @@ SPAN_DECLARE(void) t4_rx_get_transfer_statistics(t4_rx_state_t *s, t4_stats_t *t
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->metadata.compression));
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->metadata.compression)
{
+2 -2
View File
@@ -1358,7 +1358,7 @@ SPAN_DECLARE(void) t4_tx_get_transfer_statistics(t4_tx_state_t *s, t4_stats_t *t
t->x_resolution = s->metadata.x_resolution;
t->y_resolution = s->metadata.y_resolution/s->row_squashing_ratio;
t->encoding = s->metadata.compression;
t->compression = s->metadata.compression;
switch (s->metadata.compression)
{
case T4_COMPRESSION_T4_1D:
@@ -1474,7 +1474,7 @@ SPAN_DECLARE(int) t4_tx_get(t4_tx_state_t *s, uint8_t buf[], size_t max_len)
SPAN_DECLARE(int) t4_tx_start_page(t4_tx_state_t *s)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Start tx page %d - compression %s\n", s->current_page, t4_encoding_to_str(s->metadata.compression));
span_log(&s->logging, SPAN_LOG_FLOW, "Start tx page %d - compression %s\n", s->current_page, t4_compression_to_str(s->metadata.compression));
if (s->current_page > s->stop_page)
return -1;
if (s->tiff.file)