In the US, unfortunately,they can be (although not all algorithms are patentable). For example algorithms used in many media formats are patented.
https://ffmpeg.org/legal.html