mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 07:12:36 +07:00
Merge "Limit boundary PU sizes in case of errors" into lmp-dev am: f661b00835 am: 34ec365ad3 am: f7579e8bd4
am: 54ce382232
Change-Id: Ic01606b0ac69b17f2233c91e202d98179a511d52
This commit is contained in:
commit
e9683f3831
1 changed files with 13 additions and 2 deletions
|
|
@ -2708,6 +2708,17 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
{
|
||||
tu_t *ps_tu = ps_codec->s_parse.ps_tu;
|
||||
pu_t *ps_pu = ps_codec->s_parse.ps_pu;
|
||||
WORD32 pu_skip_wd, pu_skip_ht;
|
||||
WORD32 rows_remaining, cols_remaining;
|
||||
|
||||
/* Set pu wd and ht based on whether the ctb is complete or not */
|
||||
rows_remaining = ps_sps->i2_pic_height_in_luma_samples
|
||||
- (ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size);
|
||||
pu_skip_ht = MIN(ctb_size, rows_remaining);
|
||||
|
||||
cols_remaining = ps_sps->i2_pic_width_in_luma_samples
|
||||
- (ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size);
|
||||
pu_skip_wd = MIN(ctb_size, cols_remaining);
|
||||
|
||||
ps_tu->b1_cb_cbf = 0;
|
||||
ps_tu->b1_cr_cbf = 0;
|
||||
|
|
@ -2731,8 +2742,8 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
ps_pu->b2_part_idx = 0;
|
||||
ps_pu->b4_pos_x = 0;
|
||||
ps_pu->b4_pos_y = 0;
|
||||
ps_pu->b4_wd = (ctb_size >> 2) - 1;
|
||||
ps_pu->b4_ht = (ctb_size >> 2) - 1;
|
||||
ps_pu->b4_wd = (pu_skip_wd >> 2) - 1;
|
||||
ps_pu->b4_ht = (pu_skip_ht >> 2) - 1;
|
||||
ps_pu->b1_intra_flag = 0;
|
||||
ps_pu->b3_part_mode = ps_codec->s_parse.s_cu.i4_part_mode;
|
||||
ps_pu->b1_merge_flag = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue