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
Change-Id: I5d95d3aeebc111d2268988c644c7dc6b6cd26f4a
This commit is contained in:
commit
4852744932
1 changed files with 4 additions and 4 deletions
|
|
@ -1293,28 +1293,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