mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Bugfix: big endian items in unpact_2bit_samples
This commit is contained in:
		| @@ -31,6 +31,7 @@ | ||||
|  | ||||
| #include "unpack_2bit_samples.h" | ||||
| #include <iostream> | ||||
| #include <glog/logging.h> | ||||
| #include <gnuradio/io_signature.h> | ||||
|  | ||||
| struct byte_2bit_struct | ||||
| @@ -118,12 +119,17 @@ unpack_2bit_samples::unpack_2bit_samples( bool big_endian_bytes, | ||||
|     // Only swap the item bytes if the item size > 1 byte and the system  | ||||
|     // endianess is not the same as the item endianness: | ||||
|     swap_endian_items_ = ( item_size_ > 1 ) &&  | ||||
|                          ( big_endian_system != big_endian_items); | ||||
|                          (  !big_endian_items); | ||||
|  | ||||
|     bool big_endian_bytes_system = systemBytesAreBigEndian(); | ||||
|  | ||||
|     swap_endian_bytes_ = ( big_endian_bytes_system != big_endian_bytes_ ); | ||||
|  | ||||
|     LOG(INFO) << "swap_endian_items_ : " << swap_endian_items_ | ||||
|                << ". swap_endian_bytes_ : " << swap_endian_bytes_ | ||||
|                << ". item_size_ : " << item_size_ | ||||
|                << ". reverse_interleaving_ : " << reverse_interleaving_; | ||||
|  | ||||
| } | ||||
|  | ||||
| unpack_2bit_samples::~unpack_2bit_samples() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Cillian O'Driscoll
					Cillian O'Driscoll