added quality mode for x264