aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshata Jadhav <akshata.jadhav@ittiam.com>2019-06-18 18:58:04 +0530
committerHarish Mahendrakar <harish.mahendrakar@ittiam.com>2019-10-04 15:56:49 -0700
commit50408aad50606c6da4a5068b40ff8cb83f375c82 (patch)
treef222404aa2f1ddd89fc470252d07ddce4cf507c1
parentfbcad2ab1bd8229e95f5ea9d578701247dd8c38c (diff)
downloadlibhevc-ndk-sysroot-r21.tar.gz
libhevcenc: deblk sao low res race conditionndk-sysroot-r21
While encoding inputs for size 64 x ht for ht > 64, there is a possible race condition. Before performing deblocking/sao for current CTB, its top right CTB is checked for its deblocking/sao completion. This can be skipped for last CTB of a row, provided you have atleast 2 CTB's per row. The skip is happening for rows with single CTB as well. This is corrected. Test: hevcenc -c vid_enc_cfg.txt --src_width 64 --src_height 512 \ --input night_64x512.yuv --num_cores 4 Bug: 135516662 Change-Id: Ifed1ae25e5e460cb59d84533e5ad87730ebb3395
-rw-r--r--encoder/ihevce_enc_loop_pass.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/encoder/ihevce_enc_loop_pass.c b/encoder/ihevce_enc_loop_pass.c
index f1cb79c..64c1839 100644
--- a/encoder/ihevce_enc_loop_pass.c
+++ b/encoder/ihevce_enc_loop_pass.c
@@ -2436,17 +2436,19 @@ void ihevce_enc_loop_process_row(
if(ps_ctxt->i4_deblk_pad_hpel_cur_pic)
{
- /* Wait till top neighbour CTB has done it's deblocking*/
- if(ctb_ctr < (ctb_end)-1)
+ /* for last ctb of a row check top instead of top right */
+ if(((ctb_ctr + 1) == ctb_end) && (vert_ctr > 0))
{
- ihevce_dmgr_chk_row_row_sync(
- pv_dep_mngr_enc_loop_dblk,
- ctb_ctr,
- dblk_offset,
- dblk_check_dep_pos,
- ps_ctxt->i4_tile_col_idx, /* Col Tile No. */
- ps_ctxt->thrd_id);
+ dblk_offset = 1;
}
+ /* Wait till top neighbour CTB has done it's deblocking*/
+ ihevce_dmgr_chk_row_row_sync(
+ pv_dep_mngr_enc_loop_dblk,
+ ctb_ctr,
+ dblk_offset,
+ dblk_check_dep_pos,
+ ps_ctxt->i4_tile_col_idx, /* Col Tile No. */
+ ps_ctxt->thrd_id);
if((0 == ps_ctxt->i4_deblock_type))
{