Re: Alignment and endianness question
Re: Alignment and endianness question
- Subject: Re: Alignment and endianness question
- From: Tim Murison <email@hidden>
- Date: Mon, 22 Aug 2011 10:46:07 -0400
Doh! Got my endianness confused amongst other things! :(
Thanks for the corrections.
On 2011-08-22, at 10:39 AM, Robert Bielik wrote:
> Tim Murison skrev 2011-08-22 16:24:
>> On 2011-08-22, at 3:00 AM, Brian Willoughby wrote:
>>>
>>> On Aug 21, 2011, at 23:54, Tim Murison wrote:
>>>> I'm trying to determine what data should look like when it is unpacked. I think I understand it now, but I'd like some confirmation.
>>>>
>>>> Say I have a 20-bit sample: 0xABCDE that needs to be stored in a 32-bit audio stream formatted as below:
>>>>
>>>> aligned high& little endian: 0xABCDE000
>>>> aligned low& little endian: 0x000ABCDE
>>>>
>>>> aligned high& big endian: 0x00E0CDAB
>>>> aligned low& big endian: 0xABCDE000
>>>>
>>>> Is this correct?
>>> No.
>>
>
> 20 bit value: 0x000ABCDE
> 20 bit value aligned high: 0xABCDE000
>
> so bytes are in order:
> little endian (non-aligned) : DE BC 0A 00
> little endian (aligned high): 00 E0 CD AB
>
> big endian (non-aligned) : 00 0A BC DE
> big endian (aligned high) : AB CD E0 00
>
> HTH
> /Rob
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden