Yes there are H264 software that is released under an open source copyright licence. However the implementation might still be breech patents and might still be illegal to use.
It's a shame that a complete clean room open source implementation (e.g. x264) might still be illegal to use in some territories.