Use existing function for bits reversal

This commit is contained in:
Sakthivel Velumani
2024-05-10 12:51:50 -04:00
parent 82bd07ebd5
commit 40b52bc8f4
+2 -4
View File
@@ -508,12 +508,10 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
#endif
}
uint32_t payload = 0;
result->xtra_byte = (out>>24)&0xff;
for (int i=0; i<NR_POLAR_PBCH_PAYLOAD_BITS; i++)
payload |= ((out>>i)&1)<<(NR_POLAR_PBCH_PAYLOAD_BITS-i-1);
const uint64_t payload = reverse_bits(out, NR_POLAR_PBCH_PAYLOAD_BITS);
for (int i=0; i<3; i++)
result->decoded_output[i] = (uint8_t)((payload>>((3-i)<<3))&0xff);