> On 5 Jun 2023, at 00:08, Lorenzo <plore...@disroot.org> wrote:
> 
> Hi Reimar,
> 
[...]
> 
> The above was 16 years ago; on Debian powerpc list a couple a
> ways to do runtime detection were suggested
> 
> https://lists.debian.org/debian-powerpc/2023/06/msg00030.html
> 
> could you please check again if it's still unfeasible to detect altivec
> at runtime in mplayer/mencoder?

While it's still plenty messy, FFmpeg has runtime detection of altivec, and 
MPlayer itself has no altivec code itself.
But I don't think it works, the problem is the compiler options:
- to be able to compile code using altivec and have the optimizations 
available, -maltivec must be used
- if -maltivec is used, even normal C code will use altivec instructions, thus 
crashing

The first thing to check would be whether FFmpeg (ffplay in particular) works 
(supporting both altivec optimized playback and not crashing without altivec).
But in the end I don't know if it is realistic to change the situation:
- implementing and testing is hard since not much hardware is around (and at 
least some build system adjustments will be needed)
- without altivec, the machines are so slow, certainly nothing but ancient 
video files will be playable, putting the benefit a bit in question of running 
on non-altivec machines
- building the base code without -maltivec will make MPlayer slower on machines 
with altivec like G4, which might be enough to push them over the edge to not 
be able to play certain videos that they can otherwise

So maybe it is possible to get to work now, but probably separate builds would 
remain the better approach.
On the plus side, if FFmpeg works, and since Debian links MPlayer to FFmpeg 
dynamically, --disable-altivec should be all that is needed - assuming the 
performance degradation on altivec enabled systems mentioned above is 
considered acceptable.

Best regards,
Reimar

Reply via email to