From 62b661a4a1f569f79f07dc81634a9371a8887c28 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Tue, 18 Jan 2011 12:31:26 -0800 Subject: [PATCH] More correctly write frame-packing SEI flags Bug reported by Nero. --- encoder/set.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/encoder/set.c b/encoder/set.c index eb1aa71a..60824010 100644 --- a/encoder/set.c +++ b/encoder/set.c @@ -654,12 +654,10 @@ void x264_sei_frame_packing_write( x264_t *h, bs_t *s ) // 0: views are unrelated, 1: left view is on the left, 2: left view is on the right bs_write ( &q, 6, 1 ); // content_interpretation_type - /* The following flags shall be set to 0 and ignored by the decoder - * (Why, then, do they even exist? Who knows.) */ bs_write1( &q, 0 ); // spatial_flipping_flag bs_write1( &q, 0 ); // frame0_flipped_flag bs_write1( &q, 0 ); // field_views_flag - bs_write1( &q, 0 ); // current_frame_is_frame0_flag + bs_write1( &q, h->param.i_frame_packing == 5 && !(h->fenc->i_frame&1) ); // current_frame_is_frame0_flag bs_write1( &q, 0 ); // frame0_self_contained_flag bs_write1( &q, 0 ); // frame1_self_contained_flag if ( /* quincunx_sampling_flag == 0 && */ h->param.i_frame_packing != 5 ) @@ -670,7 +668,7 @@ void x264_sei_frame_packing_write( x264_t *h, bs_t *s ) bs_write( &q, 4, 0 ); // frame1_grid_position_y } bs_write( &q, 8, 0 ); // frame_packing_arrangement_reserved_byte - bs_write_ue( &q, 0 ); // frame_packing_arrangement_repetition_period + bs_write_ue( &q, 1 ); // frame_packing_arrangement_repetition_period bs_write1( &q, 0 ); // frame_packing_arrangement_extension_flag bs_align_10( &q ); -- 2.47.3