xiph / xiph/opus

FTBFS with "fixed-point" and Deep PLC

Open
#356 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.3k
Forks
808
PR merge metrics
No merged PRs in 30d

Description

While packaging opus for Debian, we encountered a build failure on the armel architecture (32bit arm, softfloat):

In file included from celt/celt_decoder.c:37:
celt/celt_decoder.c: In function ‘celt_decode_lost’:
celt/os_support.h:79:83: error: invalid operands to binary - (have ‘float *’ and ‘celt_sig *’ {aka ‘int *’})
   79 | #define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((dst)-(src)) ))
      |                                                                              ~~~~~^~~~~~
celt/celt_decoder.c:914:13: note: in expansion of macro ‘OPUS_COPY’
  914 |             OPUS_COPY(buf_copy+c*overlap, &decode_mem[c][DECODE_BUFFER_SIZE-N], overlap);
      |             ^~~~~~~~~

the full build log can be found at: https://buildd.debian.org/status/fetch.php?pkg=opus&arch=armel&ver=1.5.2-1&stamp=1719267895

it actually seems to be a problem with fixed-point, rather than armel itself (it's just that armel is the last architecture on Debian that does not have an FPU, so we enforce fixed-point here).

The relevant configure flags are:

--enable-custom-modes --enable-fixed-point --enable-deep-plc --enable-osce

If the underlying problem cannot be fixed, maybe Deep PLC should be disabled when requesting fixed point (or vice versa, but then we would have had an unusably slow OPUS on CPUs without FPU, without properly noticing it at build time); or ./configure could simply fail if these mutually exclusive flags were specified.

But of course, fixing would be best :-)

(sidenote: I also reported this as https://gitlab.xiph.org/xiph/opus/-/issues/2375, but it seems that the bugtracker on GitHub is the one that is actually monitored by the devs...)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the armel build log and reproduce the failure using --enable-custom-modes, --enable-fixed-point, --enable-deep-plc, and --enable-osce. Inspect OPUS_COPY in celt/os_support.h and its use in celt/celt_decoder.c, then verify that the chosen fix or configuration validation makes this flag combination build correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.