diff options
-rw-r--r-- | encoder/hme_err_compute.c | 24 | ||||
-rw-r--r-- | encoder/hme_refine.c | 5 | ||||
-rw-r--r-- | encoder/ihevce_enc_loop_pass.c | 10 |
3 files changed, 11 insertions, 28 deletions
diff --git a/encoder/hme_err_compute.c b/encoder/hme_err_compute.c index febffce..d145f42 100644 --- a/encoder/hme_err_compute.c +++ b/encoder/hme_err_compute.c @@ -1797,14 +1797,13 @@ void hme_update_results_grid_pu_bestn_no_encode(result_upd_prms_t *ps_result_prm /*****************************************************************/ if(i4_tot_cost < ps_best_node[num_results - 1].i4_tot_cost) { - S32 eq_cost = 0; /*************************************************************/ /* Identify where the current result isto be placed.Basically*/ /* find the node which has cost just higher thannodeundertest*/ /*************************************************************/ for(i = 0; i < num_results - 1; i++) { - if(i4_tot_cost < ps_best_node[i].i4_tot_cost) + if(i4_tot_cost <= ps_best_node[i].i4_tot_cost) { memmove( ps_best_node + i + 1, @@ -1812,24 +1811,11 @@ void hme_update_results_grid_pu_bestn_no_encode(result_upd_prms_t *ps_result_prm sizeof(search_node_t) * (num_results - 1 - i)); break; } - else if(i4_tot_cost == ps_best_node[i].i4_tot_cost) - { - //if (0 == hme_cmp_nodes(ps_search_node_grid, ps_best_node+i)) - // break; - /* When cost is same we comp. the nodes and if it's same skip. */ - /* We don't want to add this code to intrinsic. So we are */ - /* commenting it. The quality impact was minor when we did the */ - /* regression. */ - eq_cost = 1; - } - } - if(!eq_cost) - { - ps_best_node[i] = *ps_search_node_grid; - ps_best_node[i].i4_sad = i4_sad; - ps_best_node[i].i4_mv_cost = i4_mv_cost; - ps_best_node[i].i4_tot_cost = i4_tot_cost; } + ps_best_node[i] = *ps_search_node_grid; + ps_best_node[i].i4_sad = i4_sad; + ps_best_node[i].i4_mv_cost = i4_mv_cost; + ps_best_node[i].i4_tot_cost = i4_tot_cost; } i4_count++; } diff --git a/encoder/hme_refine.c b/encoder/hme_refine.c index c8e6b38..2932bd1 100644 --- a/encoder/hme_refine.c +++ b/encoder/hme_refine.c @@ -2011,8 +2011,9 @@ void hme_update_mv_bank_in_l1_me( pi1_ref_idx4 = pi1_ref_idx3 + (ps_layer_mv->i4_num_mvs_per_blk); { - search_node_t *aps_result_nodes_sorted[2][MAX_NUM_REF * 4]; - U08 au1_cost_shifts_for_sorted_node[2][MAX_NUM_REF * 4]; + /* max ref frames * max results per partition * number of partitions (4x4, 8x8) */ + search_node_t *aps_result_nodes_sorted[2][MAX_NUM_REF * MAX_RESULTS_PER_PART * 2]; + U08 au1_cost_shifts_for_sorted_node[2][MAX_NUM_REF * MAX_RESULTS_PER_PART * 2]; S32 i; diff --git a/encoder/ihevce_enc_loop_pass.c b/encoder/ihevce_enc_loop_pass.c index c73c7ff..b1a8b71 100644 --- a/encoder/ihevce_enc_loop_pass.c +++ b/encoder/ihevce_enc_loop_pass.c @@ -3018,14 +3018,10 @@ void ihevce_enc_loop_process( ps_ctxt->pv_err_func_selector = ps_func_selector; #endif - /*Bit0 - of this Flag indicates whether current pictute needs to be deblocked, - padded and hpel planes need to be generated. - Bit1 - of this flag set to 1 if sao is enabled. This is to enable deblocking when sao is enabled*/ ps_ctxt->i4_deblk_pad_hpel_cur_pic = - (ps_frm_recon->i4_deblk_pad_hpel_cur_pic) || - ((ps_ctxt->s_sao_ctxt_t.ps_slice_hdr->i1_slice_sao_luma_flag || - ps_ctxt->s_sao_ctxt_t.ps_slice_hdr->i1_slice_sao_chroma_flag) - << 1); + ps_frm_recon->i4_deblk_pad_hpel_cur_pic || + ps_ctxt->s_sao_ctxt_t.ps_slice_hdr->i1_slice_sao_luma_flag || + ps_ctxt->s_sao_ctxt_t.ps_slice_hdr->i1_slice_sao_chroma_flag; /* Share all reference pictures with nbr clients. This flag will be used only in case of dist-enc mode */ |