]> granicus.if.org Git - libx264/commitdiff
update avc2avi for high profile
authorLoren Merritt <pengvado@videolan.org>
Mon, 20 Jun 2005 00:36:05 +0000 (00:36 +0000)
committerLoren Merritt <pengvado@videolan.org>
Mon, 20 Jun 2005 00:36:05 +0000 (00:36 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@267 df754926-b1dd-0310-bc7b-ec298dee348c

tools/avc2avi.c
x264.h

index 7f868094d22ba3b6b06b93bb3f7e1f8a27f02f5f..4242d3b8c034199fc6569b7da7ffe9ff6f187f56 100644 (file)
@@ -451,9 +451,36 @@ void h264_parser_parse( h264_t *h, nal_t *nal, int *pb_nal_start )
     {
         int i_tmp;
 
-        bs_skip( &s, 8 + 1+1+1 + 5 + 8 );
+        i_tmp = bs_read( &s, 8 );
+        bs_skip( &s, 1+1+1 + 5 + 8 );
         /* sps id */
         bs_read_ue( &s );
+
+        if( i_tmp >= 100 )
+        {
+            bs_read_ue( &s ); // chroma_format_idc
+            bs_read_ue( &s ); // bit_depth_luma_minus8
+            bs_read_ue( &s ); // bit_depth_chroma_minus8
+            bs_skip( &s, 1 ); // qpprime_y_zero_transform_bypass_flag
+            if( bs_read( &s, 1 ) ) // seq_scaling_matrix_present_flag
+            {
+                int i, j;
+                for( i = 0; i < 8; i++ )
+                {
+                    if( bs_read( &s, 1 ) ) // seq_scaling_list_present_flag[i]
+                    {
+                        uint8_t i_tmp = 8;
+                        for( j = 0; j < (i<6?16:64); j++ )
+                        {
+                            i_tmp += bs_read_se( &s );
+                            if( i_tmp == 0 )
+                                break;
+                        }
+                    }
+                }
+            }
+        }
+
         /* Skip i_log2_max_frame_num */
         h->i_log2_max_frame_num = bs_read_ue( &s ) + 4;
         /* Read poc_type */
diff --git a/x264.h b/x264.h
index e3eedf3b5641336e9a8a1d33326bd7cf8a98692e..e3969001e9f24efccb2ce8dca6fbc9f852a114fe 100644 (file)
--- a/x264.h
+++ b/x264.h
@@ -26,7 +26,7 @@
 
 #include <stdarg.h>
 
-#define X264_BUILD 31
+#define X264_BUILD 32
 
 /* x264_t:
  *      opaque handler for decoder and encoder */