Commit 596b67eb authored by Zhao Zhili's avatar Zhao Zhili Committed by François Cartegnie

packetizer: hevc_nal: fix visiable size

Signed-off-by: François Cartegnie's avatarFrancois Cartegnie <fcvlcdev@free.fr>
parent 6b00be9e
......@@ -1068,8 +1068,26 @@ bool hevc_get_picture_size( const hevc_sequence_parameter_set_t *p_sps,
*p_h = *p_vh = p_sps->pic_height_in_luma_samples;
if( p_sps->conformance_window_flag )
{
*p_vh -= p_sps->conf_win.bottom_offset + p_sps->conf_win.top_offset;
*p_vw -= p_sps->conf_win.left_offset + p_sps->conf_win.right_offset;
unsigned sub_width_c, sub_height_c;
if( p_sps->chroma_format_idc == 1 )
{
sub_width_c = 2;
sub_height_c = 2;
}
else if( p_sps->chroma_format_idc == 2 )
{
sub_width_c = 2;
sub_height_c = 1;
}
else
{
sub_width_c = 1;
sub_height_c = 1;
}
*p_vh -= (p_sps->conf_win.bottom_offset + p_sps->conf_win.top_offset) * sub_height_c;
*p_vw -= (p_sps->conf_win.left_offset + p_sps->conf_win.right_offset) * sub_width_c;
}
return true;
}
......
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