Rename few local variables for consistency
Some checks failed
CMake / build (cmake, aarch64-linux-gnu-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake, aarch64-linux-gnu-g++, ubuntu-latest-cross-aarch64-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, arm-linux-gnueabihf-gcc, -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake, arm-linux-gnueabihf-g++, ubuntu-latest-cross-aarch32-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, macos-latest-clang-cmake, macos-latest) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-24.04-arm-clang-cmake, ubuntu-24.04-arm) (push) Has been cancelled
CMake / build (cmake, clang, , clang++, ubuntu-latest-clang-cmake, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -DSANITIZE=fuzzer-no-link,address, clang++, ubuntu-latest-clang-cmake-asan-fuzzer, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, clang, -G Ninja, clang++, ubuntu-latest-clang-cmake-ninja, ubuntu-latest) (push) Has been cancelled
CMake / build (cmake, gcc, , g++, ubuntu-latest-gcc-cmake, ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Harish Mahendrakar 2026-09-04 14:13:52 -07:00 • committed by Harish Mahendrakar
parent 33f2a8b540
commit eb6a4dd780
6 changed files with 176 additions and 176 deletions

View file

@ -1756,7 +1756,7 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
void *pv_buf;
UWORD8 *pu1_buf;
WORD32 size;
WORD32 i4_pixel_size = ps_codec->i4_pixel_size_y;
WORD32 pixel_size = ps_codec->i4_pixel_size_y;
/* Free any dynamic buffers that are allocated earlier. As ps_codec is memset to zero */
/* at the beginning, it is safe to call this even if no memory was allocated earlier */
@ -2203,7 +2203,7 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
ps_codec->as_process[i].pu1_tile_idx = (UWORD16 *)pv_buf + wd / MIN_CTB_SIZE /* Offset 1 row */;
}
if (sizeof(UWORD8) == i4_pixel_size)
if (sizeof(UWORD8) == pixel_size)
{
/* 4 bytes per color component per CTB */
size = 3 * 4;
@ -2237,15 +2237,15 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
{
size = wd * ht * 3 * i4_pixel_size;
size = wd * ht * 3 * pixel_size;
}
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
{
size = wd * ht * 2 * i4_pixel_size;
size = wd * ht * 2 * pixel_size;
}
else
{
size = wd * ht * i4_pixel_size;
size = wd * ht * pixel_size;
}
if(size > MIN_BITSBUF_SIZE)
@ -2767,7 +2767,7 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
codec_t *ps_codec;
WORD32 wd, ht;
WORD32 aligned_wd, aligned_ht;
WORD32 i4_pixel_size_y, i4_pixel_size_uv;
WORD32 pixel_size_y, pixel_size_uv;
ivd_ctl_getstatus_op_t *ps_ctl_op = (ivd_ctl_getstatus_op_t *)pv_api_op;
UNUSED(pv_api_ip);
@ -2803,8 +2803,8 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
if(ps_codec->i4_sps_done)
{
i4_pixel_size_y = ps_codec->i4_pixel_size_y;
i4_pixel_size_uv = ps_codec->i4_pixel_size_uv;
pixel_size_y = ps_codec->i4_pixel_size_y;
pixel_size_uv = ps_codec->i4_pixel_size_uv;
if(0 == ps_codec->i4_share_disp_buf)
{
@ -2820,8 +2820,8 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
}
else
{
i4_pixel_size_y = sizeof(UWORD16);
i4_pixel_size_uv = i4_pixel_size_y;
pixel_size_y = sizeof(UWORD16);
pixel_size_uv = pixel_size_y;
if(1 == ps_codec->i4_share_disp_buf)
{
@ -2864,21 +2864,21 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
aligned_ht = ALIGN2(ht);
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 2) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * aligned_ht) >> 2) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 2) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * aligned_ht) >> 2) * pixel_size_uv;
}
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) * pixel_size_uv;
}
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 1) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 1) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = 0;
}
else if(ps_codec->e_chroma_fmt == IV_GRAY)
@ -2889,9 +2889,9 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
}
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * ht) >> 1) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * ht) >> 1) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * ht) >> 1) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * ht) >> 1) * pixel_size_uv;
}
ps_ctl_op->u4_pic_ht = ht;
ps_ctl_op->u4_pic_wd = wd;
@ -2945,7 +2945,7 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
UWORD32 i = 0;
WORD32 wd, ht;
WORD32 aligned_wd, aligned_ht;
WORD32 i4_pixel_size_y, i4_pixel_size_uv;
WORD32 pixel_size_y, pixel_size_uv;
ivd_ctl_getbufinfo_op_t *ps_ctl_op =
(ivd_ctl_getbufinfo_op_t *)pv_api_op;
ps_ctl_op->u4_error_code = 0;
@ -3001,8 +3001,8 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
if(ps_codec->i4_sps_done)
{
i4_pixel_size_y = ps_codec->i4_pixel_size_y;
i4_pixel_size_uv = ps_codec->i4_pixel_size_uv;
pixel_size_y = ps_codec->i4_pixel_size_y;
pixel_size_uv = ps_codec->i4_pixel_size_uv;
if(0 == ps_codec->i4_share_disp_buf)
{
@ -3018,8 +3018,8 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
}
else
{
i4_pixel_size_y = sizeof(UWORD16);
i4_pixel_size_uv = i4_pixel_size_y;
pixel_size_y = sizeof(UWORD16);
pixel_size_uv = pixel_size_y;
if(1 == ps_codec->i4_share_disp_buf)
{
@ -3063,21 +3063,21 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
aligned_ht = ALIGN2(ht);
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 2) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * aligned_ht) >> 2) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 2) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * aligned_ht) >> 2) * pixel_size_uv;
}
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) * pixel_size_uv;
}
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 1) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * aligned_ht) >> 1) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = 0;
}
else if(ps_codec->e_chroma_fmt == IV_GRAY)
@ -3088,9 +3088,9 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
}
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
{
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * i4_pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * ht) >> 1) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * ht) >> 1) * i4_pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * pixel_size_y;
ps_ctl_op->u4_min_out_buf_size[1] = ((aligned_wd * ht) >> 1) * pixel_size_uv;
ps_ctl_op->u4_min_out_buf_size[2] = ((aligned_wd * ht) >> 1) * pixel_size_uv;
}
ps_codec->i4_num_disp_bufs = ps_ctl_op->u4_num_disp_bufs;

