AviSynth / AviSynthPlus

AviSynth with improvements
http://avs-plus.net
981 stars 76 forks source link

fix different enumeration types is deprecated #401

Closed Jamaika1 closed 1 month ago

Jamaika1 commented 1 month ago

warning: bitwise operation between different enumeration types ... is deprecated

Jamaika1 commented 1 month ago
Using built-in specs.
COLLECT_GCC=g++.exe
Target: x86_64-w64-mingw32
Configured with: ../configure --prefix=/R/winlibs64ucrt_stage/inst_gcc11-11.5.0/share/gcc11 --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --with-pkgversion='MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders' --with-tune=generic --enable-checking=release --enable-threads=posix --disable-sjlj-exceptions --disable-libunwind-exceptions --disable-serial-configure --disable-bootstrap --enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath --disable-libstdcxx-debug --disable-version-specific-runtime-libs --with-stabs --disable-symvers --enable-languages=c,c++,fortran,lto,objc,obj-c++,jit --disable-gold --disable-nls --disable-stage1-checking --disable-win32-registry --disable-multilib --enable-ld --enable-libquadmath --enable-libada --enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-string --enable-libgomp --enable-graphite --enable-mingw-wildcard --enable-libstdcxx-time --enable-libstdcxx-pch --with-mpc=/d/Prog/winlibs64ucrt_stage/custombuilt --with-mpfr=/d/Prog/winlibs64ucrt_stage/custombuilt --with-gmp=/d/Prog/winlibs64ucrt_stage/custombuilt --with-isl=/d/Prog/winlibs64ucrt_stage/custombuilt --enable-install-libiberty --enable-__cxa_atexit --without-included-gettext --with-diagnostics-color=auto --enable-clocale=generic --with-libiconv --with-system-zlib --with-build-sysroot=/R/winlibs64ucrt_stage/gcc-11.5.0/build_mingw/mingw-w64 --enable-version-specific-runtime-libs CFLAGS='-I/d/Prog/winlibs64ucrt_stage/custombuilt/include/libdl-win32 -Wno-int-conversion' CXXFLAGS=-Wno-int-conversion LDFLAGS='-L/d/Prog/winlibs64ucrt_stage/custombuilt/share/mingw-w64/x86_64-w64-mingw32/lib -L/d/Prog/winlibs64ucrt_stage/custombuilt/share/mingw-w64/lib -pthread -Wl,--dynamicbase -Wl,--high-entropy-va -Wl,--nxcompat -Wl,--tsaware'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.5.0 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders)
COLLECT_GCC_OPTIONS='-v' '-std=gnu++23' '-static' '-march=x86-64-v2' '-ftree-vectorize' '-g0' '-O3' '-fPIC' '-mavx' '-mxsave' '-mpclmul' '-maes' '-Wcomment' '-Wformat=1' '-Wshift-negative-value' '-Wsign-compare' '-Wtype-limits' '-Warray-bounds' '-Wparentheses' '-Wlogical-not-parentheses' '-D' 'WINVER=0x0602' '-D' '_WIN32_WINNT=0x0602' '-D' 'WIN32_LEAN_AND_MEAN=//' '-U' '__STRICT_ANSI__' '-D' '__USE_MINGW_ANSI_STDIO=1' '-D' 'AVSC_WIN32_GCC32=1' '-D' 'AVS_STATIC_LIB=1' '-D' 'BUILDING_AVSCORE=1' '-D' '_DEBUG=1' '-c' '-o' 'avisynth_c.o'
 c:/gcc1150/bin/../libexec/gcc/x86_64-w64-mingw32/11.5.0/cc1plus.exe -quiet -v -iprefix c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/ -D_REENTRANT -D WINVER=0x0602 -D _WIN32_WINNT=0x0602 -D WIN32_LEAN_AND_MEAN=// -U __STRICT_ANSI__ -D __USE_MINGW_ANSI_STDIO=1 -D AVSC_WIN32_GCC32=1 -D AVS_STATIC_LIB=1 -D BUILDING_AVSCORE=1 -D _DEBUG=1 avisynth_c.cpp -quiet -dumpbase avisynth_c.cpp -dumpbase-ext .cpp -march=x86-64-v2 -mavx -mxsave -mpclmul -maes -g0 -O3 -Wcomment -Wformat=1 -Wshift-negative-value -Wsign-compare -Wtype-limits -Warray-bounds -Wparentheses -Wlogical-not-parentheses -std=gnu++23 -version -ftree-vectorize -fPIC -o C:\Users\komp_\AppData\Local\Temp\ccqihGo8.s
