]> git.videolan.org Git - x264.git/commitdiff
Use smaller values for idr_pic_id
authorJason Garrett-Glaser <darkshikari@gmail.com>
Thu, 2 Sep 2010 22:29:29 +0000 (15:29 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Fri, 3 Sep 2010 20:34:29 +0000 (13:34 -0700)
Saves a few bits and fixes problems on certain fantastically terrible decoders,
such as the Apple iPad.

encoder/encoder.c

index f06c4dec18b3630a567424bce151fa4427b99bac..c22b9bfbf910084dec373474caefe2703452d923 100644 (file)
@@ -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
     {