using the QuickSync H264 encoder in encoding order and I want to know if
it is possible to send the same frame several times to be encoded (I
want to try several quantizers to choose the best one).
Am I understanding you correctly that you want to encode to several different streams but that each stream should have a different set of encoding parameters?
If so, the most straightforward approach would be to run each encode workload in a serial manner and then compare the results. Alternatively, you could also design an application that reads raw frame data then feeds it into two encoding sessions that work in parallel.
Or are you instead attempting to feed the encoder a frame then assess the encoded output for each frame? Then based on results discard that frame with another frame encoded with other parameters etc. If that is the case it is unfortunately not possible to do this using the SDK.
What I want to do is exactely what you described as "attempting to feed the encoder a frame then assess the encoded output for each frame", if I uderstand well there is no way to tell the encoder to discard the last encoded frame (in encoding order). Let me explain my specific use of the encoder: If for exemple I need to acheive a specific video quality for each frame (PSNR = 37db) I need to reencode each frame several times to reach the targeted video quality.
I don't know about this particular usage model, but encoders Reset functionality is tested in a similar way. Unfortunatelly there is no way to tell an encoder to discard just one last frame. Reset resets all of the encoder state except for bitrate control. But in case of encoding with constant QP bitrate control state doesn't matter anyway.