int do_left_mb_v, int do_above_mb_h,
int do_left_mbuv_v, int do_above_mbuv_h,
uint8_t *y_ptr, uint8_t *u_ptr, uint8_t *v_ptr,
- int y_stride, int uv_stride, int dering) {
+ int y_stride, int uv_stride) {
loop_filter_info_n *lfi_n = &cm->lf_info;
struct loop_filter_info lfi;
int mode = mi->mbmi.mode;
y_stride, uv_stride, &lfi);
}
}
- if (dering) {
-#if CONFIG_LOOP_DERING
- vp9_post_proc_down_and_across(y_ptr, y_ptr,
- y_stride, y_stride,
- 16, 16, dering);
- if (u_ptr && v_ptr) {
- vp9_post_proc_down_and_across(u_ptr, u_ptr,
- uv_stride, uv_stride,
- 8, 8, dering);
- vp9_post_proc_down_and_across(v_ptr, v_ptr,
- uv_stride, uv_stride,
- 8, 8, dering);
- }
-#endif
- }
}
}
int mb_row, int mb_col,
uint8_t *y_ptr, uint8_t *u_ptr, uint8_t *v_ptr,
int y_stride, int uv_stride,
- int y_only, int dering) {
+ int y_only) {
BLOCK_SIZE_TYPE sb_type = mode_info_context->mbmi.sb_type;
const int wbl = b_width_log2(sb_type), hbl = b_height_log2(sb_type);
TX_SIZE tx_size = mode_info_context->mbmi.txfm_size;
y_ptr,
y_only? 0 : u_ptr,
y_only? 0 : v_ptr,
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
// process 2nd MB top-right
mi = mode_info_context + 2;
do_left_v = !(wbl >= 3 /* 32x16 or >=32x32 */ && (tx_size >= TX_32X32 ||
y_ptr + 16,
y_only ? 0 : (u_ptr + 8),
y_only ? 0 : (v_ptr + 8),
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
// process 3rd MB bottom-left
mi = mode_info_context + (mis << 1);
y_ptr + 16 * y_stride,
y_only ? 0 : (u_ptr + 8 * uv_stride),
y_only ? 0 : (v_ptr + 8 * uv_stride),
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
// process 4th MB bottom right
mi = mode_info_context + ((mis + 1) << 1);
y_ptr + 16 * y_stride + 16,
y_only ? 0 : (u_ptr + 8 * uv_stride + 8),
y_only ? 0 : (v_ptr + 8 * uv_stride + 8),
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
}
static void lpf_sb64(VP9_COMMON *cm, const MODE_INFO *mode_info_context,
int mb_row, int mb_col,
uint8_t *y_ptr, uint8_t *u_ptr, uint8_t *v_ptr,
int y_stride, int uv_stride,
- int y_only, int dering) {
+ int y_only) {
lpf_sb32(cm, mode_info_context, mb_row, mb_col,
y_ptr, u_ptr, v_ptr,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
lpf_sb32(cm, mode_info_context + 4, mb_row, mb_col + 2,
y_ptr + 32, u_ptr + 16, v_ptr + 16,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
lpf_sb32(cm, mode_info_context + cm->mode_info_stride * 4,
mb_row + 2, mb_col,
y_ptr + 32 * y_stride,
u_ptr + 16 * uv_stride,
v_ptr + 16 * uv_stride,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
lpf_sb32(cm, mode_info_context + cm->mode_info_stride * 4 + 4,
mb_row + 2, mb_col + 2,
y_ptr + 32 * y_stride + 32,
u_ptr + 16 * uv_stride + 16,
v_ptr + 16 * uv_stride + 16,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
}
void vp9_loop_filter_frame(VP9_COMMON *cm,
MACROBLOCKD *xd,
int frame_filter_level,
- int y_only,
- int dering) {
+ int y_only) {
YV12_BUFFER_CONFIG *post = cm->frame_to_show;
int mb_row, mb_col;
const int sb64_rows = cm->mb_rows / 4;
for (mb_col = 0; mb_col < sb64_cols * 4; mb_col += 4) {
lpf_sb64(cm, mode_info_context, mb_row, mb_col,
y_ptr, u_ptr, v_ptr,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
y_ptr += 64;
u_ptr = y_only? 0 : u_ptr + 32;
v_ptr = y_only? 0 : v_ptr + 32;
// process 2 SB32s in the extra SB32 col
lpf_sb32(cm, mode_info_context, mb_row, mb_col,
y_ptr, u_ptr, v_ptr,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
lpf_sb32(cm, mode_info_context + mis * 4,
mb_row + 2, mb_col,
y_ptr + 32 * y_stride,
u_ptr + 16 * uv_stride,
v_ptr + 16 * uv_stride,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
y_ptr += 32;
u_ptr = y_only? 0 : u_ptr + 16;
v_ptr = y_only? 0 : v_ptr + 16;
y_ptr + (k * 16) * y_stride,
y_only ? 0 : (u_ptr + (k * 8) * uv_stride),
y_only ? 0 : (v_ptr + (k * 8) * uv_stride),
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
}
y_ptr += 16;
for (mb_col = 0; mb_col < sb32_cols * 2; mb_col += 2) {
lpf_sb32(cm, mode_info_context, mb_row, mb_col,
y_ptr, u_ptr, v_ptr,
- y_stride, uv_stride, y_only, dering);
+ y_stride, uv_stride, y_only);
y_ptr += 32;
u_ptr = y_only? 0 : u_ptr + 16;
v_ptr = y_only? 0 : v_ptr + 16;
y_ptr,
y_only? NULL : u_ptr,
y_only? NULL : v_ptr,
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
// process 2nd MB
mi = mode_info_context + (mis << 1);
do_left_v = (mb_col > 0);
y_ptr + 16 * y_stride,
y_only ? NULL : (u_ptr + 8 * uv_stride),
y_only ? NULL : (v_ptr + 8 * uv_stride),
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
y_ptr += 16;
u_ptr = y_only? 0 : u_ptr + 8;
v_ptr = y_only? 0 : v_ptr + 8;
y_ptr,
y_only? 0 : u_ptr,
y_only? 0 : v_ptr,
- y_stride, uv_stride, dering);
+ y_stride, uv_stride);
y_ptr += 16;
u_ptr = y_only? 0 : u_ptr + 8;
v_ptr = y_only? 0 : v_ptr + 8;
// Get baseline error score
vp9_set_alt_lf_level(cpi, filt_mid);
- vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_mid, 1, 0);
+ vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_mid, 1);
best_err = vp9_calc_ss_err(sd, cm->frame_to_show);
filt_best = filt_mid;
if ((filt_direction <= 0) && (filt_low != filt_mid)) {
// Get Low filter error score
vp9_set_alt_lf_level(cpi, filt_low);
- vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_low, 1, 0);
+ vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_low, 1);
filt_err = vp9_calc_ss_err(sd, cm->frame_to_show);
// Now look at filt_high
if ((filt_direction >= 0) && (filt_high != filt_mid)) {
vp9_set_alt_lf_level(cpi, filt_high);
- vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_high, 1, 0);
+ vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_high, 1);
filt_err = vp9_calc_ss_err(sd, cm->frame_to_show);
}
cm->filter_level = filt_best;
-
-#if CONFIG_LOOP_DERING
- /* Decide whether to turn on deringing filter */
- { // NOLINT
- int best_dering = 0;
- int this_dering;
- int last_err_diff = INT_MAX;
-
- for (this_dering = 1; this_dering <= 16; this_dering++) {
- vp9_set_alt_lf_level(cpi, filt_best);
- vp9_loop_filter_frame(cm, &cpi->mb.e_mbd, filt_high, 1, this_dering);
- filt_err = vp9_calc_ss_err(sd, cm->frame_to_show);
- vp8_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show);
- if (filt_err < best_err) {
- best_err = filt_err;
- best_dering = this_dering;
- last_err_diff = INT_MAX;
- } else {
- if (filt_err - best_err > last_err_diff)
- break;
- last_err_diff = filt_err - best_err;
- }
- }
- cm->dering_enabled = best_dering;
- }
-#endif
}