libx265: Reduce the scope of some variables