GNU C++23 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) version 11.5.0 (x86_64-w64-mingw32)
        compiled by GNU C version 11.5.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/gcc1150/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.5.0/include/c++"
ignoring duplicate directory "c:/gcc1150/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.5.0/include/c++/x86_64-w64-mingw32"
ignoring duplicate directory "c:/gcc1150/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.5.0/include/c++/backward"
ignoring duplicate directory "c:/gcc1150/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.5.0/include"
ignoring nonexistent directory "R:/winlibs64ucrt_stage/inst_gcc11-11.5.0/share/gcc11/include"
ignoring nonexistent directory "/R/winlibs64ucrt_stage/inst_gcc11-11.5.0/share/gcc11/include"
ignoring duplicate directory "c:/gcc1150/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.5.0/include-fixed"
ignoring duplicate directory "c:/gcc1150/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.5.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/include/c++
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/include/c++/x86_64-w64-mingw32
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/include/c++/backward
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/include
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/../../../../include
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/include-fixed
 c:\gcc1150\bin\../lib/gcc/x86_64-w64-mingw32/11.5.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C++23 (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) version 11.5.0 (x86_64-w64-mingw32)
        compiled by GNU C version 11.5.0, GMP version 6.3.0, MPFR version 4.2.1, MPC version 1.3.1, isl version isl-0.26-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 37d7503e7440e1bf9563ec24eaccbec4
avisynth_c.cpp: In function 'int avs_is_yv24(const AVS_VideoInfo*)':
avisynth_c.cpp:66:63: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   66 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV24 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yv16(const AVS_VideoInfo*)':
avisynth_c.cpp:72:63: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   72 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yv12(const AVS_VideoInfo*)':
avisynth_c.cpp:78:63: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   78 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV12 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yv411(const AVS_VideoInfo*)':
avisynth_c.cpp:84:64: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   84 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV411 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_y8(const AVS_VideoInfo*)':
avisynth_c.cpp:90:61: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   90 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y8 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv444p16(const AVS_VideoInfo*)':
avisynth_c.cpp:96:68: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   96 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV444P16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv422p16(const AVS_VideoInfo*)':
avisynth_c.cpp:102:68: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  102 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV422P16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv420p16(const AVS_VideoInfo*)':
avisynth_c.cpp:108:68: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  108 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV420P16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_y16(const AVS_VideoInfo*)':
avisynth_c.cpp:114:62: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  114 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv444ps(const AVS_VideoInfo*)':
avisynth_c.cpp:120:67: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  120 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV444PS & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv422ps(const AVS_VideoInfo*)':
avisynth_c.cpp:126:67: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  126 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV422PS & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv420ps(const AVS_VideoInfo*)':
avisynth_c.cpp:132:67: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  132 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV420PS & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_y32(const AVS_VideoInfo*)':
avisynth_c.cpp:138:62: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  138 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y32 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Jamaika1 commented 1 month ago
In file included from list.cpp:29:
list.h:102:22: error: expected unqualified-id before ')' token
  102 |         ListNode2<T>() {}
      |                      ^
list.h:103:22: error: expected unqualified-id before 'void'
  103 |         ListNode2<T>(void *pv) : ListNode(pv) {}
      |                      ^~~~
list.h:103:22: error: expected ')' before 'void'
  103 |         ListNode2<T>(void *pv) : ListNode(pv) {}
      |                     ~^~~~
      |                      )
list.h:116:18: error: expected unqualified-id before ')' token
  116 |         List2<T>() {}
      |                  ^
pinterf commented 1 month ago

When defining a constructor for a template class, we don’t need to specify the template parameter in the constructor’s name. maybe this is the base problem, which your gcc is more picky for. I then simply removed the <T> from the constructor.

