ffvvc / FFmpeg

VVC Decoder for ffmpeg
Other
50 stars 12 forks source link

mingw + gcc 11.3.1 build fail #93

Closed nuomi2021 closed 1 year ago

nuomi2021 commented 1 year ago

from https://github.com/ffvvc/FFmpeg/pull/91#issuecomment-1593376691

In gcc 11.3.1 and higher. I have such message: I added this fix plus https://github.com/ffvvc/FFmpeg/pull/88

c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 133 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 142 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:301:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 301 | DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) EDGE_EMU_BUFFER_STRIDE 2]; | ^~~~~~~ In file included from vvcdsp.c:24: c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 133 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 142 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:301:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 301 | DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) EDGE_EMU_BUFFER_STRIDE 2]; | ^~~~~~~ In gcc 11.3.1 and higher. I have such message: I added this fix plus https://github.com/ffvvc/FFmpeg/pull/88

c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 133 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 142 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:301:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 301 | DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) EDGE_EMU_BUFFER_STRIDE 2]; | ^~~~~~~ In file included from vvcdsp.c:24: c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 133 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 142 | DECLARE_ALIGNED(4, Mv, mv)[2]; ///< mvL0, vvL1 | ^~~~~~~ c:\gcc1131\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:301:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED' 301 | DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) EDGE_EMU_BUFFER_STRIDE 2]; | ^~~~~~~

How to setup: https://github.com/ffvvc/FFmpeg/pull/91#issuecomment-1595036421

nuomi2021 commented 1 year ago

@Jamaika1 I tried the latest code on cygwin, it has gcc 11.4. later than your gcc 11.3. It has no such issue. could you update your code and try again?

$ gcc --version gcc (GCC) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

Jamaika1 commented 1 year ago

I test GCC 14.0.0 20230611 http://www.equation.com/ftpdir/gcc/gcc-14-20230611-64.exe I still have errors.

Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-14-20230611/configure --host=x86_64-w64-mingw32 --build=x86_64-unknown-linux-gnu --target=x86_64-w64-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_64/gcc/14-20230611 --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_64/gcc/14-20230423 --with-gcc --with-gnu-ld --with-gnu-as --with-ld64=no --with-gmp=/home/gfortran/gcc-home/binary/mingw32/native/x86_64/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_64/mpfr --with-mpc=/home/gfortran/gcc-home/binary/mingw32/native/x86_64/mpc --with-cloog=/home/gfortran/gcc-home/binary/mingw32/native/x86_64/cloog --with-libiconv-prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_64/libiconv --with-diagnostics-color=auto --enable-cloog-backend=isl --enable-targets=i686-w64-mingw32,x86_64-w64-mingw32 --enable-lto --enable-languages=c,c++,fortran --enable-threads=win32 --enable-static --enable-shared=lto-plugin --enable-plugins --enable-ld=yes --enable-libquadmath --enable-libquadmath-support --enable-libgomp --disable-checking --disable-nls --disable-tls --disable-win32-registry
Thread model: win32
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230611 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=gnu11' '-march=x86-64-v2' '-ftree-vectorize' '-g0' '-O3' '-fPIC' '-mavx' '-mxsave' '-mpclmul' '-maes' '-D' 'HAVE_AV_CONFIG_H=1' '-D' 'BUILDING_avutil=1' '-D' 'G_LIB_STATIC=1' '-D' 'RSVG_STATIC=1' '-D' 'KVZ_STATIC_LIB=1' '-D' 'UVG_STATIC_LIB=1' '-D' 'OPJ_STATIC=1' '-D' 'UAVS3D_STATIC=1' '-D' 'UAVS3E_STATIC=1' '-D' 'LIBTWOLAME_STATIC=1' '-c' '-o' 'vvcdec.o'
 C:/gcc1400/bin/../libexec/gcc/x86_64-w64-mingw32/14.0.0/cc1.exe -quiet -v -iprefix C:/gcc1400/bin/../lib/gcc/x86_64-w64-mingw32/14.0.0/ -U_REENTRANT -D HAVE_AV_CONFIG_H=1 -D BUILDING_avutil=1 -D G_LIB_STATIC=1 -D RSVG_STATIC=1 -D KVZ_STATIC_LIB=1 -D UVG_STATIC_LIB=1 -D OPJ_STATIC=1 -D UAVS3D_STATIC=1 -D UAVS3E_STATIC=1 -D LIBTWOLAME_STATIC=1 vvcdec.c -quiet -dumpbase vvcdec.c -dumpbase-ext .c -march=x86-64-v2 -mavx -mxsave -mpclmul -maes -g0 -O3 -std=gnu11 -version -ftree-vectorize -fPIC -o C:\Users\KOMPUT~1\AppData\Local\Temp\cclZtt6u.s
GNU C11 (GCC) version 14.0.0 20230611 (experimental) (x86_64-w64-mingw32)
        compiled by GNU C version 14.0.0 20230423 (experimental), GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "C:/gcc1400/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/14.0.0/include"
ignoring nonexistent directory "/home/gfortran/gcc-home/binary/mingw32/cross/x86_64/gcc/14-20230423/home/gfortran/gcc-home/binary/mingw32/native/x86_64/gcc/14-20230611/lib/gcc/x86_64-w64-mingw32/14.0.0/../../../../include"
ignoring duplicate directory "C:/gcc1400/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/14.0.0/include-fixed"
ignoring duplicate directory "C:/gcc1400/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/14.0.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/home/gfortran/gcc-home/binary/mingw32/cross/x86_64/gcc/14-20230423/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/gcc1400/bin/../lib/gcc/x86_64-w64-mingw32/14.0.0/include
 C:/gcc1400/bin/../lib/gcc/x86_64-w64-mingw32/14.0.0/include-fixed
 C:/gcc1400/bin/../lib/gcc/x86_64-w64-mingw32/14.0.0/../../../../x86_64-w64-mingw32/include
