Fixed the way T.85/T.85-L0 selection is handled when decoding DCS messages

This commit is contained in:
Steve Underwood 2012-08-03 20:26:30 +08:00
parent ac0eec9de4
commit e35221b981

View File

@ -1344,14 +1344,12 @@ static int build_dcs(t30_state_t *s)
set_ctrl_bits(s->dcs_frame, T30_MIN_SCAN_0MS, 21); set_ctrl_bits(s->dcs_frame, T30_MIN_SCAN_0MS, 21);
break; break;
#endif #endif
case T4_COMPRESSION_ITU_T85: case T4_COMPRESSION_ITU_T85_L0:
set_ctrl_bit(s->dcs_frame, T30_DCS_BIT_T85_MODE); set_ctrl_bit(s->dcs_frame, T30_DCS_BIT_T85_L0_MODE);
clr_ctrl_bit(s->dcs_frame, T30_DCS_BIT_T85_L0_MODE);
set_ctrl_bits(s->dcs_frame, T30_MIN_SCAN_0MS, 21); set_ctrl_bits(s->dcs_frame, T30_MIN_SCAN_0MS, 21);
break; break;
case T4_COMPRESSION_ITU_T85_L0: case T4_COMPRESSION_ITU_T85:
set_ctrl_bit(s->dcs_frame, T30_DCS_BIT_T85_MODE); set_ctrl_bit(s->dcs_frame, T30_DCS_BIT_T85_MODE);
set_ctrl_bit(s->dcs_frame, T30_DCS_BIT_T85_L0_MODE);
set_ctrl_bits(s->dcs_frame, T30_MIN_SCAN_0MS, 21); set_ctrl_bits(s->dcs_frame, T30_MIN_SCAN_0MS, 21);
break; break;
case T4_COMPRESSION_ITU_T6: case T4_COMPRESSION_ITU_T6:
@ -2360,12 +2358,13 @@ static int process_rx_dcs(t30_state_t *s, const uint8_t *msg, int len)
s->image_width = widths[i][dcs_frame[5] & (DISBIT2 | DISBIT1)]; s->image_width = widths[i][dcs_frame[5] & (DISBIT2 | DISBIT1)];
/* Check which compression we will use. */ /* Check which compression we will use. */
if (test_ctrl_bit(dcs_frame, T30_DCS_BIT_T85_MODE)) if (test_ctrl_bit(dcs_frame, T30_DCS_BIT_T85_L0_MODE))
{ {
if (test_ctrl_bit(dcs_frame, T30_DCS_BIT_T85_L0_MODE)) s->line_encoding = T4_COMPRESSION_ITU_T85_L0;
s->line_encoding = T4_COMPRESSION_ITU_T85_L0; }
else else if (test_ctrl_bit(dcs_frame, T30_DCS_BIT_T85_MODE))
s->line_encoding = T4_COMPRESSION_ITU_T85; {
s->line_encoding = T4_COMPRESSION_ITU_T85;
} }
else if (test_ctrl_bit(dcs_frame, T30_DCS_BIT_T6_MODE)) else if (test_ctrl_bit(dcs_frame, T30_DCS_BIT_T6_MODE))
{ {