instead of

template<class T>
class ListNode2 : public ListNode {
friend List2<T>;
public:
    ListNode2<T>() {}
    ListNode2<T>(void *pv) : ListNode(pv) {}

this one

    ListNode2() {}
    ListNode2(void *pv) : ListNode(pv) {}

After this modification, MSVC is still working fine for me like before. No change in my GCC build (GNU 14.1.0), pls. try this mod on your environment.

edit: old-new comment exchanged.

pinterf commented 1 month ago

I recognized that you have c++23 enabled. The huge number of warnings: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion] are probably triggered from c++20 mode.

Please try building Avisynth code with only c++17 enabled, do the enum errors still appear? First, you may use -std=c++23 instead of -std=gnu++23 (just for the sake of test), then change it to -std=c++17 for the production build. Standard Avisynth source is written in only c++17 in mind.

Jamaika1 commented 1 month ago

Generally speaking I was curious if avisynth would work with ffmpeg in static. Does that make sense? After all, avisynth itself is not very interesting. I know that gcc is not the best idea for windows. I am amateur and will create ffmpeg in c23/c++23 with the latest mpeg5 plugins. I think that ffmpeg creators went a bit overboard adding some things and that's where the idea came from. So I didn't post other fixes I had to do for C++23. Things are starting to get interesting with ffmpeg add-ons.

After this modification, MSVC is still working fine for me like before. No change in my GCC build (GNU 14.1.0), pls. try this mod on your environment.

In file included from list1.cpp:29:
list.h:102:21: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
102 |         ListNode2<T>() {}
|                     ^
list.h:102:21: note: remove the '< >'
list.h:103:21: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
103 |         ListNode2<T>(void *pv) : ListNode(pv) {}
|                     ^
list.h:103:21: note: remove the '< >'
list.h:116:17: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
116 |         List2<T>() {}
|                 ^
list1.h:116:17: note: remove the '< >'
Built by Equation Solution <http://www.Equation.com>.
Using built-in specs.
COLLECT_GCC=g++.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-15-20240825/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/15-20240825 --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cross/x86_64/gcc/15-20240714 --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 15.0.0 20240825 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-std=gnu++23' '-v' '-static' '-march=x86-64-v2' '-ftree-vectorize' '-g0' '-O3' '-fPIC' '-mavx' '-mxsave' '-mpclmul' '-maes' '-Wcomment' '-Wformat=1' '-Wshift-negative-value' '-Wsign-compare' '-Wtype-limits' '-Warray-bounds=1' '-Wparentheses' '-Wlogical-not-parentheses' '-D' 'WINVER=0x0602' '-D' '_WIN32_WINNT=0x0602' '-D' 'WIN32_LEAN_AND_MEAN=//' '-U' '__STRICT_ANSI__' '-D' '__USE_MINGW_ANSI_STDIO=1' '-D' 'AVSC_WIN32_GCC32=1' '-D' 'AVS_STATIC_LIB=1' '-D' 'BUILDING_AVSCORE=1' '-D' '_DEBUG=1' '-c' '-o' 'avisynth_c.o'
 C:/gcc1500/bin/../libexec/gcc/x86_64-w64-mingw32/15.0.0/cc1plus.exe -quiet -v -iprefix C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/ -U_REENTRANT -D WINVER=0x0602 -D _WIN32_WINNT=0x0602 -D WIN32_LEAN_AND_MEAN=// -U __STRICT_ANSI__ -D __USE_MINGW_ANSI_STDIO=1 -D AVSC_WIN32_GCC32=1 -D AVS_STATIC_LIB=1 -D BUILDING_AVSCORE=1 -D _DEBUG=1 avisynth_c.cpp -quiet -dumpbase avisynth_c.cpp -dumpbase-ext .cpp -march=x86-64-v2 -mavx -mxsave -mpclmul -maes -g0 -O3 -Wcomment -Wformat=1 -Wshift-negative-value -Wsign-compare -Wtype-limits -Warray-bounds=1 -Wparentheses -Wlogical-not-parentheses -std=gnu++23 -version -ftree-vectorize -fPIC -o C:\Users\komp_\AppData\Local\Temp\ccZP1pIl.s
