From 518dbbc89c29691482d31666ba46add429a9cb9e Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Thu, 2 Sep 2010 15:29:29 -0700 Subject: [PATCH] Use smaller values for idr_pic_id Saves a few bits and fixes problems on certain fantastically terrible decoders, such as the Apple iPad. --- encoder/encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 { -- 2.47.3