From: Loren Merritt Date: Sat, 4 Jun 2005 06:23:56 +0000 (+0000) Subject: remove unused tables from SPS/PPS. reduces overhead when syncing threads. X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=398a6bf064d7ce46b0cb0edc66323473009d5e06;p=x264.git remove unused tables from SPS/PPS. reduces overhead when syncing threads. git-svn-id: svn://svn.videolan.org/x264/trunk@248 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/common.h b/common/common.h index 0cd53ae1..790bf747 100644 --- a/common/common.h +++ b/common/common.h @@ -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; diff --git a/common/set.h b/common/set.h index 3893bf64..891d2ec1 100644 --- a/common/set.h +++ b/common/set.h @@ -27,10 +27,10 @@ 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; diff --git a/encoder/set.c b/encoder/set.c index 4f94bad9..cf0dd461 100644 --- a/encoder/set.c +++ b/encoder/set.c @@ -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 );