We propose a high-performance hardware accelerator for intra prediction and mode decision in H.264/AVC video encoding. We use two intra prediction units to increase the performance. Taking advantage of function similarity and data reuse, we successfully reduce the hardware cost of the intra prediction units. Based on a modified mode decision algorithm, our design can deliver almost the same video quality as the reference software. We have implemented the proposed architecture in Verilog and synthesized it targeting towards a TSMC 0.13pm CMOS cell library. Running at 75MHz, our 36K-gate circuit is capable of realtime encoding 720p HD (1280x720) video sequences at 30 frames per second (fps).