@@ -385,7 +385,7 @@ static void sao_search_edge_sao(const encoder_state_t * const state,
385385 // Call calc_sao_edge_dir once for luma and twice for chroma.
386386 for (i = 0 ; i < buf_cnt ; ++ i ) {
387387 FILL (cat_sum_cnt , 0 );
388- kvz_calc_sao_edge_dir (data [i ], recdata [i ], edge_class ,
388+ kvz_calc_sao_edge_dir (state -> encoder_control , data [i ], recdata [i ], edge_class ,
389389 block_width , block_height , cat_sum_cnt );
390390
391391
@@ -514,7 +514,7 @@ static void sao_search_best_mode(const encoder_state_t * const state, const kvz_
514514 unsigned buf_i ;
515515
516516 for (buf_i = 0 ; buf_i < buf_cnt ; ++ buf_i ) {
517- ddistortion += kvz_sao_edge_ddistortion (data [buf_i ], recdata [buf_i ],
517+ ddistortion += kvz_sao_edge_ddistortion (state -> encoder_control , data [buf_i ], recdata [buf_i ],
518518 block_width , block_height ,
519519 edge_sao .eo_class , & edge_sao .offsets [5 * buf_i ]);
520520 }
@@ -577,7 +577,7 @@ static void sao_search_best_mode(const encoder_state_t * const state, const kvz_
577577 switch (merge_cand -> type ) {
578578 case SAO_TYPE_EDGE :
579579 for (buf_i = 0 ; buf_i < buf_cnt ; ++ buf_i ) {
580- ddistortion += kvz_sao_edge_ddistortion (data [buf_i ], recdata [buf_i ],
580+ ddistortion += kvz_sao_edge_ddistortion (state -> encoder_control , data [buf_i ], recdata [buf_i ],
581581 block_width , block_height ,
582582 merge_cand -> eo_class , & merge_cand -> offsets [5 * buf_i ]);
583583 }
0 commit comments