Commit 398a6bf0 authored by Loren Merritt's avatar Loren Merritt

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
parent 17296166
...@@ -233,9 +233,9 @@ struct x264_t ...@@ -233,9 +233,9 @@ struct x264_t
int i_nal_ref_idc; /* threads only */ int i_nal_ref_idc; /* threads only */
/* We use only one SPS and one PPS */ /* 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_sps_t *sps;
x264_pps_t pps_array[256]; x264_pps_t pps_array[1];
x264_pps_t *pps; x264_pps_t *pps;
int i_idr_pic_id; int i_idr_pic_id;
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
enum profile_e enum profile_e
{ {
PROFILE_BASELINE = 66, PROFILE_BASELINE = 66,
PROFILE_MAIN = 77, PROFILE_MAIN = 77,
PROFILE_EXTENTED = 88, PROFILE_EXTENTED = 88,
PROFILE_HIGH = 100, PROFILE_HIGH = 100,
PROFILE_HIGH10 = 110, PROFILE_HIGH10 = 110,
PROFILE_HIGH422 = 122, PROFILE_HIGH422 = 122,
PROFILE_HIGH444 = 144 PROFILE_HIGH444 = 144
}; };
...@@ -110,6 +110,9 @@ typedef struct ...@@ -110,6 +110,9 @@ typedef struct
int b_pic_order; int b_pic_order;
int i_num_slice_groups; 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; int i_slice_group_map_type;
/* i_slice_group_map_type == 0 */ /* i_slice_group_map_type == 0 */
int i_run_length[256]; /* FIXME */ int i_run_length[256]; /* FIXME */
...@@ -122,6 +125,7 @@ typedef struct ...@@ -122,6 +125,7 @@ typedef struct
/* i_slice_group_map_type == 6 */ /* i_slice_group_map_type == 6 */
int i_pic_size_in_map_units; int i_pic_size_in_map_units;
int i_slice_group_id[256]; /* FIXME */ int i_slice_group_id[256]; /* FIXME */
#endif
int i_num_ref_idx_l0_active; int i_num_ref_idx_l0_active;
int i_num_ref_idx_l1_active; int i_num_ref_idx_l1_active;
......
...@@ -290,6 +290,7 @@ void x264_pps_init( x264_pps_t *pps, int i_id, x264_param_t *param, x264_sps_t * ...@@ -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->b_pic_order = 0;
pps->i_num_slice_groups = 1; pps->i_num_slice_groups = 1;
#if 0
if( pps->i_num_slice_groups > 1 ) if( pps->i_num_slice_groups > 1 )
{ {
int i; int i;
...@@ -325,6 +326,7 @@ void x264_pps_init( x264_pps_t *pps, int i_id, x264_param_t *param, x264_sps_t * ...@@ -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_l0_active = 1;
pps->i_num_ref_idx_l1_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 ) ...@@ -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( s, 1, pps->b_pic_order );
bs_write_ue( s, pps->i_num_slice_groups - 1 ); bs_write_ue( s, pps->i_num_slice_groups - 1 );
#if 0
if( pps->i_num_slice_groups > 1 ) if( pps->i_num_slice_groups > 1 )
{ {
int i; int i;
...@@ -389,6 +392,7 @@ void x264_pps_write( bs_t *s, x264_pps_t *pps ) ...@@ -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_l0_active - 1 );
bs_write_ue( s, pps->i_num_ref_idx_l1_active - 1 ); bs_write_ue( s, pps->i_num_ref_idx_l1_active - 1 );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment