Giter Club home page Giter Club logo

Comments (19)

K-os avatar K-os commented on May 31, 2024 1

I have an old laptop at home with a similarly old CPU. I can test it on that machine tomorrow.

Which version of Windows are you using? Could that be the problem?

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

Thats very strange. Does this generate a stack-trace or something (is there a gdb for windows)? Would be very helpful. Maybe a profile build could provide more info (RelWithDebInfo) on where and what problem occures.

from vvdec.

ZenKiyoshi avatar ZenKiyoshi commented on May 31, 2024

Thats very strange. Does this generate a stack-trace or something (is there a gdb for windows)? Would be very helpful. Maybe a profile build could provide more info (RelWithDebInfo) on where and what problem occures.

I'm not a software development, I quite don't understand what you mention about.

Sorry, I can't help much.

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

Thats alright. I'll see if we can reproduce it eventually.

Possibly related to: #8

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

What output does the vvdecapp produce when you run it? Does it always crash or only when you specify a bitstream to decode? What happens when you run it explicitely specifing --simd 0 or --simd 1 (or --simd 2)? Please provide as much info as possible. I don't have the CPU at hand so it will be hard to reproduce.

Also help would be appreciated from anyone with a similar CPU who could reproduce the issue and provide a stacktrace.

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

The AMD R5 3600, as far as I understand, supports AVX2, so it seems there are some AVX2 instructions out there that break the compatibility with non-AVX2 CPUs. I'll see if I can find a CPU like that. Which compiler do you use in the MSYS2?

from vvdec.

ZenKiyoshi avatar ZenKiyoshi commented on May 31, 2024

The AMD R5 3600, as far as I understand, supports AVX2

Yes, AMD R5 3600 does support AVX2.
I5 2500s has been 10 years old already and it's latest instruction is AVX(1).

Which compiler do you use in the MSYS2?

mingw-w64-x86_64-gcc

msys2-gcc

Does it always crash or only when you specify a bitstream to decode? What happens when you run it explicitely specifing --simd 0 or --simd 1 (or --simd 2)?

I just type "vvdecapp.exe" in cmd, no any thing else, hit enter and it crashes immediately also throwing error message box (like image in first post).
Or double click on vvdecapp.exe file.

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

Could you type vvdecapp.exe --simd 0 and report what happens? That is strange that the decoder app does not produce any output before exiting.

from vvdec.

ZenKiyoshi avatar ZenKiyoshi commented on May 31, 2024

Could you type vvdecapp.exe --simd 0 and report what happens? That is strange that the decoder app does not produce any output before exiting.

It just crashes for each time I try and no any output.

vvdec-1

.
.
On static build
vvdec will show input error if I don't give it bitsteam file.
With --simd 4, vvdec show error, because i5 2500s doesn't have AVX2.

vvdec-static

With --simd 3 (static build)
i5 2500s has AVX(1), but vvdecapp still shows error.

vvdec-simd-3

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

I went around the office yesterday to try and find the oldest working computer. I found one or two candidates I might get my hands on next week, that don't have AVX2 - if that's even the actual problem. Keep you posted.

from vvdec.

ZenKiyoshi avatar ZenKiyoshi commented on May 31, 2024

Window 10 Pro 21H2, build 19044.1889 (both 2 PC)

My binary files: https://mega.nz/folder/l1liBQIR#j7QgZSlb8VYlX1wpCtV1EQ

I just reinstalled Window on i5 2500s PC on this early year. It's main purposes are web browser, movies. I don't install any programs could intervene deep in system. I usually use vvdec to decode some videos I encode from AMD machine, but it's static build vvdec.

Until I try to build shared and issue happens. I found this issue when try MPV build from VVCEASY. That is a MPV build with vvdec intergrated, so I don't need run command every time I watch vvc video. It run on my AMD machine, but not i5 one.

So, I started build my own vvdec intergrated MPV and face the same result, It ran on my AMD, not i5.
I went back, test FFmpeg, it also didn't, then vvdec and found out vvdec didn't run from beginning. If I build FFmpeg and MPV without vvdec, they can run on i5 PC.

The reason I build shared because FFmpeg don't recognize static build vvdec when run ./configure --enable-libvvdec, it only reconiges the shared build.

