pub fn deblock_scu_ver_chroma(
    tracer: &mut Option<Tracer>,
    buf: &mut PlaneRegionMut<'_, pel>,
    qp: usize,
    ch_type: usize,
    tbl_qp_to_st: &[u8],
) {
    let st = (tbl_qp_to_st[qp] as i16) << (BIT_DEPTH - 8);

    if st != 0 {
        for j in 0..MIN_CU_SIZE >> 1 {
            let (mut A, mut B, mut C, mut D) = (
                buf[j][0] as i16,
                buf[j][1] as i16,
                buf[j][2] as i16,
                buf[j][3] as i16,
            );

            let d = (A - (B << 2) + (C << 2) - D) / 8;

            let abs = d.abs();
            let sign = d < 0;

            let t16 = max(0, ((abs - st) << 1));
            let clip = max(0, (abs - t16));
            let d1 = if sign { -clip } else { clip };

            B += d1;
            C -= d1;

            buf[j][1] = EVC_CLIP3(0, MAX_SAMPLE_VAL_I16, B) as pel;
            buf[j][2] = EVC_CLIP3(0, MAX_SAMPLE_VAL_I16, C) as pel;
        }
        TRACE_DBF(tracer, ch_type, MIN_CU_SIZE >> 1, false, buf);
    }
}
//TODO: evc_mc_l should be private, but in order to be visible for benchmark,
// change it to pub. Need to figure out a way to hide visible for API caller
evc_mc_l should be private, but in order to be visible for benchmark,
change it to pub. Need to figure out a way to hide visible for API caller
evc_mc_l should be private but in order to be visible for benchmark change it to pub . Need to figure out a way to hide visible for API caller
pub fn deblock_scu_ver_chroma(
    tracer: &mut Option<Tracer>,
    buf: &mut PlaneRegionMut<'_, pel>,
    qp: usize,
    ch_type: usize,
    tbl_qp_to_st: &[u8],
) {
    let st = (tbl_qp_to_st[qp] as i16) << (BIT_DEPTH - 8);
    if st != 0 {
        for j in 0..MIN_CU_SIZE >> 1 {
            let (mut A, mut B, mut C, mut D) = (
                buf[j][0] as i16,
                buf[j][1] as i16,
                buf[j][2] as i16,
                buf[j][3] as i16,
            );
            let d = (A - (B << 2) + (C << 2) - D) / 8;
            let abs = d.abs();
            let sign = d < 0;
            let t16 = max(0, ((abs - st) << 1));
            let clip = max(0, (abs - t16));
            let d1 = if sign { -clip } else { clip };
            B += d1;
            C -= d1;
            buf[j][1] = EVC_CLIP3(0, MAX_SAMPLE_VAL_I16, B) as pel;
            buf[j][2] = EVC_CLIP3(0, MAX_SAMPLE_VAL_I16, C) as pel;
        }
        TRACE_DBF(tracer, ch_type, MIN_CU_SIZE >> 1, false, buf);
    }
}
pub fn deblock_scu_ver_chroma ( tracer : & mut Option < Tracer > , buf : & mut PlaneRegionMut < ' _ , pel > , qp : usize , ch_type : usize , tbl_qp_to_st : & [ u8 ] , ) { let st = ( tbl_qp_to_st [ qp ] as i16 ) << ( BIT_DEPTH - 8 ) ; if st != 0 { for j in 0 .. MIN_CU_SIZE >> 1 { let ( mut A , mut B , mut C , mut D ) = ( buf [ j ] [ 0 ] as i16 , buf [ j ] [ 1 ] as i16 , buf [ j ] [ 2 ] as i16 , buf [ j ] [ 3 ] as i16 , ) ; let d = ( A - ( B << 2 ) + ( C << 2 ) - D ) / 8 ; let abs = d . abs ( ) ; let sign = d < 0 ; let t16 = max ( 0 , ( ( abs - st ) << 1 ) ) ; let clip = max ( 0 , ( abs - t16 ) ) ; let d1 = if sign { - clip } else { clip } ; B += d1 ; C -= d1 ; buf [ j ] [ 1 ] = EVC_CLIP3 ( 0 , MAX_SAMPLE_VAL_I16 , B ) as pel ; buf [ j ] [ 2 ] = EVC_CLIP3 ( 0 , MAX_SAMPLE_VAL_I16 , C ) as pel ; } TRACE_DBF ( tracer , ch_type , MIN_CU_SIZE >> 1 , false , buf ) ; } }
TODO: evc_mc_l should be private, but in order to be visible for benchmark,
change it to pub.
TODO : evc_mc_l should be private but in order to be visible for benchmark change it to pub .
tracer
&mut Option<Tracer>
buf
&mut PlaneRegionMut<'_, pel>
qp
usize
ch_type
usize
tbl_qp_to_st
&[u8]
tracer
&mut Option<Tracer>
buf
&mut PlaneRegionMut<'_, pel>
qp
usize
ch_type
usize
tbl_qp_to_st
&[u8]