Check if luma wd and ht are multiple of min cb size
Bug: 65483665
Instead of aligning width and height to 8, it is now
checked for being a multiple of min CB size
Change-Id: I99bf60e19d490fd06933aa01fa6a34f47fe58bb4
(cherry picked from commit ccfd1ea5c4cf9cf0a55088506ae5f312663f8792)
diff --git a/decoder/ihevcd_parse_headers.c b/decoder/ihevcd_parse_headers.c
index 578a429..a8daa3c 100644
--- a/decoder/ihevcd_parse_headers.c
+++ b/decoder/ihevcd_parse_headers.c
@@ -1350,12 +1350,6 @@
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);
-
BITS_PARSE("pic_cropping_flag", value, ps_bitstrm, 1);
ps_sps->i1_pic_cropping_flag = value;
@@ -1496,7 +1490,9 @@
(ps_sps->i1_log2_diff_max_min_transform_block_size < 0) ||
(ps_sps->i1_log2_max_transform_block_size > ps_sps->i1_log2_ctb_size) ||
(ps_sps->i1_log2_ctb_size < 4) ||
- (ps_sps->i1_log2_ctb_size > 6))
+ (ps_sps->i1_log2_ctb_size > 6) ||
+ (ps_sps->i2_pic_width_in_luma_samples % (1 << ps_sps->i1_log2_min_coding_block_size) != 0) ||
+ (ps_sps->i2_pic_height_in_luma_samples % (1 << ps_sps->i1_log2_min_coding_block_size) != 0))
{
return IHEVCD_INVALID_PARAMETER;
}