A global decision method for moving picture coding