GNU C++23 (GCC) version 15.0.0 20240825 (experimental) (x86_64-w64-mingw32)
        compiled by GNU C version 15.0.0 20240714 (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:/gcc1500/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include/c++/15.0.0"
ignoring duplicate directory "C:/gcc1500/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include/c++/15.0.0/x86_64-w64-mingw32"
ignoring duplicate directory "C:/gcc1500/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include/c++/15.0.0/backward"
ignoring duplicate directory "C:/gcc1500/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/15.0.0/include"
ignoring nonexistent directory "/home/gfortran/gcc-home/binary/mingw32/cross/x86_64/gcc/15-20240714/home/gfortran/gcc-home/binary/mingw32/native/x86_64/gcc/15-20240825/lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include"
ignoring duplicate directory "C:/gcc1500/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/15.0.0/include-fixed"
ignoring duplicate directory "C:/gcc1500/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/home/gfortran/gcc-home/binary/mingw32/cross/x86_64/gcc/15-20240714/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include/c++/15.0.0
 C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include/c++/15.0.0/x86_64-w64-mingw32
 C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../include/c++/15.0.0/backward
 C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/include
 C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/include-fixed
 C:/gcc1500/bin/../lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../x86_64-w64-mingw32/include
End of search list.
Compiler executable checksum: 8103c90c053b2dd92749c9d9b63a314b
avisynth_c.cpp: In function 'int avs_is_yv24(const AVS_VideoInfo*)':
avisynth_c.cpp:66:63: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   66 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV24 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yv16(const AVS_VideoInfo*)':
avisynth_c.cpp:72:63: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   72 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yv12(const AVS_VideoInfo*)':
avisynth_c.cpp:78:63: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   78 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV12 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yv411(const AVS_VideoInfo*)':
avisynth_c.cpp:84:64: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   84 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV411 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_y8(const AVS_VideoInfo*)':
avisynth_c.cpp:90:61: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   90 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y8 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv444p16(const AVS_VideoInfo*)':
avisynth_c.cpp:96:68: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
   96 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV444P16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv422p16(const AVS_VideoInfo*)':
avisynth_c.cpp:102:68: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  102 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV422P16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv420p16(const AVS_VideoInfo*)':
avisynth_c.cpp:108:68: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  108 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV420P16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_y16(const AVS_VideoInfo*)':
avisynth_c.cpp:114:62: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  114 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y16 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv444ps(const AVS_VideoInfo*)':
avisynth_c.cpp:120:67: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  120 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV444PS & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv422ps(const AVS_VideoInfo*)':
avisynth_c.cpp:126:67: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  126 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV422PS & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_yuv420ps(const AVS_VideoInfo*)':
avisynth_c.cpp:132:67: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  132 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YUV420PS & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
avisynth_c.cpp: In function 'int avs_is_y32(const AVS_VideoInfo*)':
avisynth_c.cpp:138:62: warning: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion]
  138 |   return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y32 & AVS_CS_PLANAR_FILTER);
      |                                                   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Jamaika1 commented 1 month ago

My work for windows in static. I don't know if it works correctly. avisynth + audioboost + avsresize https://www.sendspace.com/file/8jwldn

qyot27 commented 1 month ago

Generally speaking I was curious if avisynth would work with ffmpeg in static.

It's been possible for over three years. But it is not in upstream FFmpeg for good reason. And it has nothing at all to do with the C or C++ standard in use.

Jamaika1 commented 1 month ago

I recognized that you have c++23 enabled. The huge number of warnings: bitwise operation between different enumeration types '<unnamed enum>' and '<unnamed enum>' is deprecated [-Wdeprecated-enum-enum-conversion] are probably triggered from c++20 mode.

Please try building Avisynth code with only c++17 enabled, do the enum errors still appear? First, you may use -std=c++23 instead of -std=gnu++23 (just for the sake of test), then change it to -std=c++17 for the production build. Standard Avisynth source is written in only c++17 in mind.

You were right GCC 15.0.0 C++17 test was successful.