Le 29 mai 2025 19:02:24 GMT+03:00, Michael Niedermayer <mich...@niedermayer.cc> a écrit : >can gcc or clang not build code like our runtime cpudetect ?
You can, on some versions and some architectures, select the target CPU per function, but you can't select multiple targets, nor have the compiler automatically select "relevant" targets (i.e. those that it can optimise differently). >i mean build functions for each major type and detect cpu once >and switch accordingly ? GCC supports resolving a symbol at runtime, but it requires support from the run-time linker (of course), which is not portable. I'm not sure if anything other than GNU/libc actually supports it. And it requires a lot of boilerplate (less than FFmpeg's approach but still). >I cannot be the first person thinking of that No, indeed - auto vectorisation has been a thing for twenty years. But, either nobody has cared to fund that runtime detection bit, or compiler developers somehow block that work on some technical basis. My uninformed guess is the former. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".