The H.264 platinum codecs feature support for "Adaptive Longterm Frame Insertion", see here:
http://processors.wiki.ti.com/index.php/H.264_DM36x_Ver_2.0_Codec#Adaptive_Longterm_Frame_Insertion
I'm attempting to use this feature in a DM368-based system but I'm not sure I'm setting it up correctly. With the feature turned off and a simulated packet loss of 0.1% the decoder behaves as expected. I get a decode error on the frame with the dropped packet and then every frame after that reports extended error code 0x4f "The current picture refers to an already decoded error frame" ...until the next I-frame comes along and stops the error being propagated. All as expected.
With the feature enabled the reporting from the decoder looks correct. I still get the initial error from the frame with the dropped packet, then a couple of 0x4f warnings and then they stop. The error propagation appears to have been halted by instructing the encoder to "UseLongTermFrame=1". However the picture looks awful. It looks to me like setting UseLongTermFrame=1 on the encoder immediately corrupts the image. The result is much worse than the original error left to propagate. I'm assuming I'm not setting LongTermFrames correctly, or there's a mismatch between the references used by encode and decode.
My settings are;
EnableLongTermFrame = 1;
LongTermRefreshInterval = 30;
UseLongTermFrame is set to 1 whenever the decoder signals an error
SetLongTermFrame = 0; // Do I have to set this explicitly if I have set the refresh interval?
I've also tried setting LongTermRefreshInterval = 0 because the user guide says that I frames are automatically counted as long term frames. However this makes no difference.
Hope someone can shed some light on the right way to use this feature.
Alex