Converting two bytes into a Q15 Float (Float 16?) in Java. (Android)
$30-250 USD
Closed
Posted over 2 years ago
$30-250 USD
Paid on delivery
I have an input of byte pairs.
One pair of byte represents a Q15 float.
This is a format which I cannot change, it comes from a source that I have no control on.
I would need to use the two bytes and build a Q15 float (Float16?) from them.
My problem is that there is very few knowledge about this on stackoverflow or any other site.
I was trying to use Half, this is Android's own Float16 (or not?) but so far with less of a success.
So for example I have a byte pair of: 113, 159, these two are -78.11234 in Q15 float.
This is the c code which generates these Q15 byte pairs which I get in Android from a source:
#define Q15_SCALE_FACTOR (32768)
void float_array_2_q15_array(float* float_array, int16_t* q15_array, uint32_t array_length)
{
for (uint32_t i = 0; i < array_length; i++){
q15_array[i] = (int16_t)(float_array[i] * Q15_SCALE_FACTOR);
q15_array[i] = ((0xff00 & q15_array[i]) >> 8) | ((0x00ff & q15_array[i]) << 8);
}
}
I would need a Java function which converts the two given bytes to a Q15 float.
So for a byte pair of 113, 159 would give me the exact number of: -78.11234 in a Q15 float.
Hi
I have read all your description.
I am professional Android app developer and ready to start now.
I am sure high quality, good communication.
Please contact me and Let's go ahead !
Thanks.
Hi
please chat i will fix it at lowest possible price please chat and let's get started now
My job is very serious and dynamic,
I am punctual and fast I can very well help you in
this job I have a lot of experience in Android development
and adding ads to the android application(like ad mobs and other),
I would like to work with you thank you.