[x264-devel] commit: Various cosmetics (Jason Garrett-Glaser )
git at videolan.org
git at videolan.org
Tue Sep 28 04:56:02 CEST 2010
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Mon Sep 27 05:39:02 2010 -0700| [70b4714d37ac8b9f413b6aed834e4fa4a8fc39ab] | committer: Jason Garrett-Glaser
Various cosmetics
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=70b4714d37ac8b9f413b6aed834e4fa4a8fc39ab
---
encoder/encoder.c | 12 ++++++------
encoder/set.c | 17 ++---------------
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 6700d15..5e1f59e 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -2943,12 +2943,12 @@ static int x264_encoder_frame_end( x264_t *h, x264_t *thread_current,
/* Remove duplicates, must be done near the end as breaks h->fref0 array
* by freeing some of its pointers. */
- for( int i = 0; i < h->i_ref0; i++ )
- if( h->fref0[i] && h->fref0[i]->b_duplicate )
- {
- x264_frame_push_blank_unused( h, h->fref0[i] );
- h->fref0[i] = 0;
- }
+ for( int i = 0; i < h->i_ref0; i++ )
+ if( h->fref0[i] && h->fref0[i]->b_duplicate )
+ {
+ x264_frame_push_blank_unused( h, h->fref0[i] );
+ h->fref0[i] = 0;
+ }
if( h->param.psz_dump_yuv )
x264_frame_dump( h );
diff --git a/encoder/set.c b/encoder/set.c
index b0d2149..a003012 100644
--- a/encoder/set.c
+++ b/encoder/set.c
@@ -294,34 +294,21 @@ void x264_sps_write( bs_t *s, x264_sps_t *sps )
}
else if( sps->i_poc_type == 1 )
{
- int i;
-
bs_write( s, 1, sps->b_delta_pic_order_always_zero );
bs_write_se( s, sps->i_offset_for_non_ref_pic );
bs_write_se( s, sps->i_offset_for_top_to_bottom_field );
bs_write_ue( s, sps->i_num_ref_frames_in_poc_cycle );
- for( i = 0; i < sps->i_num_ref_frames_in_poc_cycle; i++ )
- {
+ for( int i = 0; i < sps->i_num_ref_frames_in_poc_cycle; i++ )
bs_write_se( s, sps->i_offset_for_ref_frame[i] );
- }
}
bs_write_ue( s, sps->i_num_ref_frames );
bs_write( s, 1, sps->b_gaps_in_frame_num_value_allowed );
bs_write_ue( s, sps->i_mb_width - 1 );
- if (sps->b_frame_mbs_only)
- {
- bs_write_ue( s, sps->i_mb_height - 1);
- }
- else // interlaced
- {
- bs_write_ue( s, sps->i_mb_height/2 - 1);
- }
+ bs_write_ue( s, (sps->i_mb_height >> !sps->b_frame_mbs_only) - 1);
bs_write( s, 1, sps->b_frame_mbs_only );
if( !sps->b_frame_mbs_only )
- {
bs_write( s, 1, sps->b_mb_adaptive_frame_field );
- }
bs_write( s, 1, sps->b_direct8x8_inference );
bs_write( s, 1, sps->b_crop );
More information about the x264-devel
mailing list