End of search list.
Compiler executable checksum: 8f158f648315cc20aac42862f43298cd
In file included from vvcdec.c:34:
C:/gcc1400/x86_64-w64-mingw32/include/libavcodec/vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  133 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
C:/gcc1400/x86_64-w64-mingw32/include/libavcodec/vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  142 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
C:/gcc1400/x86_64-w64-mingw32/include/libavcodec/vvc_ctu.h:305:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  305 |     DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];
      |     ^~~~~~~~~~~~~~~
nuomi2021 commented 1 year ago

Seems you use a copy of vvc decoder, it's not updated. Could you update it and build it again?

Jamaika1 commented 1 year ago

Test only gcc 14.0.0 https://github.com/ffvvc/FFmpeg/commit/348d2c51349ab988024990ec97eb0fbf30d738a9

without #include "libavutil/mem_internal.h"

In file included from vvcdec.c:34:
vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  133 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  142 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
vvc_ctu.h:301:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  301 |     DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];
      |     ^~~~~~~~~~~~~~~

with #include "libavutil/mem_internal.h"

In file included from extra/vvcdsp_template.c:28,
                 from vvcdsp.c:287:
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -9 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -25 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -41 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -57 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -73 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -89 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -105 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -121 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -137 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -153 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:538:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  538 |             left[i] = top[i] = top[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -169 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -9 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -25 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -41 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -57 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -73 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -89 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -105 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -121 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -137 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -153 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'prepare_intra_edge_params_8',
    inlined from 'intra_pred_8' at extra/vvc_intra_template.c:628:5:
extra/vvc_intra_template.c:536:21: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
  536 |             left[i] = top[i] = left[0];
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~
extra/vvc_intra_template.c: In function 'intra_pred_8':
extra/vvc_intra_template.c:626:21: note: at offset -169 into destination object 'edge' of size 1584
  626 |     IntraEdgeParams edge;
      |                     ^~~~
In function 'sps_parse_extra_bytes',
    inlined from 'sps_parse' at vvc_ps.c:1097:11,
    inlined from 'ff_vvc_decode_sps' at vvc_ps.c:1190:11:
vvc_ps.c:511:43: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  511 |         sps->extra_ph_bit_present_flag[i] = get_bits1(gb);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from vvc_ps.c:30:
vvc_ps.h: In function 'ff_vvc_decode_sps':
vvc_ps.h:344:14: note: at offset 16 into destination object 'extra_ph_bit_present_flag' of size 16
  344 |     uint8_t  extra_ph_bit_present_flag[16];
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
In function 'sps_parse_extra_bytes',
    inlined from 'sps_parse' at vvc_ps.c:1097:11,
    inlined from 'ff_vvc_decode_sps' at vvc_ps.c:1190:11:
vvc_ps.c:515:43: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  515 |         sps->extra_sh_bit_present_flag[i] = get_bits1(gb);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
vvc_ps.h: In function 'ff_vvc_decode_sps':
vvc_ps.h:347:14: note: at offset 16 into destination object 'extra_sh_bit_present_flag' of size 16
  347 |     uint8_t  extra_sh_bit_present_flag[16];
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vvc_thread.c:23:
vvc_thread.c: In function 'ff_vvc_task_run':
vvc_thread.c:588:13: error: size mismatch in argument 2 of '__atomic_compare_exchange'
  588 |             atomic_compare_exchange_strong(&ft->ret, &zero, ret);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nuomi2021 commented 1 year ago

hi @Jamaika1 , why your directory is extra/xxx? We have put all files into vvc/ could you try to use the last version of cygwin?

thank you

Jamaika1 commented 1 year ago

I use extra directory under gcc for *template.c files that don't have to be created by gcc because they are included in #include *template.c. The [-Wstringop-overflow=] message is compileable. I don't have link for cygwin. I use https://sourceforge.net/projects/gcc-win64/files/11.4.0/gcc-11.4.0-no-debug.7z/download

c:\gcc1140\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  133 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
c:\gcc1140\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  142 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
c:\gcc1140\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:305:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  305 |     DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];
      |     ^~~~~~~~~~~~~~~
In file included from vvcdsp.c:24:
c:\gcc1140\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:133:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  133 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
c:\gcc1140\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:142:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  142 |     DECLARE_ALIGNED(4, Mv, mv)[2];  ///< mvL0, vvL1
      |     ^~~~~~~~~~~~~~~
c:\gcc1140\x86_64-w64-mingw32\include\libavcodec\vvc_ctu.h:305:5: error: expected specifier-qualifier-list before 'DECLARE_ALIGNED'
  305 |     DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2];
      |     ^~~~~~~~~~~~~~~
nuomi2021 commented 1 year ago

hi @Jamaika1 with https://github.com/ffvvc/FFmpeg/pull/97, I did not get any build error for gcc + mingw could you try? thank you.

my steps

  1. git clone https://github.com/ffvvc/FFmpeg.git
  2. download https://sourceforge.net/projects/gcc-win64/files/11.4.0/gcc-11.4.0-no-debug.7z/download
  3. download https://gnuwin32.sourceforge.net/packages/make.htm
  4. ./confugre && make -j
nuomi2021 commented 1 year ago

@Jamaika1 , please reopen this if we still have the issue. thank you