from vvdec.

MartinEesmaa avatar MartinEesmaa commented on May 31, 2024

@ZenKiyoshi, I think I definitely agree with you.
I tried same thing to build ffmpeg vvc static build, but not recognised or found.
Also, I tried build vvdecapp of static, but it does not link for some reason using MSYS2 MinGW only.

Cross compilation of Windows in Linux worked with static without DLL mess.
Cross compiled files of vvenc & vvdec: https://mega.nz/folder/GtUg0LxC#bVCANqxakq4AHgf-3OoNuA

Trying cross compile vvdec with FFmpeg, does not detect only static.

Build with RelWithDebInfo using MSYS2 and share to developers:

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. -G "MinGW Makefiles"
  • Martin Eesmaa

from vvdec.

K-os avatar K-os commented on May 31, 2024

I was able to reproduce the error on an old laptop. For some reason the compiler outputs code that uses an unsupported instruction. If I build without link-time optimization the problem disappears. My impression is, that the cause of the problem is a compiler bug.

To disable link-time optimization either:
make release-shared disable-lto=1
or:
add -DVVDEC_ENABLE_LINK_TIME_OPT=OFF to your cmake invocation

from vvdec.

MartinEesmaa avatar MartinEesmaa commented on May 31, 2024

@K-os, it seems worked to build FFmpeg vvc without reason, but only vvenc did not recognised of FFmpeg.
https://github.com/MartinEesmaa/FFmpeg-FixVVC

cmake -DVVENC_ENABLE_LINK_TIME_OPT=OFF -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/mingw64 -G "MinGW Makefiles" ..

error log:

marti@martinhero13 MINGW64 ~/FFmpeg-FixVVC
$ ./configure --enable-libfdk-aac --enable-libvvenc --enable-libvvdec --enable-static --disable-shared --enable-pic --enable-libxml2 --enable-zlib --extra-libs='-lpthread -lm -lz' --extra-ldexeflags=-static --pkg-config-flags=-static --disable-w32threads --extra-version=VVCEasy
ERROR: libvvenc >= 1.4.0 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

from vvdec.

K-os avatar K-os commented on May 31, 2024

@MartinEesmaa did you build vvenc? This error has nothing to do with how you compiled vvdec.

from vvdec.

MartinEesmaa avatar MartinEesmaa commented on May 31, 2024

@MartinEesmaa did you build vvenc? This error has nothing to do with how you compiled vvdec.

I built vvenc without lto and tried to use --enable-libvvenc on my ffmpeg vvc repository and won't recognise, but libvvdec is recognized by FFmpeg vvc. vvenc & vvdec without lto are also working fine.

from vvdec.

adamjw24 avatar adamjw24 commented on May 31, 2024

@MartinEesmaa did you build vvenc? This error has nothing to do with how you compiled vvdec.

I built vvenc without lto and tried to use --enable-libvvenc on my ffmpeg vvc repository and won't recognise, but libvvdec is recognized by FFmpeg vvc. vvenc & vvdec without lto are also working fine.

Why build it static tho? Didn't you state that FFmpeg only works with dynamic builds? FFmpeg not recognizing static builds is a different issue and should not be discussed in this thread

from vvdec.

ZenKiyoshi avatar ZenKiyoshi commented on May 31, 2024

@K-os I compile again and my i5 2500s can run vvdec shared build now.

One more thing.
i5 2500s does have AVX(1), so I think it could run vvdec with --simd 3
but vvdec only allows --simd 2 on this cpu.

vvdec-simd-3

from vvdec.

K-os avatar K-os commented on May 31, 2024

Oh yes. AVX detection is disabled for all windows builds, because Visual Studio used to produce code that resulted in invalid instructions. It should probably only be disabled for Visual Studio builds.

But I don't think there would be a significant performance improvement, since there is no specific AVX code in vvdec. It will only allow the compiler to optimize some code using AVX instructions.

You can give it a try by removing the #ifndef _WIN32 and #endif in CommonDefX86.cpp lines 187 and 190:

#ifndef _WIN32
// don't detect AVX, as there are problems with MSVC production illegal ops for AVX
ext = AVX;
#endif

But leave the ext = AVX; there.

from vvdec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.