Opened 12 years ago

Closed 12 years ago

#510 closed defect (wontfix)

Android internal compiler error on qcelpdec.c when NEON is used

Reported by: Dmitry Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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.

Change History (3)

comment:1 by Carl Eugen Hoyos, 12 years ago

There is a lot of information missing, but please confirm that you already reported it to gcc before suggesting a workaround.

comment:2 by Carl Eugen Hoyos, 12 years ago

Missing is at least:
Your configure line, gcc -v output, and complete, uncut output of a repeated "make V=1". (Please do not post the complete, uncut output of the first make call!)

comment:3 by reimar, 12 years ago

Resolution: wontfix
Status: newclosed

Internal compiler errors are compiler bugs, we will only work around them if it is a significant issue and we can't work around it.
Since I've compiler both MPlayer and FFmpeg for Android I don't think this is such an issue.
FFmpeg should be disabling the auto-vectorizer anyway since it only makes the code slower in most cases anyway.

Note: See TracTickets for help on using tickets.