This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何使用OMAP3530的NEON指令集进行视频编解码?

Other Parts Discussed in Thread: OMAP3530

大家好,我们最近使用FFmpeg进行视频编解码应用。通过在OMAP3530上面调试发现 实际运行效果 效率比较低,只能达到一两帧 的样子。通过谷歌知道 OMAP3530支持ARMv7有一个NEON指令集,可以加速多媒体数据处理。通过修改FFmpeg的配置参数,使用“--arch=arm --cpu=armv7-a --extra-cflags='-fPIC -march=armv7-a -mfloat-abi=softfp -mfpu=neon' ” 参数进行配置FFmpeg,安装后发现 libavcodec/arm文件夹下生成了 “h264cmc_neon.S h264dsp_neon.S h264cmc_neon.o h264dsp_neon.o”等文件。这说明FFmpeg已经生成了支持ARMv7 NEON的代码。
编译代码时我在编译命令后面添加了“-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp”后缀进行编译。
上板后发现代码依然没有使用ARMv7的NEON指令集。
我使用的交叉编译工具的版本是:gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) FFmpegd的版本是0.10.7。
请问要使用OMAP3530的NEON 指令集该怎么配置?是修改FFmpeg的配置参数还是在交叉编译的时候添加 相应的参数?我的操作 问题出在什么地方?编译参数设置错误还是交叉编译工具的版本号过低?

  • 你好,

       请参考http://processors.wiki.ti.com/index.php?title=FAQ_OMAP35x_Linux_PSP在内核中使能NEON,再试试。

    How to enable the NEON coprocessor?

    1. Start with the your current configuration for the OMAP3EVM.
    2. Invoke Linux Kernel Configuration tool
    3. Select the sub-menu: Floating point emulation
    4. Enable the Neon coprocessor. (See below).
    .config - Linux Kernel v2.6.22.18-omap3 Configuration
    -----------------------------------------------------------------------------
    
      +----------------------- Floating point emulation ------------------------+
      |  Arrow keys navigate the menu.  <Enter> selects submenus --->.          |
      |  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, |
      |  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> |
      |  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       |
      | +---------------------------------------------------------------------+ |
      | |    --- At least one emulation must be selected                      | |
      | |    [*] NWFPE math emulation                                         | |
      | |    [ ]   Support extended precision                                 | |
      | |    [ ] FastFPE math emulation (EXPERIMENTAL)                        | |
      | |    [*] VFP-format floating point maths                              | |
      | |    [*]   NEON Advanced SIMD Extension support                       | |
      | |                                                                     | |
      | |                                                                     | |
      | |                                                                     | |
      | +---------------------------------------------------------------------+ |
      +-------------------------------------------------------------------------|
      |                    <Select>    < Exit >    < Help >                     |
      +-------------------------------------------------------------------------+
    

    Note: If you have chosen OMAP3530 as processor in the configuration, NEON is enabled by default. In this case, the option is not editable.

  • 你好,我按照你的提示查看了我的内核配置,添加了内核对NEON的支持。上板后依然没有实现对NEON指令集的调用。

    还有哪些地方疏忽了呢?

  • 你好,我把问题解决了。我漏掉了两个地方:内核配置支持和编码库的配置支持。

    除了按照你的答案配置内核外,还得配置x264的编码库使其支持这个特性。

    谢谢你。