[x264-devel] commit: Use smaller values for idr_pic_id (Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Sat Sep 4 01:24:50 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Sep  2 15:29:29 2010 -0700| [518dbbc89c29691482d31666ba46add429a9cb9e] | committer: Jason Garrett-Glaser 

Use smaller values for idr_pic_id
Saves a few bits and fixes problems on certain fantastically terrible decoders,
such as the Apple iPad.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=518dbbc89c29691482d31666ba46add429a9cb9e
---

 encoder/encoder.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/encoder/encoder.c b/encoder/encoder.c
index f06c4de..c22b9bf 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
     {



More information about the x264-devel mailing list