OS/2, eCS & ArcaOS - Technical > Multimedia

AVX safe FFmpeg

<< < (3/5) > >>

Igor:
Dll kit to support streaming video Seamonkey and Firefox for OS / 4 kernel. Disabled AVX support. Failed to get this set of commands to work with the "-fno-common" key.
http://ru2.halfos.ru/ffmpeg/ffmpeg-os2-2.8.17-dll-noavx.zip

Dave Yeo:

--- Quote from: Igor on February 19, 2021, 04:24:59 pm ---Dll kit to support streaming video Seamonkey and Firefox for OS / 4 kernel. Disabled AVX support. Failed to get this set of commands to work with the "-fno-common" key.
http://ru2.halfos.ru/ffmpeg/ffmpeg-os2-2.8.17-dll-noavx.zip

--- End quote ---

You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment. The -fno-common is kind of a hack.

Dave Yeo:

--- Quote from: Lars on February 19, 2021, 01:05:26 pm ---can you confirm that this AVX enabled version will ONLY EVER run on the OS/4 kernel ?

--- End quote ---

This FFmpeg plays videos fine on my system, CPU supports AVX, OS/2 kernel which doesn't.

--- Quote ---
As far as I know, it requires OS support to save and restore the full 256 bit registers on a task switch and I seem to remember that the standard OS/2 kernel only supports SSE, that is, save and restore of only the 128 bit registers.
By the way, does anyone know if the 128 bits that SSE uses are only the lower 128 bits of the 256 bit registers or are these completely distinct register sets (one complete register set for SSE and an additional register set for AVX) ?

Or do I miss something altogether ?

--- End quote ---

They're the same registers, just renamed and larger. SSE still uses the lower half.
Good code is supposed to check for operating system support and only use AVX if supported. I have a faint memory that SSE was similar as Win95 and such didn't support saving the registers

OS4User:

--- Quote from: Dave Yeo on February 19, 2021, 05:50:28 pm ---You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment

--- End quote ---

Unfortunately, wlink/wl  does not have an option/command to set  "between parts alignment"  within object.

Igor:

--- Quote from: Dave Yeo on February 19, 2021, 06:06:51 pm ---This FFmpeg plays videos fine on my system, CPU supports AVX, OS/2 kernel which doesn't.

--- End quote ---
Yes of course. So everything will be, if the kernel does not support AVX, then this code is not included and another algorithm works that does not require special alignment.
But if the kernel supports AVX (this is an OS4 kernel), then the AVX code branch will turn on and a trap will appear.
If you disable AVX support during compilation, then the code will work on both the standard kernel and OS4.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version