Commit 4ce85214 authored by Ola Hugosson's avatar Ola Hugosson Committed by Ola Hugosson

Add deblock_13tap experiment

This change enables using 13 taps for luma plane deblocking and 5 taps for
chroma plane deblocking when pixels are in flat area.

The aim for the experiment is to make sure that luma line 57 and chroma
line 29 of the current superblock is not changed by the deblocking process
of the superblock below. Previously this was already the case for luma
line 56 and chroma line 28 (but not for 57 and 29).

This experiment is part of an effort to reduce the overall line buffer
size for DEBLOCK+CDEF+LR. With this change it is possible to CDEF line
-8 to +55 direcly on the output of deblock (which require line +56 and
+57 to be final).

Change-Id: I7779a08d6ad5683bf35c3372b1526786eaac8472
parent df48d293
This diff is collapsed.
......@@ -277,6 +277,29 @@ static int pick_min_grad_direct(uint8_t *const src, int length, int row,
#define PARALLEL_DEBLOCKING_15TAPLUMAONLY 1
#define PARALLEL_DEBLOCKING_DISABLE_15TAP 0
#if CONFIG_DEBLOCK_13TAP
#define PARALLEL_DEBLOCKING_5_TAP_CHROMA 1
#else
#define PARALLEL_DEBLOCKING_5_TAP_CHROMA 0
#endif
#if PARALLEL_DEBLOCKING_5_TAP_CHROMA
extern void aom_lpf_vertical_6_c(uint8_t *s, int pitch, const uint8_t *blimit,
const uint8_t *limit, const uint8_t *thresh);
extern void aom_lpf_horizontal_6_c(uint8_t *s, int p, const uint8_t *blimit,
const uint8_t *limit, const uint8_t *thresh);
extern void aom_highbd_lpf_horizontal_6_c(uint16_t *s, int p,
const uint8_t *blimit,
const uint8_t *limit,
const uint8_t *thresh, int bd);
extern void aom_highbd_lpf_vertical_6_c(uint16_t *s, int pitch,
const uint8_t *blimit,
const uint8_t *limit,
const uint8_t *thresh, int bd);
#endif
// 64 bit masks for left transform size. Each 1 represents a position where
// we should apply a loop filter across the left border of an 8x8 block
......@@ -2958,7 +2981,11 @@ static void set_lpf_parameters(
#if PARALLEL_DEBLOCKING_15TAPLUMAONLY
// No wide filtering for chroma plane
if (plane != 0) {
#if PARALLEL_DEBLOCKING_5_TAP_CHROMA
params->filter_length = 6;
#else
params->filter_length = 8;
#endif
}
#endif
}
......@@ -3144,6 +3171,20 @@ static void av1_filter_block_plane_vert(
aom_lpf_vertical_4(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
break;
#if PARALLEL_DEBLOCKING_5_TAP_CHROMA
case 6: // apply 6-tap filter for chroma plane only
assert(plane != 0);
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth)
aom_highbd_lpf_vertical_6_c(CONVERT_TO_SHORTPTR(p), dst_stride,
params.mblim, params.lim,
params.hev_thr, cm->bit_depth);
else
#endif // CONFIG_HIGHBITDEPTH
aom_lpf_vertical_6_c(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
break;
#endif
// apply 8-tap filtering
case 8:
#if CONFIG_HIGHBITDEPTH
......@@ -3160,13 +3201,25 @@ static void av1_filter_block_plane_vert(
case 16:
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth)
#if CONFIG_DEBLOCK_13TAP
// TODO(olah): Remove _c once SIMD for 13-tap is available
aom_highbd_lpf_vertical_16_c(CONVERT_TO_SHORTPTR(p), dst_stride,
params.mblim, params.lim,
params.hev_thr, cm->bit_depth);
#else
aom_highbd_lpf_vertical_16(CONVERT_TO_SHORTPTR(p), dst_stride,
params.mblim, params.lim, params.hev_thr,
cm->bit_depth);
#endif
else
#endif // CONFIG_HIGHBITDEPTH
aom_lpf_vertical_16(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
#if CONFIG_DEBLOCK_13TAP
aom_lpf_vertical_16_c(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
#else
aom_lpf_vertical_16(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
#endif
break;
// no filtering
default: break;
......@@ -3341,6 +3394,20 @@ static void av1_filter_block_plane_horz(
aom_lpf_horizontal_4(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
break;
#if PARALLEL_DEBLOCKING_5_TAP_CHROMA
// apply 6-tap filtering
case 6: assert(plane != 0);
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth)
aom_highbd_lpf_horizontal_6_c(CONVERT_TO_SHORTPTR(p), dst_stride,
params.mblim, params.lim,
params.hev_thr, cm->bit_depth);
else
#endif // CONFIG_HIGHBITDEPTH
aom_lpf_horizontal_6_c(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
break;
#endif
// apply 8-tap filtering
case 8:
#if CONFIG_HIGHBITDEPTH
......@@ -3357,13 +3424,25 @@ static void av1_filter_block_plane_horz(
case 16:
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth)
#if CONFIG_DEBLOCK_13TAP
// TODO(olah): Remove _c once SIMD for 13-tap is available
aom_highbd_lpf_horizontal_edge_16_c(
CONVERT_TO_SHORTPTR(p), dst_stride, params.mblim, params.lim,
params.hev_thr, cm->bit_depth);
#else
aom_highbd_lpf_horizontal_edge_16(
CONVERT_TO_SHORTPTR(p), dst_stride, params.mblim, params.lim,
params.hev_thr, cm->bit_depth);
#endif
else
#endif // CONFIG_HIGHBITDEPTH
aom_lpf_horizontal_edge_16(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
#if CONFIG_DEBLOCK_13TAP
aom_lpf_horizontal_edge_16_c(p, dst_stride, params.mblim,
params.lim, params.hev_thr);
#else
aom_lpf_horizontal_edge_16(p, dst_stride, params.mblim, params.lim,
params.hev_thr);
#endif
break;
// no filtering
default: break;
......
......@@ -128,6 +128,7 @@ set(CONFIG_DAALA_DCT64 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DAALA_DCT8 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DAALA_TX 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DCT_ONLY 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DEBLOCK_13TAP 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DELTA_Q 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DEPENDENT_HORZTILES 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_DIST_8X8 1 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -307,6 +307,7 @@ EXPERIMENT_LIST="
adapt_scan
filter_7bit
parallel_deblocking
deblock_13tap
loopfiltering_across_tiles
tempmv_signaling
rd_debug
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment