[x264-devel] Reference picture selection

Arindam Biswas send2ari at gmail.com
Sat Jan 2 08:14:40 CET 2010


Hi,
I am using x264 for live video stream encoding and then it is transmitted
over rtp. In my server application I get feedback from my rtp client about
which particular frame has been received by the decoder without any error.
So for my next frame encoding I want to reference from that frame which has
been received by decoder.
To do this I am dropping frame from my encoder's DPB.

I am trying this code for frame dropping in the reference list.

x264_frame_t ** frames = h->frames.reference
while(*frames)
{
      if( *frames->i_poc  != received_poc)
              x264_frame_push_unused(h, x264_frame_shift(frames));
      else
             frames++
}

I have inserted this code in x264_encoder_encode function just before
 if( x264_reference_update( h ) )
        return -1;
I is it the right code and right place? Do I need to do anything else for
frame dropping?

I have checked h->frames.reference is a 16 size array, Does that mean x264
always keeps 16 frames in its DPB?

If I find that received_poc is 10 frames earlier ( aasume poc=n) than the
current frame to be encoded and if it is available in my DPB then after
encoding at my client's decoder reference buffer will that nth frame be
still available for referencing?

Thanks
Arindam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20100101/34c9e930/attachment.htm>


More information about the x264-devel mailing list