PDA

View Full Version : how to simulate random packet losses in H.264 reference software?


shyaki
28th March 2006, 18:09
I want to test the error resilience of H.264 against random packet losses. I add the following commands into the function GetRTPNALU():

y=(double)rand()/RAND_MAX;
if (y<0.02)
return -1;

However, the decoder stops with the error message "RefPicList0[ num_ref_idx_10_active_minus1 ] is equal to 'no reference picture'. invalid bitstream


Could you please tell me how to modify the H.264 reference software source code to simulate the random packet losses? Thanks a lot for your help.,

DarkZell666
3rd April 2006, 09:32
If you're deep into programming (which I am, but I'm not the geek that some here on the forum are :p) I'd rather suggest that you encode the video clip completely, and then reopen it and corrupt it yourself (invent some corruption algo of your own, try varying the size of the 'holes' in the file, vary the places of the 'holes', etc.).

This is a more realistic approach, since packet loss happens when streaming content on internet (unless you're trying to encode on a distributed network, but I'm not even sure any h264 implementation can do that yet ...maybe ateme's ), and the content in itself isn't corrupted while encoding is it ? ;)

Just my two cents 'cause noone answered :p

akupenguin
3rd April 2006, 10:24
However, the decoder stops with the error message "RefPicList0[ num_ref_idx_10_active_minus1 ] is equal to 'no reference picture'. invalid bitstream
Umm... yes, if you throw away stuff at random, you get an invalid bitstream. Isn't that what you wanted?

unless you're trying to encode on a distributed network, but I'm not even sure any h264 implementation can do that yet ... ELDER (http://forum.doom9.org/showthread.php?t=102119)

DarkZell666
3rd April 2006, 14:08
Ahh that's what ELDER was all about ... I admit I didn't read that thread carefuly first time round ;)

thx for pointing that out :)