ORAN FH CUS: don't scale U-Plane samples twice
This commit is contained in:
parent
57a2313e71
commit
8641f42d98
|
@ -871,11 +871,6 @@ static float uncompressed_to_float(guint32 h)
|
||||||
return ((float)i16) / 0x7fff;
|
return ((float)i16) / 0x7fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gfloat digital_power_scaling(gfloat f)
|
|
||||||
{
|
|
||||||
return f / (1 << 15);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
|
/* 7.7.1.2 bfwCompHdr (beamforming weight compression header) */
|
||||||
static int dissect_bfwCompHdr(tvbuff_t *tvb, proto_tree *tree, gint offset,
|
static int dissect_bfwCompHdr(tvbuff_t *tvb, proto_tree *tree, gint offset,
|
||||||
guint32 *iq_width, guint32 *comp_meth, proto_item **comp_meth_ti)
|
guint32 *iq_width, guint32 *comp_meth, proto_item **comp_meth_ti)
|
||||||
|
@ -1002,7 +997,7 @@ static gfloat decompress_value(guint32 bits, guint32 comp_method, guint8 iq_widt
|
||||||
case BFP_AND_SELECTIVE_RE:
|
case BFP_AND_SELECTIVE_RE:
|
||||||
case MOD_COMPR_AND_SELECTIVE_RE:
|
case MOD_COMPR_AND_SELECTIVE_RE:
|
||||||
default:
|
default:
|
||||||
/* Not supported! */
|
/* TODO: Not supported! */
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2612,7 +2607,6 @@ dissect_oran_u(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
||||||
/* I */
|
/* I */
|
||||||
guint i_bits = tvb_get_bits(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN);
|
guint i_bits = tvb_get_bits(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN);
|
||||||
gfloat i_value = decompress_value(i_bits, COMP_BLOCK_FP, sample_bit_width, exponent);
|
gfloat i_value = decompress_value(i_bits, COMP_BLOCK_FP, sample_bit_width, exponent);
|
||||||
i_value = digital_power_scaling(i_value);
|
|
||||||
guint sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
|
guint sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
|
||||||
proto_item *i_ti = proto_tree_add_float(rb_tree, hf_oran_iSample, tvb, samples_offset/8, sample_len_in_bytes, i_value);
|
proto_item *i_ti = proto_tree_add_float(rb_tree, hf_oran_iSample, tvb, samples_offset/8, sample_len_in_bytes, i_value);
|
||||||
proto_item_set_text(i_ti, "iSample: %0.12f 0x%04x (iSample-%u in the PRB)", i_value, i_bits, sample_number);
|
proto_item_set_text(i_ti, "iSample: %0.12f 0x%04x (iSample-%u in the PRB)", i_value, i_bits, sample_number);
|
||||||
|
@ -2620,7 +2614,6 @@ dissect_oran_u(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
||||||
/* Q */
|
/* Q */
|
||||||
guint q_bits = tvb_get_bits(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN);
|
guint q_bits = tvb_get_bits(tvb, samples_offset, sample_bit_width, ENC_BIG_ENDIAN);
|
||||||
gfloat q_value = decompress_value(q_bits, COMP_BLOCK_FP, sample_bit_width, exponent);
|
gfloat q_value = decompress_value(q_bits, COMP_BLOCK_FP, sample_bit_width, exponent);
|
||||||
q_value = digital_power_scaling(q_value);
|
|
||||||
sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
|
sample_len_in_bytes = ((samples_offset%8)+sample_bit_width+7)/8;
|
||||||
proto_item *q_ti = proto_tree_add_float(rb_tree, hf_oran_qSample, tvb, samples_offset/8, sample_len_in_bytes, q_value);
|
proto_item *q_ti = proto_tree_add_float(rb_tree, hf_oran_qSample, tvb, samples_offset/8, sample_len_in_bytes, q_value);
|
||||||
proto_item_set_text(q_ti, "qSample: %0.12f 0x%04x (qSample-%u in the PRB)", q_value, q_bits, sample_number);
|
proto_item_set_text(q_ti, "qSample: %0.12f 0x%04x (qSample-%u in the PRB)", q_value, q_bits, sample_number);
|
||||||
|
|
Loading…
Reference in New Issue