The paper presents an algorithm for selecting intra prediction modes for intra frame coding in the H.264/AVC standard, aimed at reducing computational complexity and enhancing compression efficiency. It identifies key prediction modes (0, 1, 2, 4, and 6) that provide better PSNR and compression ratios, demonstrating improved performance over less effective modes (5, 7, and 8). Results from simulations conducted using MATLAB confirm the algorithm's effectiveness in optimizing intra frame coding for various video sequences.