Video applications are becoming an essential component for mobile devices. H.264, the latest video-coding standard, shows significant potential in terms of bandwidth savings at the cost of substantially increased complexity compared to former standards. The computing power currently available on mobile devices is not sufficient to allow high quality real-time encoding using H.264. Our algorithm uses on average only 0.41% of the computational complexity of the full search method used by H.264, leading to a significant reduction in computational requirements and enabling realtime applications for mobile devices with the efficiency of H.264.