[x264-devel] Re: discontinous encoding

Laurent Aimar fenrir at via.ecp.fr
Mon Aug 9 02:07:54 CEST 2004


On Mon, Aug 09, 2004, Måns Rullgård wrote:
> I'm using x264 for real-time encoding of video, and to make that
> possible I have to use an SMP machine and encode two or more GOPs in
> parallel.  The resulting stream plays nicely, but I'm wondering
> whether this manner of encoding can cause a non-conformant stream.
> Any comments on this?  I'm using completely separate encoder contexts
> and force an IDR frame when there is a discontinuity.
 If you use same SPS/PPS and each encoder creates GOP starting with IDR, then
the stream should be valid if you take care of the i_idr_pic_id.

 The constraint is that if you have 2 consecutive access units that are
IDR frames, then i_idr_pic_id for theses IDR should not be equal.

 Currently I just increase it by 1 every IDR, so that can fail, but it's
easy to avoid : for N encoder threads, just init it for thread n to n
and increase it by 2^X such as 2^X >= N and X < 16.
(you have to wrap i_idr_pic_id when >= 2^16)

-- 
fenrir

-- 
This is the x264-devel mailing-list
If you are in trouble, please contact <postmaster at videolan.org>



More information about the x264-devel mailing list