mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-17 22:36:15 +07:00
Merge "Return error for negative crop parameters" into lmp-mr1-dev am: a96528e62e am: 4852744932 am: 1e8ce1e3fd am: b0fc6be6a2 am: 1b261917c5 am: a6c6fdf878 am: bd43385f77
am: ed89be013b
Change-Id: Id49fa63c55b65845a2409abf57ff26b25435adc8
This commit is contained in:
commit
ba0fd2ca16
1 changed files with 4 additions and 4 deletions
|
|
@ -1285,28 +1285,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