search for: char_ptr

Displaying 7 results from an estimated 7 matches for "char_ptr".

2017 Oct 04
3
[PATCH] Support for Channel Mapping 253.
...sum. For example, shifting only by 8 in the loop and doing a final shift by 7 outside the loop. 9) For endianness conversion, you shouldn't have to even detect it. I think something like this (untested) should work for both little-endian and big endian: for (i=0;i<...;i++) short_ptr[i] = char_ptr[2*i] + (char_ptr[2*i] << 8); 10) Please don't store pointers (MappingMatrix, OpusMSEncoder, ...) in the OpusPEncoder/OpusPDecoder structs. All the data should be in a single struct with no pointers (except to constant data) so that they can be shallow-copied. Cheers, Jean-Marc On 27/...
2017 Oct 10
2
[PATCH] Support for Channel Mapping 253.
...you mean here (and I can't see where that change is in the code). > 9) For endianness conversion, you shouldn't have to even detect it. I > think something like this (untested) should work for both little-endian > and big endian: > for (i=0;i<...;i++) > short_ptr[i] = char_ptr[2*i] + (char_ptr[2*i] << 8); > > *Can you show how to go from short -> char as well? I'm alittle confused > on how this can be done without knowing the endianness first.* Well, the endianness of a machine is only visible when you attempt to cast multi-byte values to char poi...
2017 Oct 10
0
[PATCH] Support for Channel Mapping 253.
...put inside the loop and >>= 7 to the output outside the loop. Let me know your thoughts.* 9) For endianness conversion, you shouldn't have to even detect it. I think something like this (untested) should work for both little-endian and big endian: for (i=0;i<...;i++) short_ptr[i] = char_ptr[2*i] + (char_ptr[2*i] << 8); *Can you show how to go from short -> char as well? I'm alittle confused on how this can be done without knowing the endianness first.* 10) Please don't store pointers (MappingMatrix, OpusMSEncoder, ...) in the OpusPEncoder/OpusPDecoder structs. All t...
2017 Oct 10
0
[PATCH] Support for Channel Mapping 253.
...e where that > change is in the code). > > > 9) For endianness conversion, you shouldn't have to even detect it. I > > think something like this (untested) should work for both little-endian > > and big endian: > > for (i=0;i<...;i++) > > short_ptr[i] = char_ptr[2*i] + (char_ptr[2*i] << 8); > > > > *Can you show how to go from short -> char as well? I'm alittle confused > > on how this can be done without knowing the endianness first.* > > Well, the endianness of a machine is only visible when you attempt to > cast m...
2017 Oct 11
2
[PATCH] Support for Channel Mapping 253.
...the code). > > > 9) For endianness conversion, you shouldn't have to even detect it. I > > think something like this (untested) should work for both > little-endian > > and big endian: > > for (i=0;i<...;i++) > > short_ptr[i] = char_ptr[2*i] + (char_ptr[2*i] << 8); > > > > *Can you show how to go from short -> char as well? I'm alittle > confused > > on how this can be done without knowing the endianness first.* > > Well, the endianness of a machine is only visible when...
2003 Dec 19
2
[LLVMdev] Union Type
...e of the members to start at a non-zero offset from the start of the memory object. In my particular case in Stacker, I have tried to do something like: %foo = global [10 x int]; void %func() { %int_ptr = getelementptr [10 x int]* %foo, long 0, long 0; %int_val = load int* %int_ptr; %char_ptr = cast int %int_val to char*; %oops = load char* %char_ptr; } The above will probably work on a 32-bit platform where pointers are the same size as int. However, on a 64-bit platform, a pointer is the same size as a long and the value retrieved from the array would actually span two entries in...
2017 Sep 19
3
[PATCH] Support for Channel Mapping 253.
Hello all, Attached is an up-to-date patch for supporting channel mapping 253. Please advise and Thank you for your time. Cheers, Drew -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/opus/attachments/20170919/055d9034/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: