From: Jason Garrett-Glaser Date: Thu, 2 Sep 2010 22:29:29 +0000 (-0700) Subject: Use smaller values for idr_pic_id X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=518dbbc89c29691482d31666ba46add429a9cb9e;p=x264.git Use smaller values for idr_pic_id Saves a few bits and fixes problems on certain fantastically terrible decoders, such as the Apple iPad. --- diff --git a/encoder/encoder.c b/encoder/encoder.c index f06c4dec..c22b9bfb 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -1775,8 +1775,8 @@ static inline void x264_slice_init( x264_t *h, int i_nal_type, int i_global_qp ) { x264_slice_header_init( h, &h->sh, h->sps, h->pps, h->i_idr_pic_id, h->i_frame_num, i_global_qp ); - /* increment id */ - h->i_idr_pic_id = ( h->i_idr_pic_id + 1 ) % 65536; + /* alternate id */ + h->i_idr_pic_id ^= 1; } else {