View file

@ -115,7 +115,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
WORD8 *pi1_qp;
UWORD16 *pu2_ctb_no_loop_filter_flag;
UWORD16 au2_ctb_no_loop_filter_flag[9];
WORD32 i4_pixel_size_y, i4_pixel_size_uv;
WORD32 pixel_size_y, pixel_size_uv;
UWORD8 u1_bit_depth_luma, u1_bit_depth_chroma;
WORD32 col, row;
@ -150,8 +150,8 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
log2_ctb_size = ps_sps->i1_log2_ctb_size;
ctb_size = (1 << ps_sps->i1_log2_ctb_size);
i4_pixel_size_y = ps_codec->i4_pixel_size_y;
i4_pixel_size_uv = ps_codec->i4_pixel_size_uv;
pixel_size_y = ps_codec->i4_pixel_size_y;
pixel_size_uv = ps_codec->i4_pixel_size_uv;
u1_bit_depth_luma = (UWORD8)ps_codec->i4_bit_depth_luma;
u1_bit_depth_chroma = (UWORD8)ps_codec->i4_bit_depth_chroma;
i4_sub_ht_c = ps_codec->i4_sub_height_chroma;
@ -261,12 +261,12 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
}
pu1_src = ps_deblk->pu1_cur_pic_luma +
((ps_deblk->i4_ctb_x + ps_deblk->i4_ctb_y * ps_codec->i4_strd) << (log2_ctb_size)) * i4_pixel_size_y;
pu1_src += i4_is_last_ctb_y ? ((ps_codec->i4_strd << log2_ctb_size) * i4_pixel_size_y) : 0;
((ps_deblk->i4_ctb_x + ps_deblk->i4_ctb_y * ps_codec->i4_strd) << (log2_ctb_size)) * pixel_size_y;
pu1_src += i4_is_last_ctb_y ? ((ps_codec->i4_strd << log2_ctb_size) * pixel_size_y) : 0;
/** Deblocking is done on a shifted CTB -
* Vertical edge processing is done by shifting the CTB up by four pixels */
pu1_src -= 4 * src_strd * i4_pixel_size_y;
pu1_src -= 4 * src_strd * pixel_size_y;
for(col = 0; col < ctb_size / 8; col++)
{
@ -302,9 +302,9 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
{
u4_bs = u4_bs >> (bs_tz << 1);
if((row + bs_tz) >= (ctb_size / 4))
pu1_src += 4 * (ctb_size / 4 - row) * src_strd * i4_pixel_size_y;
pu1_src += 4 * (ctb_size / 4 - row) * src_strd * pixel_size_y;
else
pu1_src += 4 * bs_tz * src_strd * i4_pixel_size_y;
pu1_src += 4 * bs_tz * src_strd * pixel_size_y;
row += bs_tz;
continue;
@ -385,7 +385,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
}
}
pu1_src += 4 * src_strd * i4_pixel_size_y;
pu1_src += 4 * src_strd * pixel_size_y;
u4_bs = u4_bs >> 2;
row++;
} /* End of loop over rows */
@ -395,8 +395,8 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
{
pu4_vert_bs++;
}
pu1_src -= ((src_strd << log2_ctb_size) * i4_pixel_size_y);
pu1_src += 8 * i4_pixel_size_y;
pu1_src -= ((src_strd << log2_ctb_size) * pixel_size_y);
pu1_src += 8 * pixel_size_y;
} /* End of loop over columns */
pu4_vert_bs = pu4_ctb_vert_bs;
}
@ -416,12 +416,12 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
ps_slice_hdr_left = ps_codec->ps_slice_hdr_base + ps_deblk->pu1_slice_idx[cur_ctb_indx - 1];
}
pu1_src = ps_deblk->pu1_cur_pic_luma +
((ps_deblk->i4_ctb_x + ps_deblk->i4_ctb_y * ps_codec->i4_strd) << log2_ctb_size) * i4_pixel_size_y;
pu1_src += i4_is_last_ctb_x ? (ctb_size * i4_pixel_size_y) : 0;
((ps_deblk->i4_ctb_x + ps_deblk->i4_ctb_y * ps_codec->i4_strd) << log2_ctb_size) * pixel_size_y;
pu1_src += i4_is_last_ctb_x ? (ctb_size * pixel_size_y) : 0;
/** Deblocking is done on a shifted CTB -
* Horizontal edge processing is done by shifting the CTB left by four pixels */
pu1_src -= 4 * i4_pixel_size_y;
pu1_src -= 4 * pixel_size_y;
for(row = 0; row < ctb_size / 8; row++)
{
WORD32 shift = 0;
@ -458,9 +458,9 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
u4_bs = u4_bs >> (bs_tz << 1);
if((col + bs_tz) >= (ctb_size / 4))
pu1_src += 4 * (ctb_size / 4 - col) * i4_pixel_size_y;
pu1_src += 4 * (ctb_size / 4 - col) * pixel_size_y;
else
pu1_src += 4 * bs_tz * i4_pixel_size_y;
pu1_src += 4 * bs_tz * pixel_size_y;
col += bs_tz;
continue;
@ -540,7 +540,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
}
}
pu1_src += 4 * i4_pixel_size_y;
pu1_src += 4 * pixel_size_y;
u4_bs = u4_bs >> 2;
col++;
}
@ -550,8 +550,8 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
{
pu4_horz_bs++;
}
pu1_src -= ctb_size * i4_pixel_size_y;
pu1_src += ((src_strd << 3) * i4_pixel_size_y);
pu1_src -= ctb_size * pixel_size_y;
pu1_src += ((src_strd << 3) * pixel_size_y);
}
pu4_horz_bs = pu4_ctb_horz_bs;
}
@ -573,13 +573,13 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
pu1_src = ps_deblk->pu1_cur_pic_chroma +
(((ps_deblk->i4_ctb_x * chroma_pixel_strd / h_samp_factor +
ps_deblk->i4_ctb_y * ps_deblk->ps_codec->i4_strd * chroma_pixel_strd / (h_samp_factor * v_samp_factor)) << log2_ctb_size) * i4_pixel_size_uv);
ps_deblk->i4_ctb_y * ps_deblk->ps_codec->i4_strd * chroma_pixel_strd / (h_samp_factor * v_samp_factor)) << log2_ctb_size) * pixel_size_uv);
pu1_src += i4_is_last_ctb_y ?
((((ps_codec->i4_strd * chroma_pixel_strd) / (h_samp_factor * v_samp_factor)) << log2_ctb_size) * i4_pixel_size_uv) : 0;
((((ps_codec->i4_strd * chroma_pixel_strd) / (h_samp_factor * v_samp_factor)) << log2_ctb_size) * pixel_size_uv) : 0;
/** Deblocking is done on a shifted CTB -
* Vertical edge processing is done by shifting the CTB up by four pixels */
pu1_src -= 4 * chroma_strd * i4_pixel_size_uv;
pu1_src -= 4 * chroma_strd * pixel_size_uv;
for(col = 0; col < ctb_size / (8 * h_samp_factor); col++)
{
@ -615,9 +615,9 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
if(0 != bs_tz)
{
if((row + bs_tz) >= (ctb_size / (4 * v_samp_factor)))
pu1_src += 4 * (ctb_size / (4 * v_samp_factor) - row) * chroma_strd * i4_pixel_size_uv;
pu1_src += 4 * (ctb_size / (4 * v_samp_factor) - row) * chroma_strd * pixel_size_uv;
else
pu1_src += 4 * bs_tz * chroma_strd * i4_pixel_size_uv;
pu1_src += 4 * bs_tz * chroma_strd * pixel_size_uv;
row += bs_tz;
u4_bs = u4_bs >> (bs_tz << v_samp_factor);
continue;
@ -743,12 +743,12 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
}
}
pu1_src += 4 * chroma_strd * i4_pixel_size_uv;
pu1_src += 4 * chroma_strd * pixel_size_uv;
u4_bs = u4_bs >> (2 * v_samp_factor);
row++;
} /* End of loop over rows */
pu1_src -= ((((src_strd * chroma_pixel_strd) / (h_samp_factor * v_samp_factor)) << log2_ctb_size) * i4_pixel_size_uv);
pu1_src -= ((((src_strd * chroma_pixel_strd) / (h_samp_factor * v_samp_factor)) << log2_ctb_size) * pixel_size_uv);
if(is_yuv444)
{
if((64 ==ctb_size) || ((32 == ctb_size) && (col & 1))) pu4_vert_bs++;
@ -757,7 +757,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
{
pu4_vert_bs += (64 == ctb_size) ? 2 : 1;
}
pu1_src += 16 * i4_pixel_size_uv;
pu1_src += 16 * pixel_size_uv;
}
}
@ -777,12 +777,12 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
pu1_src = ps_deblk->pu1_cur_pic_chroma +
(((ps_deblk->i4_ctb_x * chroma_pixel_strd / h_samp_factor +
ps_deblk->i4_ctb_y * ps_deblk->ps_codec->i4_strd * chroma_pixel_strd / (v_samp_factor * h_samp_factor)) << log2_ctb_size) * i4_pixel_size_uv);
pu1_src += i4_is_last_ctb_x ? (ctb_size * chroma_pixel_strd / h_samp_factor * i4_pixel_size_uv) : 0;
ps_deblk->i4_ctb_y * ps_deblk->ps_codec->i4_strd * chroma_pixel_strd / (v_samp_factor * h_samp_factor)) << log2_ctb_size) * pixel_size_uv);
pu1_src += i4_is_last_ctb_x ? (ctb_size * chroma_pixel_strd / h_samp_factor * pixel_size_uv) : 0;
/** Deblocking is done on a shifted CTB -
* Vertical edge processing is done by shifting the CTB up by four pixels (8 here beacuse UV are interleaved) */
pu1_src -= 8 * i4_pixel_size_uv;
pu1_src -= 8 * pixel_size_uv;
for(row = 0; row < ctb_size / (8 * v_samp_factor); row++)
{
WORD32 shift = 0;
@ -821,9 +821,9 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
u4_bs = u4_bs >> (bs_tz << h_samp_factor);
if((col + bs_tz) >= (ctb_size / (4 * h_samp_factor)))
pu1_src += 8 * (ctb_size / (4 * h_samp_factor) - col) * i4_pixel_size_uv;
pu1_src += 8 * (ctb_size / (4 * h_samp_factor) - col) * pixel_size_uv;
else
pu1_src += 8 * bs_tz * i4_pixel_size_uv;
pu1_src += 8 * bs_tz * pixel_size_uv;
col += bs_tz;
continue;
@ -948,7 +948,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
}
}
pu1_src += 8 * i4_pixel_size_uv;
pu1_src += 8 * pixel_size_uv;
u4_bs = u4_bs >> (2 * h_samp_factor);
col++;
}
@ -960,8 +960,8 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
{
pu4_horz_bs += (64 == ctb_size) ? 2 : 1;
}
pu1_src -= ctb_size * (chroma_pixel_strd / h_samp_factor) * i4_pixel_size_uv;
pu1_src += 8 * chroma_strd * i4_pixel_size_uv;
pu1_src -= ctb_size * (chroma_pixel_strd / h_samp_factor) * pixel_size_uv;
pu1_src += 8 * chroma_strd * pixel_size_uv;
}
}

