[FFmpeg-trac] #510(avcodec:new): Android internal compiler error on qcelpdec.c when NEON is used

FFmpeg trac at avcodec.org
Mon Sep 26 20:07:50 CEST 2011


#510: Android internal compiler error on qcelpdec.c when NEON is used
-----------------------------------+--------------------------------------
             Reporter:  dmitrykos  |                     Type:  defect
               Status:  new        |                 Priority:  normal
            Component:  avcodec    |                  Version:  git-master
             Keywords:             |               Blocked By:
             Blocking:             |  Reproduced by developer:  0
Analyzed by developer:  0          |
-----------------------------------+--------------------------------------
 Android compiler (gcc version 4.4.3 (GCC)) is failing (internal compiler)
 to compile qcelpdec.c if NEON is enabled as fpu.

 Error happens for this function 'qcelp_decode_frame' but tracking the
 roots of problem I arrived to 'postfilter' function:

 this loop is causing failure:

 {{{
 for (n = 0; n < 10; n++) {
     lpc_s[n] = lpc[n] * pow_0_625[n];
     lpc_p[n] = lpc[n] * pow_0_775[n];
 }
 }}}

 to resolve the problem I tried to unroll it and compiler error is gone:

 {{{
 #define QCELP_POSTFILTER_LPC__MPOW(N)\
         lpc_s[(N)] = lpc[(N)] * pow_0_625[(N)];\
         lpc_p[(N)] = lpc[(N)] * pow_0_775[(N)]

     QCELP_POSTFILTER_LPC__MPOW(0);
     QCELP_POSTFILTER_LPC__MPOW(1);
     QCELP_POSTFILTER_LPC__MPOW(2);
     QCELP_POSTFILTER_LPC__MPOW(3);
     QCELP_POSTFILTER_LPC__MPOW(4);
     QCELP_POSTFILTER_LPC__MPOW(5);
     QCELP_POSTFILTER_LPC__MPOW(6);
     QCELP_POSTFILTER_LPC__MPOW(7);
     QCELP_POSTFILTER_LPC__MPOW(8);
     QCELP_POSTFILTER_LPC__MPOW(9);

 #undef QCELP_POSTFILTER_LPC__MPOW
 }}}

 Most probably it happens due to error in NEON vectoriser and thus
 unrolling helps.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/510>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list