#1137553 fix compilation error for riscv and loongarch

#1137553#5
Date:
2026-05-25 03:31:07 UTC
From:
To:




build error for loong64:

FAILED: [code=1] src/libdav2d_bitdepth_8.a.p/ipred_tmpl.c.o
cc -Isrc/libdav2d_bitdepth_8.a.p -Isrc -I../src -I. -I.. -Iinclude/dav2d -I../include/dav2d -Iinclude -I../include -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c99 -O3 -D_GNU_SOURCE -fvisibility=hidden -Wundef -Werror=vla -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wstrict-prototypes -Werror=missing-prototypes -fomit-frame-pointer -ffast-math -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/dav2d-0.0.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBITDEPTH=8 -MD -MQ src/libdav2d_bitdepth_8.a.p/ipred_tmpl.c.o -MF src/libdav2d_bitdepth_8.a.p/ipred_tmpl.c.o.d -o src/libdav2d_bitdepth_8.a.p/ipred_tmpl.c.o -c ../src/ipred_tmpl.c
In file included from ../src/ipred_tmpl.c:1684:
../src/loongarch/ipred.h: In function ‘intra_pred_dsp_init_loongarch’:
../src/loongarch/ipred.h:41:21: error: assignment to expression with array type
   41 |     c->type0[type1] = BF(dav2d_##name, suffix)
      |                     ^
../src/loongarch/ipred.h:46:5: note: in expansion of macro ‘init_fn’
   46 |     init_fn(cfl_pred, type, name, suffix)
      |     ^~~~~~~
../src/loongarch/ipred.h:87:5: note: in expansion of macro ‘init_cfl_pred_fn’
   87 |     init_cfl_pred_fn(DC_PRED,      ipred_cfl,      lsx);
      |     ^~~~~~~~~~~~~~~~
../src/loongarch/ipred.h:41:21: error: assignment to expression with array type
   41 |     c->type0[type1] = BF(dav2d_##name, suffix)






Please close ipred for riscv and loongarch, community link:


https://code.videolan.org/videolan/dav2d/-/merge_requests/630/diffs?commit_id=a170fb4401f6e57e0649fe82d17d2ac8880dd7e1