Optimal SP frame selection and bit budget allocation for mobile H.264 video streaming