I'm creating a live streaming app using HEVC encoding/decoding on unreliable network. There are IDR/I/P/B frame types available in HEVC, from which I'm using IDR and P frame since the source video is captured in realtime and the latency from capture device to display is critical.
Since the network is unreliable, it needs to be expected that any frame in streaming may be dropped. To avoid making decoded images jaggy, I implemented the receiver as follows:
This procedure comes from my understanding that P frame refers the latest IDR frame, so any P frame can be dropped while any IDR frame cannot be dropped.
However, the decoded images are still jaggy (it looks the decoder fails compensating motion vectors)
Here the following questions came to my mind:
Thank you very much in advance!
P frames can refer to other P frames. You can not drop them. You can use reference frame invalidation to force them to only refer to the IDR, but that will increase bitrate/decrease image quality.