Commit 9663ae21 authored by Naveen Kumar Ponnusamy's avatar Naveen Kumar Ponnusamy Committed by Harish Mahendrakar
Browse files

Few bug fixes in loop filter

Removed few unused functions
Fixed an issue in 420P output in shared mdoe
Few bug fixes in handling loop filter corner cases in multi-tile multi-slice clips
Renamed few elements in mv_buf_t for consistency

Change-Id: I8d179b9ad3c7ee3ad27972ee02ea2658fd2c3c25
parent b0ddcd25
......@@ -199,7 +199,8 @@ inner_loop_16:
@ pld [r12, r2, lsl #1]
@ pld [r4, r2, lsl #1]
pld [r12, r2, lsl #2]
pld [r4, r2, lsl #2]
subs r10,r10,#16
......@@ -212,7 +213,6 @@ inner_loop_16:
pld [r12, r2, lsl #2]
vqrshrun.s16 d30,q15,#6
vld1.u32 {q0},[r12],r11 @vector load pu1_src
......@@ -232,7 +232,6 @@ inner_loop_16:
vld1.u32 {q3},[r12],r9 @vector load pu1_src
vmull.u8 q10,d11,d25 @mul_res = vmull_u8(src[0_3], coeffabs_3)@
pld [r4, r2, lsl #2]
vmlsl.u8 q10,d9,d24 @mul_res = vmlsl_u8(src[0_2], coeffabs_2)@
vst1.16 {q15}, [r1],r3
......
......@@ -342,6 +342,9 @@ inner_loop_16:
vld1.u32 {q9},[r4],r11
vmlal.u8 q5,d6,d27 @mul_res = vmull_u8(src[0_3], coeffabs_3)@
pld [r12, r2, lsl #2]
pld [r4, r2, lsl #2]
add r4,#8
vmlsl.u8 q5,d0,d24 @mul_res = vmlsl_u8(src[0_0], coeffabs_0)@
......@@ -373,10 +376,8 @@ inner_loop_16:
@ cmp r7, r0
vmlsl.u8 q11,d5,d26
pld [r12, r2, lsl #2]
vmlal.u8 q11,d13,d28
pld [r4, r2, lsl #2]
vmlal.u8 q11,d17,d30
@ mov r0, r7
......
......@@ -41,7 +41,7 @@
@*
@* @brief
@* intraprediction for mode 27 to 33 (positive angle, vertical mode ) with
@*.extern neighboring samples location pointed by 'pu1_ref' to the tu
@* neighboring samples location pointed by 'pu1_ref' to the tu
@* block location pointed by 'pu1_dst'
@*
@* @par description:
......
......@@ -98,7 +98,7 @@
.extern gai4_ihevc_ang_table
.extern gai4_ihevc_inv_ang_table
.extern col_for_intra_luma
.extern idx_11_17
.extern idx_neg_idx_11_17
gai4_ihevc_ang_table_addr:
.long gai4_ihevc_ang_table - ulbl1 - 8
......
......@@ -123,6 +123,7 @@ static INLINE UWORD32 CLZ(UWORD32 u4_word)
else
return 32;
}
static INLINE UWORD32 CTZ(UWORD32 u4_word)
{
if(0 == u4_word)
......@@ -136,6 +137,77 @@ static INLINE UWORD32 CTZ(UWORD32 u4_word)
}
/**
******************************************************************************
* @brief returns postion of msb bit for 32bit input
******************************************************************************
*/
#define GET_POS_MSB_32(r,word) \
{ \
if(word) \
{ \
r = 31 - __builtin_clz(word); \
} \
else \
{ \
r = -1; \
} \
}
/**
******************************************************************************
* @brief returns postion of msb bit for 64bit input
******************************************************************************
*/
#define GET_POS_MSB_64(r,word) \
{ \
if(word) \
{ \
r = 63 - __builtin_clzll(word); \
} \
else \
{ \
r = -1; \
} \
}
/**
******************************************************************************
* @brief returns max number of bits required to represent input word (max 32bits)
******************************************************************************
*/
#define GETRANGE(r,word) \
{ \
if(word) \
{ \
r = 32 - __builtin_clz(word); \
} \
else \
{ \
r = 1; \
} \
}
#if 0 /* Equivalent C code for GETRANGE */
#define GETRANGE(r,word) \
{ \
UWORD32 temp; \
r = 0; \
temp = (UWORD32)word; \
if(0 == word) \
r = 1; \
else \
{ \
while(temp) \
{ \
temp >>= 1; \
r++; \
} \
}\
}
#endif
#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = 0; nop_i < nop_cnt; nop_i++);}
......
......@@ -41,7 +41,7 @@
//*
//* @brief
//* intraprediction for mode 27 to 33 (positive angle, vertical mode ) with
//*.extern neighboring samples location pointed by 'pu1_ref' to the tu
//* neighboring samples location pointed by 'pu1_ref' to the tu
//* block location pointed by 'pu1_dst'
//*
//* @par description:
......
......@@ -98,7 +98,7 @@
.extern gai4_ihevc_ang_table
.extern gai4_ihevc_inv_ang_table
.extern col_for_intra_luma
.extern idx_11_17
.extern idx_neg_idx_11_17
.type ihevc_intra_pred_luma_mode_11_to_17_av8, %function
......
......@@ -453,15 +453,15 @@ const UWORD8 gau1_ihevc_chroma_qp_scale[58] =
45, 46, 47, 48, 49, 50, 51
};
// FOR HBD branch encoder ( 8 and 10 bit)
const WORD8 gai1_ihevc_chroma_qp_scale[70] = //EXTENDED for 10 bit
// FOR HBD branch encoder ( 8, 10 and 12 bit)
const WORD8 gai1_ihevc_chroma_qp_scale[82]= //EXTENDED for 12 bit
{
-12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 30, 31, 32,
33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51
-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,
-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,
17,18,19,20,21,22,23,24,25,26,27,28,29,29,30,31,32,
33,33,34,34,35,35,36,36,37,37,38,39,40,41,42,43,44,
45,46,47,48,49,50,51
};
......
......@@ -134,6 +134,8 @@ ihevc_deblk_luma_vert_ft ihevc_deblk_luma_vert;
ihevc_deblk_luma_horz_ft ihevc_deblk_luma_horz;
ihevc_deblk_chroma_vert_ft ihevc_deblk_chroma_vert;
ihevc_deblk_chroma_horz_ft ihevc_deblk_chroma_horz;
ihevc_deblk_chroma_vert_ft ihevc_deblk_422chroma_vert;
ihevc_deblk_chroma_horz_ft ihevc_deblk_422chroma_horz;
ihevc_deblk_luma_vert_ft ihevc_deblk_luma_vert_a9q;
ihevc_deblk_luma_horz_ft ihevc_deblk_luma_horz_a9q;
......@@ -154,16 +156,22 @@ ihevc_deblk_luma_vert_ft ihevc_deblk_luma_vert_ssse3;
ihevc_deblk_luma_horz_ft ihevc_deblk_luma_horz_ssse3;
ihevc_deblk_chroma_vert_ft ihevc_deblk_chroma_vert_ssse3;
ihevc_deblk_chroma_horz_ft ihevc_deblk_chroma_horz_ssse3;
ihevc_deblk_chroma_vert_ft ihevc_deblk_422chroma_vert_ssse3;
ihevc_deblk_chroma_horz_ft ihevc_deblk_422chroma_horz_ssse3;
ihevc_hbd_deblk_luma_vert_ft ihevc_hbd_deblk_luma_vert;
ihevc_hbd_deblk_luma_horz_ft ihevc_hbd_deblk_luma_horz;
ihevc_hbd_deblk_chroma_vert_ft ihevc_hbd_deblk_chroma_vert;
ihevc_hbd_deblk_chroma_horz_ft ihevc_hbd_deblk_chroma_horz;
ihevc_hbd_deblk_chroma_vert_ft ihevc_hbd_deblk_422chroma_vert;
ihevc_hbd_deblk_chroma_horz_ft ihevc_hbd_deblk_422chroma_horz;
ihevc_hbd_deblk_luma_vert_ft ihevc_hbd_deblk_luma_vert_sse42;
ihevc_hbd_deblk_luma_horz_ft ihevc_hbd_deblk_luma_horz_sse42;
ihevc_hbd_deblk_chroma_vert_ft ihevc_hbd_deblk_chroma_vert_sse42;
ihevc_hbd_deblk_chroma_horz_ft ihevc_hbd_deblk_chroma_horz_sse42;
ihevc_hbd_deblk_chroma_vert_ft ihevc_hbd_deblk_422chroma_vert_sse42;
ihevc_hbd_deblk_chroma_horz_ft ihevc_hbd_deblk_422chroma_horz_sse42;
ihevc_deblk_luma_vert_ft ihevc_deblk_luma_vert_av8;
ihevc_deblk_luma_horz_ft ihevc_deblk_luma_horz_av8;
......
This diff is collapsed.
......@@ -53,7 +53,7 @@
#ifndef ASSERT_EXIT
#define ASSERT(x) assert((x))
//#define ASSERT(x) ihevcd_debug_assert((x))
//#define ASSERT(x) ihevcd_debug_ASSERT((x))
#else
#define ASSERT(x) \
......
......@@ -404,6 +404,8 @@ enum
#define MAX_HEVC_QP_10bit 63 //FOR HBD Branch Encoder
#define MAX_HEVC_QP_12bit 75 //FOR HBD Branch Encoder
/**
* @brief Total number of transform sizes
......
......@@ -381,6 +381,23 @@ ihevc_inter_pred_w16out_ft ihevc_inter_pred_chroma_horz_w16out_avx2;
ihevc_inter_pred_w16out_ft ihevc_inter_pred_chroma_vert_w16out_avx2;
ihevc_inter_pred_w16inp_ft ihevc_inter_pred_chroma_vert_w16inp_avx2;
ihevc_inter_pred_w16inp_w16out_ft ihevc_inter_pred_chroma_vert_w16inp_w16out_avx2;
ihevc_hbd_inter_pred_ft ihevc_hbd_inter_pred_luma_copy_avx2;
ihevc_hbd_inter_pred_ft ihevc_hbd_inter_pred_luma_horz_avx2;
ihevc_hbd_inter_pred_ft ihevc_hbd_inter_pred_luma_vert_avx2;
ihevc_hbd_inter_pred_w16out_ft ihevc_hbd_inter_pred_luma_copy_w16out_avx2;
ihevc_hbd_inter_pred_w16out_ft ihevc_hbd_inter_pred_luma_horz_w16out_avx2;
ihevc_hbd_inter_pred_w16out_ft ihevc_hbd_inter_pred_luma_vert_w16out_avx2;
ihevc_hbd_inter_pred_w16inp_ft ihevc_hbd_inter_pred_luma_vert_w16inp_avx2;
ihevc_hbd_inter_pred_w16inp_w16out_ft ihevc_hbd_inter_pred_luma_vert_w16inp_w16out_avx2;
ihevc_hbd_inter_pred_ft ihevc_hbd_inter_pred_chroma_copy_avx2;
ihevc_hbd_inter_pred_ft ihevc_hbd_inter_pred_chroma_horz_avx2;
ihevc_hbd_inter_pred_ft ihevc_hbd_inter_pred_chroma_vert_avx2;
ihevc_hbd_inter_pred_w16out_ft ihevc_hbd_inter_pred_chroma_copy_w16out_avx2;
ihevc_hbd_inter_pred_w16out_ft ihevc_hbd_inter_pred_chroma_horz_w16out_avx2;
ihevc_hbd_inter_pred_w16out_ft ihevc_hbd_inter_pred_chroma_vert_w16out_avx2;
ihevc_hbd_inter_pred_w16inp_ft ihevc_hbd_inter_pred_chroma_vert_w16inp_avx2;
ihevc_hbd_inter_pred_w16inp_w16out_ft ihevc_hbd_inter_pred_chroma_vert_w16inp_w16out_avx2;
#endif
/* armv8 function declarations */
......
......@@ -37,7 +37,7 @@
#define RETURN_IF(cond, retval) if(cond) {return (retval);}
#define UNUSED(x) ((void)(x))
#define CLIP3(x, min, max) (((x) > max) ? max :(((x) < min)? min:(x)))
#define CLIP3(x, min, max) (((x) > (max)) ? (max) :(((x) < (min))? (min):(x)))
#define MAX(x,y) (((x) > (y)) ? (x) :(y))
#define MIN(x,y) (((x) < (y)) ? (x) :(y))
......
......@@ -465,7 +465,6 @@ typedef struct
* 4x4 Luma TUs only the fourth one contains cb,cr
* TODO: Check if this is really needed, cb_cbf and cr_cbf should be enough
*/
//UWORD32 b1_chroma_present : 1;
/**
* Y CBF
......@@ -477,6 +476,7 @@ typedef struct
*/
UWORD32 b1_cb_cbf : 1;
/**
* Cr CBF
*/
......@@ -514,7 +514,6 @@ typedef struct
*/
UWORD32 b3_chroma_intra_mode_idx : 3;
}tu_t;
/**
......@@ -1034,6 +1033,51 @@ typedef struct
*/
WORD8 i1_frame_only_constraint_flag;
/**
* general_max_12bit_constraint_flag
*/
WORD8 i1_general_max_12bit_constraint_flag;
/**
* general_max_10bit_constraint_flag
*/
WORD8 i1_general_max_10bit_constraint_flag;
/**
* general_max_8bit_constraint_flag
*/
WORD8 i1_general_max_8bit_constraint_flag;
/**
* general_max_422chroma_constraint_flag
*/
WORD8 i1_general_max_422chroma_constraint_flag;
/**
* general_max_420chroma_constraint_flag
*/
WORD8 i1_general_max_420chroma_constraint_flag;
/**
* general_max_monochrome_constraint_flag
*/
WORD8 i1_general_max_monochrome_constraint_flag;
/**
* general_intra_constraint_flag
*/
WORD8 i1_general_intra_constraint_flag;
/**
* general_one_picture_only_constraint_flag
*/
WORD8 i1_general_one_picture_only_constraint_flag;
/**
* general_lower_bit_rate_constraint_flag
*/
WORD8 i1_general_lower_bit_rate_constraint_flag;
/**
* level_idc
*/
......@@ -1124,6 +1168,7 @@ typedef struct
/** delta_chroma_log2_weight_denom */
WORD8 i1_chroma_log2_weight_denom;
/** luma_weight_l0_flag[ i ] */
WORD8 i1_luma_weight_l0_flag[MAX_DPB_SIZE];
......@@ -1191,6 +1236,10 @@ typedef struct
/* list_entry_l1[ i ] */
WORD8 i1_list_entry_l1[16];
/* Reference POC values for L0,L1 */
WORD32 i4_ref_poc_l0[16];
WORD32 i4_ref_poc_l1[16];
}rplm_t;
......@@ -1987,6 +2036,7 @@ typedef struct
/*************************************************************************/
WORD16 *pi2_scaling_mat;
/*
* Flag indicating if the SPS is parsed
*/
......@@ -2229,6 +2279,7 @@ typedef struct
*/
WORD8 i1_log2_min_cu_qp_delta_size;
/*
* Flag indicating if the PPS is parsed
*/
......@@ -2347,7 +2398,7 @@ typedef struct
/**
* Encoder buffer fullness used in buffering period SEI
*/
UWORD32 u4_ebf_sei;
UWORD32 u4_dbf_sei;
/**
* target bitrate used in buffering period SEI
......@@ -2510,7 +2561,7 @@ typedef struct
active_parameter_set_sei_param_t s_active_parameter_set_sei_params;
}sei_params_t;
} sei_params_t;
......@@ -2788,6 +2839,7 @@ typedef struct
*/
WORD16 i2_independent_ctb_y;
UWORD8 u1_parse_data_init_done;
/**
......
......@@ -91,6 +91,57 @@ static INLINE UWORD32 CTZ(UWORD32 u4_word)
}
}
/**
******************************************************************************
* @brief returns postion of msb bit for 32bit input
******************************************************************************
*/
#define GET_POS_MSB_32(r,word) \
{ \
if(word) \
{ \
r = 31 - __builtin_clz(word); \
} \
else \
{ \
r = -1; \
} \
}
/**
******************************************************************************
* @brief returns postion of msb bit for 64bit input
******************************************************************************
*/
#define GET_POS_MSB_64(r,word) \
{ \
if(word) \
{ \
r = 63 - __builtin_clzll(word); \
} \
else \
{ \
r = -1; \
} \
}
/**
******************************************************************************
* @brief returns max number of bits required to represent input word (max 32bits)
******************************************************************************
*/
#define GETRANGE(r,word) \
{ \
if(word) \
{ \
r = 32 - __builtin_clz(word); \
} \
else \
{ \
r = 1; \
} \
}
#define GCC_ENABLE 1
#if GCC_ENABLE
......
......@@ -3,7 +3,7 @@ libhevcd_inc_dir_arm += $(LOCAL_PATH)/common/arm
libhevcd_srcs_c_arm += decoder/arm/ihevcd_function_selector.c
libhevcd_srcs_c_arm += decoder/arm/ihevcd_function_selector_noneon.c
libhevcd_cflags_arm += -DDISABLE_NEONINTR -DARM -DARMGCC
libhevcd_cflags_arm += -DDISABLE_NEONINTR -DARM -DARMGCC -fno-tree-vectorize
LOCAL_ARM_MODE := arm
......
......@@ -1523,6 +1523,8 @@ WORD32 ihevcd_init(codec_t *ps_codec)
ps_codec->s_parse.i4_first_pic_init = 0;
ps_codec->i4_error_code = 0;
ps_codec->i4_reset_flag = 0;
ps_codec->i4_cra_as_first_pic = 1;
ps_codec->i4_rasl_output_flag = 0;
ps_codec->i4_prev_poc_msb = 0;
ps_codec->i4_prev_poc_lsb = -1;
......@@ -1550,6 +1552,7 @@ WORD32 ihevcd_init(codec_t *ps_codec)
ps_codec->i4_disable_sao_pic = 0;
ps_codec->i4_fullpel_inter_pred = 0;
ps_codec->u4_enable_fmt_conv_ahead = 0;
ps_codec->i4_share_disp_buf_cnt = 0;
{
sps_t *ps_sps = ps_codec->ps_sps_base;
......@@ -1925,9 +1928,9 @@ WORD32 ihevcd_fill_num_mem_rec(void *pv_api_ip, void *pv_api_op)
*
* One extra MV Bank is needed to hold current pics MV bank.
* Since this is only a structure allocation and not actual buffer allocation,
* it is allocated for BUF_MGR_MAX_CNT entries
* it is allocated for (MAX_DPB_SIZE + 1) entries
*/
ps_mem_rec->u4_mem_size += BUF_MGR_MAX_CNT * sizeof(mv_buf_t);
ps_mem_rec->u4_mem_size += (MAX_DPB_SIZE + 1) * sizeof(mv_buf_t);
{
/* Allocate for pu_map, pu_t and pic_pu_idx for each MV bank */
......@@ -2333,9 +2336,27 @@ WORD32 ihevcd_fill_num_mem_rec(void *pv_api_ip, void *pv_api_op)
ps_mem_rec->u4_mem_size += BUF_MGR_MAX_CNT * sizeof(pic_buf_t);
/* In case of non-shared mode allocate for reference picture buffers */
if(0 == share_disp_buf)
/* In case of shared and 420p output, allocate for chroma samples */
if((0 == share_disp_buf) || (chroma_format == IV_YUV_420P))
{
UWORD32 num_reorder_frames_local = num_reorder_frames;
UWORD32 init_num_bufs;
UWORD32 init_extra_bufs;
WORD32 chroma_only;
chroma_only = 0;
init_extra_bufs = 0;
init_num_bufs = num_reorder_frames + num_ref_frames + 1;
/* In case of shared display buffers and chroma format 420P
* Allocate for chroma in reference buffers, luma buffer will be display buffer
*/
if((1 == share_disp_buf) && (chroma_format == IV_YUV_420P))
{
chroma_only = 1;
init_extra_bufs = num_extra_disp_bufs;
}
/* Note: Number of luma samples is not max_wd * max_ht here, instead it is
* set to maximum number of luma samples allowed at the given level.
* This is done to ensure that any stream with width and height lesser
......@@ -2350,7 +2371,7 @@ WORD32 ihevcd_fill_num_mem_rec(void *pv_api_ip, void *pv_api_op)
*/
ps_mem_rec->u4_mem_size +=
ihevcd_get_total_pic_buf_size(max_wd_luma * max_ht_luma, level, PAD_WD, PAD_HT,
num_ref_frames, num_reorder_frames_local);
init_num_bufs, init_extra_bufs, chroma_only);
}
DEBUG("\nMemory record Id %d = %d \n", MEM_REC_REF_PIC,
ps_mem_rec->u4_mem_size);
......@@ -2960,7 +2981,8 @@ WORD32 ihevcd_init_mem_rec(iv_obj_t *ps_codec_obj,
ps_codec->pv_pic_buf_mgr = ps_mem_rec->pv_base;
ps_codec->pv_pic_buf_base = (UWORD8 *)ps_codec->pv_pic_buf_mgr + sizeof(buf_mgr_t);
ps_codec->i4_total_pic_buf_size = ps_mem_rec->u4_mem_size - sizeof(buf_mgr_t);
ps_codec->pu1_cur_chroma_ref_buf = (UWORD8 *)ps_codec->pv_pic_buf_base + BUF_MGR_MAX_CNT * sizeof(pic_buf_t);
ps_codec->i4_remaining_pic_buf_size = ps_codec->i4_total_pic_buf_size - BUF_MGR_MAX_CNT * sizeof(pic_buf_t);
......@@ -3146,7 +3168,25 @@ WORD32 ihevcd_set_display_frame(iv_obj_t *ps_codec_obj,
pu1_buf = ps_dec_disp_ip->s_disp_buffer[i].pu1_bufs[0];
ps_pic_buf->pu1_luma = pu1_buf + strd * PAD_TOP + PAD_LEFT;
pu1_buf = ps_dec_disp_ip->s_disp_buffer[i].pu1_bufs[1];
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
{
pu1_buf = ps_codec->pu1_cur_chroma_ref_buf;
ps_codec->pu1_cur_chroma_ref_buf += strd * (ps_codec->i4_ht / 2 + PAD_HT / 2);
ps_codec->i4_remaining_pic_buf_size -= strd * (ps_codec->i4_ht / 2 + PAD_HT / 2);
if(0 > ps_codec->i4_remaining_pic_buf_size)
{
ps_codec->i4_error_code = IHEVCD_BUF_MGR_ERROR;
return IHEVCD_BUF_MGR_ERROR;
}
}
else
{
/* For YUV 420SP case use display buffer itself as chroma ref buffer */
pu1_buf = ps_dec_disp_ip->s_disp_buffer[i].pu1_bufs[1];
}
ps_pic_buf->pu1_chroma = pu1_buf + strd * (PAD_TOP / 2) + PAD_LEFT;
buf_ret = ihevc_buf_mgr_add((buf_mgr_t *)ps_codec->pv_pic_buf_mgr, ps_pic_buf, i);
......@@ -3166,6 +3206,13 @@ WORD32 ihevcd_set_display_frame(iv_obj_t *ps_codec_obj,
ps_pic_buf++;
/* Store display buffers in codec context. Needed for 420p output */
memcpy(&ps_codec->s_disp_buffer[ps_codec->i4_share_disp_buf_cnt],
&ps_dec_disp_ip->s_disp_buffer[i],
sizeof(ps_dec_disp_ip->s_disp_buffer[i]));
ps_codec->i4_share_disp_buf_cnt++;
}
}
......@@ -3658,8 +3705,7 @@ WORD32 ihevcd_set_params(iv_obj_t *ps_codec_obj,
{
strd = s_ctl_dynparams_ip->u4_disp_wd;
}
else if(0 == ps_codec->i4_sps_done ||
0 == ps_codec->i4_pps_done)
else if(0 == ps_codec->i4_sps_done)
{
strd = s_ctl_dynparams_ip->u4_disp_wd;
}
......
......@@ -386,8 +386,9 @@ WORD32 ihevcd_ctb_boundary_strength_islice(bs_ctxt_t *ps_bs_ctxt)
/*If the 1st slice in a new tile is a dependent slice*/
if(!((ps_bs_ctxt->ps_slice_hdr->i1_dependent_slice_flag == 1) && (slice_idx == left_slice_idx)))
{
/* Removed reduntant checks */
if((0 == i1_loop_filter_across_slices_enabled_flag && (
(0 == ps_bs_ctxt->i4_ctb_slice_x && 0 == ps_bs_ctxt->i4_ctb_slice_y) || (0 == ps_bs_ctxt->i4_ctb_slice_x && 0 == ps_bs_ctxt->i4_ctb_tile_x) ||
((slice_idx != left_slice_idx) && 0 == ps_bs_ctxt->i4_ctb_slice_y) ||
((0 == ps_bs_ctxt->i4_ctb_tile_x) && (slice_idx != left_slice_idx)))) ||
(0 == ps_bs_ctxt->i4_ctb_x))
{
......@@ -406,8 +407,9 @@ WORD32 ihevcd_ctb_boundary_strength_islice(bs_ctxt_t *ps_bs_ctxt)
}
/* If top neighbor is not available, then set BS for entire first row to zero */
/* Removed reduntant checks */
if((0 == i1_loop_filter_across_tiles_enabled_flag && 0 == ps_bs_ctxt->i4_ctb_tile_y)
|| (0 == i1_loop_filter_across_slices_enabled_flag && ((0 == ps_bs_ctxt->i4_ctb_slice_y) || (slice_idx != top_slice_idx)))
|| (0 == i1_loop_filter_across_slices_enabled_flag && ((slice_idx != top_slice_idx)))
|| (0 == ps_bs_ctxt->i4_ctb_y))
{
pu4_horz_bs[0] &= (64 == ctb_size) ? 0 : ((UWORD32)0xFFFFFFFF) << (ctb_size / 2);
......@@ -941,9 +943,10 @@ WORD32 ihevcd_ctb_boundary_strength_pbslice(bs_ctxt_t *ps_bs_ctxt)
if(!((ps_bs_ctxt->ps_slice_hdr->i1_dependent_slice_flag == 1) && (slice_idx == left_slice_idx)))
{
/* Removed reduntant checks */
if((0 == i1_loop_filter_across_slices_enabled_flag && (
(0 == ps_bs_ctxt->i4_ctb_slice_x && 0 == ps_bs_ctxt->i4_ctb_slice_y) || (0 == ps_bs_ctxt->i4_ctb_slice_x && 0 == ps_bs_ctxt->i4_ctb_tile_x)
|| ((0 == ps_bs_ctxt->i4_ctb_tile_x) && (slice_idx != left_slice_idx)))) || (0 == ps_bs_ctxt->i4_ctb_x))
(0 == ps_bs_ctxt->i4_ctb_slice_x && 0 == ps_bs_ctxt->i4_ctb_slice_y) ||
((0 == ps_bs_ctxt->i4_ctb_tile_x) && (slice_idx != left_slice_idx)))) || (0 == ps_bs_ctxt->i4_ctb_x))
{
pu4_vert_bs[0] &= (64 == ctb_size) ? 0 : ((UWORD32)0xFFFFFFFF) << (ctb_size / 2);
}
......@@ -959,8 +962,9 @@ WORD32 ihevcd_ctb_boundary_strength_pbslice(bs_ctxt_t *ps_bs_ctxt)
top_slice_idx = ps_bs_ctxt->pu1_slice_idx[ctb_addr];
}
/* If top neighbor is not available, then set BS for entire first row to zero */
/* Removed reduntant checks */
if((0 == i1_loop_filter_across_tiles_enabled_flag && 0 == ps_bs_ctxt->i4_ctb_tile_y)
|| (0 == i1_loop_filter_across_slices_enabled_flag && ((0 == ps_bs_ctxt->i4_ctb_slice_y) || (slice_idx != top_slice_idx)))
|| (0 == i1_loop_filter_across_slices_enabled_flag && ((slice_idx != top_slice_idx)))
|| (0 == ps_bs_ctxt->i4_ctb_y))
{
pu4_horz_bs[0] &= (64 == ctb_size) ? 0 : ((UWORD32)0xFFFFFFFF) << (ctb_size / 2);
......
......@@ -38,7 +38,7 @@
#include "ihevcd_common_tables.h"
#include "ihevc_defs.h"
WORD16 gai2_ihevcd_chroma_qp[] =
const WORD16 gai2_ihevcd_chroma_qp[] =
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29,
30, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment