mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 23:32:35 +07:00
Merge "Return error for negative crop parameters" into lmp-mr1-dev am: a96528e62e
am: 4852744932
Change-Id: I158447b65362d6603421b7503196e90d62fa7d14
This commit is contained in:
commit
1e8ce1e3fd
1 changed files with 4 additions and 4 deletions
|
|
@ -1283,28 +1283,28 @@ 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)
|
||||
if (value < 0 || 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)
|
||||
if (value < 0 || 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)
|
||||
if (value < 0 || 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)
|
||||
if (value < 0 || value >= ps_sps->i2_pic_height_in_luma_samples)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue