mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-10-07 19:11:35 +07:00
Align pic_width_in_luma_samples and pic_width_in_luma_samples to 8
Spec mandates these to be multiples of min_cb_size.
Bug fix: 22278703
Change-Id: I17f0c2242519a9277598b8fb5b05717e1ce7469b
(cherry picked from commit dde3d8a3c7)
This commit is contained in:
parent
a90d9a9192
commit
2b67e53265
1 changed files with 6 additions and 0 deletions
|
|
@ -1257,6 +1257,12 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
if((0 >= ps_sps->i2_pic_width_in_luma_samples) || (0 >= ps_sps->i2_pic_height_in_luma_samples))
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
|
||||
/* i2_pic_width_in_luma_samples and i2_pic_height_in_luma_samples
|
||||
should be multiples of min_cb_size. Here these are aligned to 8,
|
||||
i.e. smallest CB size */
|
||||
ps_sps->i2_pic_width_in_luma_samples = ALIGN8(ps_sps->i2_pic_width_in_luma_samples);
|
||||
ps_sps->i2_pic_height_in_luma_samples = ALIGN8(ps_sps->i2_pic_height_in_luma_samples);
|
||||
|
||||
if((ps_sps->i2_pic_width_in_luma_samples > ps_codec->i4_max_wd) ||
|
||||
(ps_sps->i2_pic_width_in_luma_samples * ps_sps->i2_pic_height_in_luma_samples >
|
||||
ps_codec->i4_max_wd * ps_codec->i4_max_ht) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue