[vlc-commits] packetizer: h264: use bottom_field flag
Francois Cartegnie
git at videolan.org
Mon Mar 20 14:17:07 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Mar 20 14:14:33 2017 +0100| [a547f0dd3fc834a0ef8c4c3a8695f76338ecc8b0] | committer: Francois Cartegnie
packetizer: h264: use bottom_field flag
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a547f0dd3fc834a0ef8c4c3a8695f76338ecc8b0
---
modules/packetizer/h264.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index aa5b17a..49046d7 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -110,7 +110,6 @@ struct decoder_sys_t
h264_slice_t slice;
/* */
- bool b_even_frame;
bool b_discontinuity;
/* POC */
@@ -318,7 +317,6 @@ static int Open( vlc_object_t *p_this )
h264_slice_init( &p_sys->slice );
- p_sys->b_even_frame = false;
p_sys->b_discontinuity = false;
p_sys->i_frame_dts = VLC_TS_INVALID;
p_sys->i_frame_pts = VLC_TS_INVALID;
@@ -500,7 +498,6 @@ static void PacketizeReset( void *p_private, bool b_broken )
p_sys->p_active_sps = NULL;
p_sys->i_frame_pts = VLC_TS_INVALID;
p_sys->i_frame_dts = VLC_TS_INVALID;
- p_sys->b_even_frame = false;
p_sys->slice.type = H264_SLICE_TYPE_UNKNOWN;
p_sys->b_slice = false;
/* POC */
@@ -776,21 +773,15 @@ static block_t *OutputPicture( decoder_t *p_dec )
/* Top and Bottom field slices */
case 1:
case 2:
- if( !p_sys->b_even_frame )
- {
- p_pic->i_flags |= (p_sys->i_pic_struct == 1) ? BLOCK_FLAG_TOP_FIELD_FIRST
- : BLOCK_FLAG_BOTTOM_FIELD_FIRST;
- }
- p_sys->b_even_frame = !p_sys->b_even_frame;
+ p_pic->i_flags |= (!p_sys->slice.i_bottom_field_flag) ? BLOCK_FLAG_TOP_FIELD_FIRST
+ : BLOCK_FLAG_BOTTOM_FIELD_FIRST;
break;
/* Each of the following slices contains multiple fields */
case 3:
p_pic->i_flags |= BLOCK_FLAG_TOP_FIELD_FIRST;
- p_sys->b_even_frame = false;
break;
case 4:
p_pic->i_flags |= BLOCK_FLAG_BOTTOM_FIELD_FIRST;
- p_sys->b_even_frame = false;
break;
case 5:
p_pic->i_flags |= BLOCK_FLAG_TOP_FIELD_FIRST;
@@ -799,7 +790,6 @@ static block_t *OutputPicture( decoder_t *p_dec )
p_pic->i_flags |= BLOCK_FLAG_BOTTOM_FIELD_FIRST;
break;
default:
- p_sys->b_even_frame = false;
break;
}
}
More information about the vlc-commits
mailing list