View file

@ -113,7 +113,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
WORD32 clr_indx;
WORD32 ntaps;
WORD32 i4_pixel_size_y, i4_pixel_size_uv;
WORD32 pixel_size_y, pixel_size_uv;
WORD32 i4_bit_depth_luma, i4_bit_depth_chroma;
WORD32 ai2_xint[2] = { 0, 0 }, ai2_yint[2] = { 0, 0 };
@ -163,8 +163,8 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
cur_ctb_idx = ps_proc->i4_ctb_x
+ ps_proc->i4_ctb_y * (ps_sps->i2_pic_wd_in_ctb);
i4_pixel_size_y = ps_codec->i4_pixel_size_y;
i4_pixel_size_uv = ps_codec->i4_pixel_size_uv;
pixel_size_y = ps_codec->i4_pixel_size_y;
pixel_size_uv = ps_codec->i4_pixel_size_uv;
i4_bit_depth_luma = ps_codec->i4_bit_depth_luma;
i4_bit_depth_chroma = ps_codec->i4_bit_depth_chroma;
i4_sub_ht_c = ps_codec->i4_sub_height_chroma;
@ -279,7 +279,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
/*luma and chroma components*/
for(clr_indx = 0; clr_indx < num_comp; clr_indx++)
{
WORD32 i4_pixel_size;
WORD32 pixel_size;
UWORD8 u1_bit_depth;
PROFILE_DISABLE_INTER_PRED_LUMA(clr_indx);
@ -289,7 +289,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
{
WORD32 mv;
i4_pixel_size = i4_pixel_size_y;
pixel_size = pixel_size_y;
u1_bit_depth = (UWORD8)i4_bit_depth_luma;
if(ps_pu->b2_pred_mode != PRED_L1)
@ -309,7 +309,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
ref_pic_l0 = ref_pic_luma_l0 + (ai2_yint[0] * ref_strd
+ ai2_xint[0]) * i4_pixel_size_y;
+ ai2_xint[0]) * pixel_size_y;
}
if(ps_pu->b2_pred_mode != PRED_L0)
@ -326,13 +326,13 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
ai2_yfrac[1] = mv & 3;
ref_pic_l1 = ref_pic_luma_l1 + (ai2_yint[1] * ref_strd
+ ai2_xint[1]) * i4_pixel_size_y;
+ ai2_xint[1]) * pixel_size_y;
ai2_xfrac[1] &= ps_codec->i4_mv_frac_mask;
ai2_yfrac[1] &= ps_codec->i4_mv_frac_mask;
}
pu1_dst = pu1_dst_luma + (pu_y * ref_strd + pu_x) * i4_pixel_size_y;
pu1_dst = pu1_dst_luma + (pu_y * ref_strd + pu_x) * pixel_size_y;
ntaps = NTAPS_LUMA;
coeff = gai1_ihevc_luma_filter;
@ -342,7 +342,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
{
WORD32 mv;
i4_pixel_size = i4_pixel_size_uv;
pixel_size = pixel_size_uv;
u1_bit_depth = (UWORD8)i4_bit_depth_chroma;
/* xint is upshifted by 1 because the chroma components are */
@ -357,7 +357,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
ai2_yint[0] = ((pu_y / v_samp_factor) + (mv >> (2 + v_samp_factor - 1)));
ai2_yfrac[0] = mv & (is_yuv420 ? 7 : 3);
ref_pic_l0 = ref_pic_chroma_l0 + (ai2_yint[0] * (ref_strd * chroma_pixel_strd / h_samp_factor) + ai2_xint[0]) * i4_pixel_size_uv;
ref_pic_l0 = ref_pic_chroma_l0 + (ai2_yint[0] * (ref_strd * chroma_pixel_strd / h_samp_factor) + ai2_xint[0]) * pixel_size_uv;
ai2_xfrac[0] &= ps_codec->i4_mv_frac_mask;
ai2_yfrac[0] &= ps_codec->i4_mv_frac_mask;
@ -373,14 +373,14 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
ai2_yint[1] = ((pu_y / v_samp_factor) + (mv >> (2 + v_samp_factor - 1)));
ai2_yfrac[1] = mv & (is_yuv420 ? 7 : 3);
ref_pic_l1 = ref_pic_chroma_l1 + (ai2_yint[1] * (ref_strd * chroma_pixel_strd / h_samp_factor) + ai2_xint[1]) * i4_pixel_size_uv;
ref_pic_l1 = ref_pic_chroma_l1 + (ai2_yint[1] * (ref_strd * chroma_pixel_strd / h_samp_factor) + ai2_xint[1]) * pixel_size_uv;
ai2_xfrac[1] &= ps_codec->i4_mv_frac_mask;
ai2_yfrac[1] &= ps_codec->i4_mv_frac_mask;
}
pu1_dst = pu1_dst_chroma + ((pu_y / v_samp_factor) * (ref_strd * chroma_pixel_strd / h_samp_factor) +
(pu_x * chroma_pixel_strd / h_samp_factor)) * i4_pixel_size_uv;
(pu_x * chroma_pixel_strd / h_samp_factor)) * pixel_size_uv;
ntaps = NTAPS_CHROMA;
coeff = gai1_ihevc_chroma_filter;
@ -438,7 +438,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
}
func_src = (ai2_xfrac[0] && ai2_yfrac[0]) ?
ref_pic_l0 - (ntaps / 2 - 1) * func_src_strd * i4_pixel_size:
ref_pic_l0 - (ntaps / 2 - 1) * func_src_strd * pixel_size:
ref_pic_l0;
func_dst = (weighted_pred || bi_pred) ?
(void *)pi2_tmp1 : (void *)pu1_dst;
@ -460,7 +460,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_ht = pu_ht >> (is_yuv420 ? clr_indx : 0);
func_ht += (ai2_xfrac[0] && ai2_yfrac[0]) ? ntaps - 1 : 0;
if (1 == i4_pixel_size)
if (1 == pixel_size)
{
func_ptr1(func_src, func_dst, func_src_strd, func_dst_strd,
func_coeff, func_ht, func_wd);
@ -494,7 +494,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_wd = pu_wd >> (is_yuv444 ? 0 : clr_indx);
func_ht = pu_ht >> (is_yuv420 ? clr_indx : 0);
if (1 == i4_pixel_size)
if (1 == pixel_size)
{
func_ptr2(func_src, func_dst, func_src_strd, func_dst_strd,
func_coeff, func_ht, func_wd);
@ -514,7 +514,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
}
func_src = (ai2_xfrac[1] && ai2_yfrac[1]) ?
ref_pic_l1 - (ntaps / 2 - 1) * func_src_strd * i4_pixel_size :
ref_pic_l1 - (ntaps / 2 - 1) * func_src_strd * pixel_size :
ref_pic_l1;
func_dst = (weighted_pred || bi_pred) ?
@ -537,7 +537,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_ht += (ai2_xfrac[1] && ai2_yfrac[1]) ? ntaps - 1 : 0;
if (1 == i4_pixel_size)
if (1 == pixel_size)
{
func_ptr3(func_src, func_dst, func_src_strd, func_dst_strd,
func_coeff, func_ht, func_wd);
@ -572,7 +572,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_wd = pu_wd >> (is_yuv444 ? 0 : clr_indx);
func_ht = pu_ht >> (is_yuv420 ? clr_indx : 0);
if (1 == i4_pixel_size)
if (1 == pixel_size)
{
func_ptr4(func_src, func_dst, func_src_strd, func_dst_strd,
func_coeff, func_ht, func_wd);
@ -605,7 +605,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
shift = ps_wt_ofst->i1_luma_log2_weight_denom
+ (14 - i4_bit_depth_luma) + 1; //+ SHIFT_14_MINUS_BIT_DEPTH + 1;
if (1 == i4_pixel_size_y)
if (1 == pixel_size_y)
{
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr(pi2_tmp1,
pi2_tmp2,
@ -642,7 +642,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
if(chroma_yuv420sp_vu)
{
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr(pi2_tmp1,
pi2_tmp2,
@ -690,7 +690,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
}
else
{
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr(pi2_tmp1,
pi2_tmp2,
@ -759,7 +759,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
shift = ps_wt_ofst->i1_luma_log2_weight_denom
+ 14 - i4_bit_depth_luma; //+ SHIFT_14_MINUS_BIT_DEPTH;
if (1 == i4_pixel_size_y)
if (1 == pixel_size_y)
{
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr(ps_pu->b2_pred_mode == PRED_L0 ? pi2_tmp1 : pi2_tmp2,
pu1_dst,
@ -789,7 +789,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_dst_strd = ref_strd * (chroma_pixel_strd / h_samp_factor);
if(chroma_yuv420sp_vu)
{
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr(ps_pu->b2_pred_mode == PRED_L0 ? pi2_tmp1 : pi2_tmp2,
pu1_dst,
@ -823,7 +823,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
}
else
{
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr(ps_pu->b2_pred_mode == PRED_L0 ? pi2_tmp1 : pi2_tmp2,
pu1_dst,
@ -880,7 +880,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
func_ht = pu_ht >> (is_yuv420 ? clr_indx : 0);
func_wd = pu_wd << (is_yuv444 ? clr_indx : 0);
if (1 == i4_pixel_size)
if (1 == pixel_size)
{
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr(pi2_tmp1,
pi2_tmp2,

View file

@ -943,7 +943,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
UWORD32 top_avail_bits;
sps_t *ps_sps;
pps_t *ps_pps;
WORD32 i4_pixel_size_y, i4_pixel_size_uv;
WORD32 pixel_size_y, pixel_size_uv;
WORD32 i4_bit_depth_luma, i4_bit_depth_chroma;
WORD32 intra_flag;
UWORD8 *pu1_pic_intra_flag;
@ -987,8 +987,8 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
pic_strd = ps_codec->i4_strd;
i4_pixel_size_y = ps_codec->i4_pixel_size_y;
i4_pixel_size_uv = ps_codec->i4_pixel_size_uv;
pixel_size_y = ps_codec->i4_pixel_size_y;
pixel_size_uv = ps_codec->i4_pixel_size_uv;
i4_bit_depth_luma = ps_codec->i4_bit_depth_luma;
i4_bit_depth_chroma = ps_codec->i4_bit_depth_chroma;
pi2_tu_coeff = pi2_ctb_coeff;
@ -1136,7 +1136,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
pcm_flag = 1;
tu_y_offset = tu_x + tu_y * pic_strd;
pu1_y_dst += (tu_x + tu_y * pic_strd) * i4_pixel_size_y;
pu1_y_dst += (tu_x + tu_y * pic_strd) * pixel_size_y;
/* First byte points to number of coded blocks */
pu1_tu_coeff_data++;
@ -1151,8 +1151,8 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
{
for(i = 0; i < cb_size; i++)
{
memcpy(&pu1_y_dst[i * pic_strd * i4_pixel_size_y], pu1_buf, (cb_size * i4_pixel_size_y));
pu1_buf += cb_size * i4_pixel_size_y;
memcpy(&pu1_y_dst[i * pic_strd * pixel_size_y], pu1_buf, (cb_size * pixel_size_y));
pu1_buf += cb_size * pixel_size_y;
}
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
@ -1160,15 +1160,15 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
WORD32 chroma_strd = (pic_strd * chroma_pixel_strd) / h_samp_factor;
pu1_uv_dst += ((tu_x * chroma_pixel_strd / h_samp_factor)
+ (tu_y * chroma_pixel_strd * pic_strd / (h_samp_factor * v_samp_factor))) * i4_pixel_size_uv;
pu1_uv_dst = pu1_uv_dst + chroma_yuv420sp_vu_u_offset * i4_pixel_size_uv;
+ (tu_y * chroma_pixel_strd * pic_strd / (h_samp_factor * v_samp_factor))) * pixel_size_uv;
pu1_uv_dst = pu1_uv_dst + chroma_yuv420sp_vu_u_offset * pixel_size_uv;
/* U */
for(i = 0; i < cb_size / v_samp_factor; i++)
{
for(j = 0; j < cb_size / h_samp_factor; j++)
{
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
pu1_uv_dst[i * chroma_strd + chroma_pixel_strd * j] = *pu1_buf++;
}
@ -1181,14 +1181,14 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
}
}
pu1_uv_dst = pu1_uv_dst + (1 + chroma_yuv420sp_vu_v_offset) * i4_pixel_size_uv;
pu1_uv_dst = pu1_uv_dst + (1 + chroma_yuv420sp_vu_v_offset) * pixel_size_uv;
/* V */
for(i = 0; i < cb_size / v_samp_factor; i++)
{
for(j = 0; j < cb_size / h_samp_factor; j++)
{
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
pu1_uv_dst[i * chroma_strd + chroma_pixel_strd * j] = *pu1_buf++;
}
@ -1242,8 +1242,8 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
qp_rem = (ps_tu->b7_qp + i4_qp_bd_offset_y) % 6;
y_cb_tu.pi2_tu_coeff = pi2_tu_coeff;
y_cb_tu.pu1_pred = pu1_y_dst_ctb + tu_y_offset * i4_pixel_size_y;
y_cb_tu.pu1_dst = pu1_y_dst_ctb + tu_y_offset * i4_pixel_size_y;
y_cb_tu.pu1_pred = pu1_y_dst_ctb + tu_y_offset * pixel_size_y;
y_cb_tu.pu1_dst = pu1_y_dst_ctb + tu_y_offset * pixel_size_y;
y_cb_tu.tu_coeff_stride = trans_size;
y_cb_tu.pred_strd = pic_strd;
y_cb_tu.dst_strd = pic_strd;
@ -1339,7 +1339,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
chroma_qp_idx += ps_pps->i4_cb_qp_offset_list[ps_tu->b3_cu_chroma_qp_offset_idx];
}
#endif
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
chroma_qp_idx = CLIP3(chroma_qp_idx, 0, 57);
qp_div = pi2_ihevcd_chroma_qp[chroma_qp_idx] / 6;
@ -1383,7 +1383,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
chroma_qp_idx += ps_pps->i4_cr_qp_offset_list[ps_tu->b3_cu_chroma_qp_offset_idx];
}
#endif
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
chroma_qp_idx = CLIP3(chroma_qp_idx, 0, 57);
qp_div_v = pi2_ihevcd_chroma_qp[chroma_qp_idx] / 6;
@ -1417,16 +1417,16 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
}
y_cb_tu.pi2_tu_coeff = pi2_tu_coeff;
y_cb_tu.pu1_pred = pu1_uv_dst_ctb + (tu_uv_offset + chroma_yuv420sp_vu_u_offset) * i4_pixel_size_uv;
y_cb_tu.pu1_dst = pu1_uv_dst_ctb + (tu_uv_offset + chroma_yuv420sp_vu_u_offset) * i4_pixel_size_uv;
y_cb_tu.pu1_pred = pu1_uv_dst_ctb + (tu_uv_offset + chroma_yuv420sp_vu_u_offset) * pixel_size_uv;
y_cb_tu.pu1_dst = pu1_uv_dst_ctb + (tu_uv_offset + chroma_yuv420sp_vu_u_offset) * pixel_size_uv;
y_cb_tu.tu_coeff_stride = trans_size;
y_cb_tu.pred_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
y_cb_tu.dst_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
y_cb_tu.cbf = ps_tu->b1_cb_cbf;
cr_tu.pi2_tu_coeff = pi2_tu_coeff + trans_size * trans_size;
cr_tu.pu1_pred = y_cb_tu.pu1_pred + (1 + chroma_yuv420sp_vu_v_offset) * i4_pixel_size_uv;
cr_tu.pu1_dst = y_cb_tu.pu1_dst + (1 + chroma_yuv420sp_vu_v_offset) * i4_pixel_size_uv;
cr_tu.pu1_pred = y_cb_tu.pu1_pred + (1 + chroma_yuv420sp_vu_v_offset) * pixel_size_uv;
cr_tu.pu1_dst = y_cb_tu.pu1_dst + (1 + chroma_yuv420sp_vu_v_offset) * pixel_size_uv;
cr_tu.tu_coeff_stride = trans_size;
cr_tu.pred_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
cr_tu.dst_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
@ -1454,8 +1454,8 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
{
cb_sub_tu.pi2_tu_coeff = ps_proc->pi2_invscan_out_subtu;
cb_sub_tu.pu1_pred = y_cb_tu.pu1_pred + trans_size * y_cb_tu.pred_strd * i4_pixel_size_uv;
cb_sub_tu.pu1_dst = y_cb_tu.pu1_dst + trans_size * y_cb_tu.dst_strd * i4_pixel_size_uv;
cb_sub_tu.pu1_pred = y_cb_tu.pu1_pred + trans_size * y_cb_tu.pred_strd * pixel_size_uv;
cb_sub_tu.pu1_dst = y_cb_tu.pu1_dst + trans_size * y_cb_tu.dst_strd * pixel_size_uv;
cb_sub_tu.tu_coeff_stride = trans_size;
cb_sub_tu.pred_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
cb_sub_tu.dst_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
@ -1498,8 +1498,8 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
{
cr_sub_tu.pi2_tu_coeff = ps_proc->pi2_invscan_out_subtu + trans_size * trans_size;
cr_sub_tu.pu1_pred = cr_tu.pu1_pred + trans_size * cr_tu.pred_strd * i4_pixel_size_uv;
cr_sub_tu.pu1_dst = cr_tu.pu1_dst + trans_size * cr_tu.dst_strd * i4_pixel_size_uv;
cr_sub_tu.pu1_pred = cr_tu.pu1_pred + trans_size * cr_tu.pred_strd * pixel_size_uv;
cr_sub_tu.pu1_dst = cr_tu.pu1_dst + trans_size * cr_tu.dst_strd * pixel_size_uv;
cr_sub_tu.tu_coeff_stride = trans_size;
cr_sub_tu.pred_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
cr_sub_tu.dst_strd = pic_strd * chroma_pixel_strd / h_samp_factor;
@ -1537,7 +1537,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
/***************************************************************/
if(intra_flag) /* Intra */
{
WORD32 pixel_size = (c_idx == 0) ? i4_pixel_size_y : i4_pixel_size_uv;
WORD32 pixel_size = (c_idx == 0) ? pixel_size_y : pixel_size_uv;
/* While (MAX_TU_SIZE * 2 * 2) + 1 is the actaul size needed,
au1_ref_sub_out size is kept as multiple of 8,
so that SIMD functions can load 64 bits. Also some SIMD
@ -1650,12 +1650,12 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
}
/* Initializing nbr pointers */
pu1_top = y_cb_tu.pu1_pred - pic_strd * i4_pixel_size_y;
pu1_left = y_cb_tu.pu1_pred - i4_pixel_size_y;
pu1_top_left = y_cb_tu.pu1_pred - (pic_strd + 1) * i4_pixel_size_y;
pu1_top = y_cb_tu.pu1_pred - pic_strd * pixel_size_y;
pu1_left = y_cb_tu.pu1_pred - pixel_size_y;
pu1_top_left = y_cb_tu.pu1_pred - (pic_strd + 1) * pixel_size_y;
/* call reference array substitution */
if (1 == i4_pixel_size_y)
if (1 == pixel_size_y)
{
if(luma_nbr_flags == 0x1ffff)
{
@ -1707,7 +1707,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
disable_boundary_filter = 1;
#endif
/* call the intra prediction function */
if (1 == i4_pixel_size_y)
if (1 == pixel_size_y)
{
ps_codec->apf_intra_pred_luma[luma_pred_func_idx](
pu1_ref_sub_out, 1,
@ -1775,9 +1775,9 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
}
/* Initializing nbr pointers */
pu1_top = pu1_pred_orig - (pic_strd * chroma_pixel_strd / h_samp_factor) * i4_pixel_size_uv;
pu1_left = pu1_pred_orig - 2 * i4_pixel_size_uv;
pu1_top_left = pu1_pred_orig - (pic_strd * chroma_pixel_strd / h_samp_factor + 2) * i4_pixel_size_uv;
pu1_top = pu1_pred_orig - (pic_strd * chroma_pixel_strd / h_samp_factor) * pixel_size_uv;
pu1_left = pu1_pred_orig - 2 * pixel_size_uv;
pu1_top_left = pu1_pred_orig - (pic_strd * chroma_pixel_strd / h_samp_factor + 2) * pixel_size_uv;
if(subtu_idx == 0)
{
@ -1811,7 +1811,7 @@ WORD32 ihevcd_iquant_itrans_recon_ctb(process_ctxt_t *ps_proc)
}
/* call the chroma reference array substitution */
if (1 == i4_pixel_size_uv)
if (1 == pixel_size_uv)
{
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr(
pu1_top_left,

View file

@ -194,7 +194,7 @@ WORD32 ihevcd_get_total_pic_buf_size(codec_t *ps_codec,
WORD32 ht)
{
WORD32 size;
WORD32 i4_pixel_size = ps_codec->i4_pixel_size_y;
WORD32 pixel_size = ps_codec->i4_pixel_size_y;
WORD32 num_luma_samples;
WORD32 max_dpb_size;
WORD32 num_samples;
@ -239,7 +239,7 @@ WORD32 ihevcd_get_total_pic_buf_size(codec_t *ps_codec,
/* Account for bit depth of pixels */
size *= i4_pixel_size;
size *= pixel_size;
return size;
}
@ -499,12 +499,12 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
WORD32 h_samp_factor, v_samp_factor;
WORD32 chroma_pixel_strd = 2;
WORD32 i4_pixel_size_y;
WORD32 i4_pixel_size_uv;
WORD32 pixel_size_y;
WORD32 pixel_size_uv;
/* Derive the pixel size for luma and chroma */
i4_pixel_size_y = ps_codec->i4_pixel_size_y;
i4_pixel_size_uv = ps_codec->i4_pixel_size_uv;
pixel_size_y = ps_codec->i4_pixel_size_y;
pixel_size_uv = ps_codec->i4_pixel_size_uv;
/* Initialize Pic buffer manager */
@ -540,7 +540,7 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
WORD32 chroma_samples;
pic_buf_size_allocated = ps_codec->i4_total_pic_buf_size;
luma_samples = (ps_codec->i4_strd * i4_pixel_size_y) *
luma_samples = (ps_codec->i4_strd * pixel_size_y) *
(ps_sps->i2_pic_height_in_luma_samples + PAD_HT);
if(CHROMA_FMT_IDC_MONOCHROME == ps_sps->i1_chroma_format_idc)
@ -566,14 +566,14 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
return IHEVCD_INSUFFICIENT_MEM_PICBUF;
}
ps_pic_buf->pu1_luma = pu1_buf + (ps_codec->i4_strd * PAD_TOP + PAD_LEFT) * i4_pixel_size_y;
ps_pic_buf->pu1_luma = pu1_buf + (ps_codec->i4_strd * PAD_TOP + PAD_LEFT) * pixel_size_y;
pu1_buf += luma_samples;
if(chroma_samples)
{
ps_pic_buf->pu1_chroma = pu1_buf
+ ((ps_codec->i4_strd * chroma_pixel_strd / h_samp_factor) * (PAD_TOP / v_samp_factor)
+ (PAD_LEFT * chroma_pixel_strd / h_samp_factor)) * i4_pixel_size_uv;
+ (PAD_LEFT * chroma_pixel_strd / h_samp_factor)) * pixel_size_uv;
pu1_buf += chroma_samples;
}
else
@ -653,9 +653,9 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
{
break;
}
ps_pic_buf->pu1_luma += (ps_codec->i4_strd * PAD_TOP + PAD_LEFT) * i4_pixel_size_y;
ps_pic_buf->pu1_luma += (ps_codec->i4_strd * PAD_TOP + PAD_LEFT) * pixel_size_y;
ps_pic_buf->pu1_chroma += ((ps_codec->i4_strd * chroma_pixel_strd / h_samp_factor) * (PAD_TOP / v_samp_factor)
+ (PAD_LEFT * chroma_pixel_strd / h_samp_factor)) * i4_pixel_size_uv;
+ (PAD_LEFT * chroma_pixel_strd / h_samp_factor)) * pixel_size_uv;
}
}

View file

@ -989,14 +989,14 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
if(0 != file_save)
{
UWORD8 *buf;
WORD32 i4_pixel_size;
WORD32 pixel_size;
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_y_buf;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
for(i = 0; i < s_dump_disp_frm_buf.u4_y_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_wd * i4_pixel_size), ps_op_file);
buf += s_dump_disp_frm_buf.u4_y_strd * i4_pixel_size;
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_wd * pixel_size), ps_op_file);
buf += s_dump_disp_frm_buf.u4_y_strd * pixel_size;
}
if(ps_app_ctx->e_output_chroma_format != IV_GRAY)
@ -1004,14 +1004,14 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
buf = (UWORD8*)s_dump_disp_frm_buf.pv_u_buf;
for(i = 0; i < s_dump_disp_frm_buf.u4_u_ht; i++)
{
fwrite(buf, 1, s_dump_disp_frm_buf.u4_u_wd * i4_pixel_size, ps_op_file);
buf += s_dump_disp_frm_buf.u4_u_strd * i4_pixel_size;
fwrite(buf, 1, s_dump_disp_frm_buf.u4_u_wd * pixel_size, ps_op_file);
buf += s_dump_disp_frm_buf.u4_u_strd * pixel_size;
}
buf = (UWORD8*)s_dump_disp_frm_buf.pv_v_buf;
for(i = 0; i < s_dump_disp_frm_buf.u4_v_ht; i++)
{
fwrite(buf, 1, s_dump_disp_frm_buf.u4_v_wd * i4_pixel_size, ps_op_file);
buf += s_dump_disp_frm_buf.u4_v_strd * i4_pixel_size;
fwrite(buf, 1, s_dump_disp_frm_buf.u4_v_wd * pixel_size, ps_op_file);
buf += s_dump_disp_frm_buf.u4_v_strd * pixel_size;
}
}
}
@ -1019,12 +1019,12 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
if(0 != chksum_save)
{
UWORD8 au1_y_chksum[16];
WORD32 i4_pixel_size;
WORD32 pixel_size;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
calc_md5_cksum((UWORD8 *)s_dump_disp_frm_buf.pv_y_buf,
s_dump_disp_frm_buf.u4_y_strd * i4_pixel_size,
s_dump_disp_frm_buf.u4_y_wd * i4_pixel_size,
s_dump_disp_frm_buf.u4_y_strd * pixel_size,
s_dump_disp_frm_buf.u4_y_wd * pixel_size,
s_dump_disp_frm_buf.u4_y_ht,
au1_y_chksum);
fwrite(au1_y_chksum, sizeof(UWORD8), 16, ps_op_chksum_file);
@ -1034,13 +1034,13 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
UWORD8 au1_u_chksum[16];
UWORD8 au1_v_chksum[16];
calc_md5_cksum((UWORD8 *)s_dump_disp_frm_buf.pv_u_buf,
s_dump_disp_frm_buf.u4_u_strd * i4_pixel_size,
s_dump_disp_frm_buf.u4_u_wd * i4_pixel_size,
s_dump_disp_frm_buf.u4_u_strd * pixel_size,
s_dump_disp_frm_buf.u4_u_wd * pixel_size,
s_dump_disp_frm_buf.u4_u_ht,
au1_u_chksum);
calc_md5_cksum((UWORD8 *)s_dump_disp_frm_buf.pv_v_buf,
s_dump_disp_frm_buf.u4_v_strd * i4_pixel_size,
s_dump_disp_frm_buf.u4_v_wd * i4_pixel_size,
s_dump_disp_frm_buf.u4_v_strd * pixel_size,
s_dump_disp_frm_buf.u4_v_wd * pixel_size,
s_dump_disp_frm_buf.u4_v_ht,
au1_v_chksum);
fwrite(au1_u_chksum, sizeof(UWORD8), 16, ps_op_chksum_file);
@ -1063,21 +1063,21 @@ void dump_output(vid_dec_ctx_t *ps_app_ctx,
#else
{
UWORD8 *buf;
WORD32 i4_pixel_size;
WORD32 pixel_size;
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_y_buf;
i4_pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
pixel_size = 1 + (s_dump_disp_frm_buf.u4_bit_depth > 8);
for(i = 0; i < s_dump_disp_frm_buf.u4_y_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_wd * i4_pixel_size), ps_op_file);
buf += s_dump_disp_frm_buf.u4_y_strd * i4_pixel_size;
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_y_wd * pixel_size), ps_op_file);
buf += s_dump_disp_frm_buf.u4_y_strd * pixel_size;
}
buf = (UWORD8 *)s_dump_disp_frm_buf.pv_u_buf;
for(i = 0; i < s_dump_disp_frm_buf.u4_u_ht; i++)
{
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_u_wd * i4_pixel_size), ps_op_file);
buf += s_dump_disp_frm_buf.u4_u_strd * i4_pixel_size;
fwrite(buf, 1, (s_dump_disp_frm_buf.u4_u_wd * pixel_size), ps_op_file);
buf += s_dump_disp_frm_buf.u4_u_strd * pixel_size;
}
}
#endif
@ -2406,41 +2406,41 @@ int main(WORD32 argc, CHAR *argv[])
}
#ifdef ADAPTIVE_TEST
WORD32 i4_pixel_size = 1 + (ps_video_decode_op->s_disp_frm_buf.u4_bit_depth > 8 );
WORD32 pixel_size = 1 + (ps_video_decode_op->s_disp_frm_buf.u4_bit_depth > 8 );
switch(s_app_ctx.e_output_chroma_format)
{
case IV_YUV_420P:
{
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 2) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 2) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 2) * pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 2) * pixel_size;
break;
}
case IV_YUV_420SP_UV:
case IV_YUV_420SP_VU:
{
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 1) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 1) * pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = 0;
break;
}
case IV_YUV_422P:
{
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 1) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 1) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 1) * pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT >> 1) * pixel_size;
break;
}
case IV_YUV_444P:
{
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
s_ctl_op.u4_min_out_buf_size[2] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
break;
}
case IV_GRAY:
{
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * i4_pixel_size;
s_ctl_op.u4_min_out_buf_size[0] = (ADAPTIVE_MAX_WD * ADAPTIVE_MAX_HT) * pixel_size;
s_ctl_op.u4_min_out_buf_size[1] = 0;
s_ctl_op.u4_min_out_buf_size[2] = 0;
break;