remove unused tables from SPS/PPS. reduces overhead when syncing threads.
authorLoren Merritt <pengvado@videolan.org>
Sat, 4 Jun 2005 06:23:56 +0000 (06:23 +0000)
committerLoren Merritt <pengvado@videolan.org>
Sat, 4 Jun 2005 06:23:56 +0000 (06:23 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@248 df754926-b1dd-0310-bc7b-ec298dee348c

common/common.h
common/set.h
encoder/set.c

index 0cd53ae..790bf74 100644 (file)
@@ -233,9 +233,9 @@ struct x264_t
     int             i_nal_ref_idc;  /* threads only */
 
     /* We use only one SPS and one PPS */
-    x264_sps_t      sps_array[32];
+    x264_sps_t      sps_array[1];
     x264_sps_t      *sps;
-    x264_pps_t      pps_array[256];
+    x264_pps_t      pps_array[1];
     x264_pps_t      *pps;
     int             i_idr_pic_id;
 
index 3893bf6..891d2ec 100644 (file)
 enum profile_e
 {
     PROFILE_BASELINE = 66,
-    PROFILE_MAIN = 77,
+    PROFILE_MAIN     = 77,
     PROFILE_EXTENTED = 88,
-    PROFILE_HIGH = 100,
-    PROFILE_HIGH10 = 110,
+    PROFILE_HIGH    = 100,
+    PROFILE_HIGH10  = 110,
     PROFILE_HIGH422 = 122,
     PROFILE_HIGH444 = 144
 };
@@ -110,6 +110,9 @@ typedef struct
     int b_pic_order;
     int i_num_slice_groups;
 
+#if 0
+    /* FIXME: if this stuff is ever needed, move SPS/PPS from x264_t
+     * to the heap, to avoid excessive memcpy'ing with threads. */
     int i_slice_group_map_type;
     /* i_slice_group_map_type == 0 */
     int i_run_length[256];      /* FIXME */
@@ -122,6 +125,7 @@ typedef struct
     /* i_slice_group_map_type == 6 */
     int i_pic_size_in_map_units;
     int i_slice_group_id[256];  /* FIXME */
+#endif
 
     int i_num_ref_idx_l0_active;
     int i_num_ref_idx_l1_active;
index 4f94bad..cf0dd46 100644 (file)
@@ -290,6 +290,7 @@ void x264_pps_init( x264_pps_t *pps, int i_id, x264_param_t *param, x264_sps_t *
     pps->b_pic_order = 0;
     pps->i_num_slice_groups = 1;
 
+#if 0
     if( pps->i_num_slice_groups > 1 )
     {
         int i;
@@ -325,6 +326,7 @@ void x264_pps_init( x264_pps_t *pps, int i_id, x264_param_t *param, x264_sps_t *
             }
         }
     }
+#endif
     pps->i_num_ref_idx_l0_active = 1;
     pps->i_num_ref_idx_l1_active = 1;
 
@@ -351,6 +353,7 @@ void x264_pps_write( bs_t *s, x264_pps_t *pps )
     bs_write( s, 1, pps->b_pic_order );
     bs_write_ue( s, pps->i_num_slice_groups - 1 );
 
+#if 0
     if( pps->i_num_slice_groups > 1 )
     {
         int i;
@@ -389,6 +392,7 @@ void x264_pps_write( bs_t *s, x264_pps_t *pps )
             }
         }
     }
+#endif
 
     bs_write_ue( s, pps->i_num_ref_idx_l0_active - 1 );
     bs_write_ue( s, pps->i_num_ref_idx_l1_active - 1 );