VGA digitizer with FPGA (input, not output)
Digitizing of video is best done with a chip meant for that purpose. Many manufacturers have chips that contain triple video ADC. These take in the analog RGB and digital HS/VS syncs. They generate the pixel clock with a PLL based on the HS signal, based on how many pixels per line you want to have. So it is the job of the programmer to identify the video format it might be based on information given by the chip and configure the parameters so that you get the output you want for that format. The available detection parameters usually include lines per frame, sync polarities and some kind of way to know the HS or VS rate in some units. If there is no detection info available from the chip then MCU/FPGA needs to analyze the HS/VS sync signals itself.
So basically you could have a list of formats in a table. If you see that the video currently arriving matches some entry in the format table, then that format is coming in. Sure, you can use any method you want for detection, to support any formats you want.
For example, if you detect you have 525 HS pulses per VS pulse, the sync polarities are both negative pulses, and you either measure the VS to be close enough to 59.94 Hz, or HS is close enough to 31.46875 kHz, then that should be the format that needs 800 pixels per line to get the correct pixel clock of 25.175 MHz.