libg722_1: Cross Compilation of src/make_dct4_tables.c
I am facing a dilemma trying to cross-compile libg722_1 package from FreeSWITCH git version for an ARM5 platform. First of all, the compilation is fine up to a point to produce a cross-platform src/make_dct4_tables binary file. From there on, the compilation process tries to execute the newly produced (cross-compiled) src/make_dct4_tables binary file on the host to produce a src/dct4.h file that contains tables. This certainly will crash the compilation process because the src/make_dct4_tables binary file is for an ARM5 platform and not an x86 platform where the host is. I can manually compile the src/make_dct4_tables.c on the host to produce an x86 binary file and use it to manually generate the src/dct4.h file, but this poses a dilemma. Even though the src/dct4.h produced in this way will not have a problem to produce the libg722_1 codes to run/execute on an ARM5 platform, but it will probably not be able to correctly process the G722_1 audio streams. The reason is simply I suspect the src/dct4.h files generated by the src/make_dct4_tables binary file from both the x86 and ARM5 platforms are not identical. I hope experts here will be able to see this and come up with the solution. ----- don't and stop are the ONLY two 4-letter words considered offensive to men, but not when used together. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/libg722-1-Cross-Compilation-of... Sent from the freeswitch-users mailing list archive at Nabble.com.
On 12/26/2010 09:23 AM, mazilo wrote:
I am facing a dilemma trying to cross-compile libg722_1 package from FreeSWITCH git version for an ARM5 platform. First of all, the compilation is fine up to a point to produce a cross-platform src/make_dct4_tables binary file. From there on, the compilation process tries to execute the newly produced (cross-compiled) src/make_dct4_tables binary file on the host to produce a src/dct4.h file that contains tables. This certainly will crash the compilation process because the src/make_dct4_tables binary file is for an ARM5 platform and not an x86 platform where the host is. I can manually compile the src/make_dct4_tables.c on the host to produce an x86 binary file and use it to manually generate the src/dct4.h file, but this poses a dilemma. Even though the src/dct4.h produced in this way will not have a problem to produce the libg722_1 codes to run/execute on an ARM5 platform, but it will probably not be able to correctly process the G722_1 audio streams. The reason is simply I suspect the src/dct4.h files generated by the src/make_dct4_tables binary file from both the x86 and ARM5 platforms are not identical. I hope experts here will be able to see this and come up with the solution.
----- don't and stop are the ONLY two 4-letter words considered offensive to men, but not when used together. I just committed some updates to the G.722.1 codec in the FreeSwitch repository. Can you see if that builds OK in your cross compiling environment?
Steve
Steve, Thanks for your quick response with patches. The libg722_1 is now cross-compilable for ARM5 platform to produce a host libg722_1/src/make_dct4_tables binary file. This will let the compilation process to generate the libg722_1/src/dct4.h file. However, I wonder if the libg722_1 binary code based on such dct4.h file will yield some logical errors in processing the G722 audio stream. Anyway, http://pastebin.com/BQC1iuYr here is the dct4.h file generated from the make_dct4_tables on an ARM5 platform (a Seagate http://www.seagate.com/www/en-us/products/network_storage/freeagent_dockstar DockStar ) for your perusal. BTW, if anyone here knows of a freely available Linux softphone that supports G722 CoDec, I sure will appreciate that. This way, I can use it to test with this libg722_1. ----- don't and stop are the ONLY two 4-letter words considered offensive to men, but not when used together. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/libg722-1-Cross-Compilation-of... Sent from the freeswitch-users mailing list archive at Nabble.com.
On 12/27/2010 12:34 AM, mazilo wrote:
Steve,
Thanks for your quick response with patches. The libg722_1 is now cross-compilable for ARM5 platform to produce a host libg722_1/src/make_dct4_tables binary file. This will let the compilation process to generate the libg722_1/src/dct4.h file. However, I wonder if the libg722_1 binary code based on such dct4.h file will yield some logical errors in processing the G722 audio stream. Anyway, http://pastebin.com/BQC1iuYr here is the dct4.h file generated from the make_dct4_tables on an ARM5 platform (a Seagate http://www.seagate.com/www/en-us/products/network_storage/freeagent_dockstar DockStar ) for your perusal. Although that dct4.h full of floating point values will be generated in a cross build for an ARM, building for an ARM should automatically set fixed point mode. Therefore that dct4.h file will not actually be used. Do you have any reason to believe the codec which has been built is bad? I think others have cross-built this code successfully for ARMs.
Lots of people doing cross-builds hit problems, solve them on their own, but fail to report these issues up stream to the package developer. Working around things on your own is great, to get things going, but please do report these issues up stream. I think most library developers want their code to "just build and run" on the widest possible range of platforms, without any manual tweaking. I know I certainly do. No developer has every platform available, so it takes input from people hitting these problems to eliminate them. Steve
Steve Underwood wrote:
Although that dct4.h full of floating point values will be generated in a cross build for an ARM, building for an ARM should automatically set fixed point mode. Therefore that dct4.h file will not actually be used. Do you have any reason to believe the codec which has been built is bad? I think others have cross-built this code successfully for ARMs.
Thank Steve and am glad to hear this. Now that you explained above, I have no concerns any more unless I run into such a problem (if there is). ----- don't and stop are the ONLY two 4-letter words considered offensive to men, but not when used together. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/libg722-1-Cross-Compilation-of... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (2)
-
mazilo
-
Steve Underwood