mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 23:32:35 +07:00
Return error for invalid crop parameters am: e8c26c16d7
am: 870c70383d
Change-Id: I1cb3a32e38974700f16695775aac3e5141ade4db
This commit is contained in:
commit
6850014493
1 changed files with 16 additions and 0 deletions
|
|
@ -1286,15 +1286,31 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
{
|
||||
|
||||
UEV_PARSE("pic_crop_left_offset", value, ps_bitstrm);
|
||||
if (value >= ps_sps->i2_pic_width_in_luma_samples)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_sps->i2_pic_crop_left_offset = value;
|
||||
|
||||
UEV_PARSE("pic_crop_right_offset", value, ps_bitstrm);
|
||||
if (value >= ps_sps->i2_pic_width_in_luma_samples)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_sps->i2_pic_crop_right_offset = value;
|
||||
|
||||
UEV_PARSE("pic_crop_top_offset", value, ps_bitstrm);
|
||||
if (value >= ps_sps->i2_pic_height_in_luma_samples)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_sps->i2_pic_crop_top_offset = value;
|
||||
|
||||
UEV_PARSE("pic_crop_bottom_offset", value, ps_bitstrm);
|
||||
if (value >= ps_sps->i2_pic_height_in_luma_samples)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_sps->i2_pic_crop_bottom_offset = value;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue