You will have to make sure your joists can handle the addition of considerably more weight from the plywood subfloor and any floor coverings.
How to level a wooden bathroom floor.
A plywood subfloor will bridge any minor waves in the existing floor and leveling compound would help too.
Watch our step by step video showing how to level a wooden floor with expert advice and top tips to help you complete the job with confidence.
On the top side of the floor another fix it idea to lay down new hardwood over the existing floor.