Commit 2c6ca5fe authored by Ryan Lei's avatar Ryan Lei

enable parallel_deblocking experiment by default

this change enables parallel_deblocking by default after it has been
officially adopted. the parallel_deblocking_15taps experiment is merged
into the parallel_deblocking experiment so it is removed to clean up
the code. internal compile flags are added to disable 15 tap for both
luma and chroma plane for future experiment purpose. the internal
compile flags are disabled by default.

Change-Id: I1668fd2cb7676d756c52263d6993241618d33ee6
parent 4fe940ad
......@@ -23,6 +23,7 @@
#include "av1/common/seg_common.h"
#define PARALLEL_DEBLOCKING_15TAPLUMAONLY 1
#define PARALLEL_DEBLOCKING_DISABLE_15TAP 0
// 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
......@@ -2034,7 +2035,7 @@ static TX_SIZE av1_get_transform_size(const MODE_INFO *const pCurr,
const uint32_t scaleVert) {
const MB_MODE_INFO *mbmi = &pCurr->mbmi;
const BLOCK_SIZE sb_type = pCurr->mbmi.sb_type;
TX_SIZE tx_size = mbmi->tx_size;
TX_SIZE tx_size;
if (plane == PLANE_TYPE_Y) {
tx_size = mbmi->tx_size;
......@@ -2088,7 +2089,11 @@ static TX_SIZE av1_get_transform_size(const MODE_INFO *const pCurr,
: mb_tx_size;
assert(tx_size < TX_SIZES_ALL);
}
#endif
#else
(void)mi_row;
(void)mi_col;
#endif // CONFIG_VAR_TX
// since in case of chrominance or non-square transorm need to convert
// transform size into transform size in particular direction.
// for vertical edge, filter direction is horizontal, for horizontal
......@@ -2122,10 +2127,7 @@ static void set_lpf_parameters(
if ((width <= x) || (height <= y)) {
return;
}
#if CONFIG_EXT_PARTITION
// not sure if changes are required.
assert(0 && "Not yet updated");
#endif // CONFIG_EXT_PARTITION
const int mi_row = (y << scaleVert) >> MI_SIZE_LOG2;
const int mi_col = (x << scaleHorz) >> MI_SIZE_LOG2;
const MB_MODE_INFO *mbmi = &ppCurr[0]->mbmi;
......@@ -2183,7 +2185,6 @@ static void set_lpf_parameters(
// if the current and the previous blocks are skipped,
// deblock the edge if the edge belongs to a PU's edge only.
if ((currLevel || pvLvl) && (!pvSkip || !currSkipped || puEdge)) {
#if CONFIG_PARALLEL_DEBLOCKING_15TAP || PARALLEL_DEBLOCKING_15TAPLUMAONLY
const TX_SIZE minTs = AOMMIN(ts, pvTs);
if (TX_4X4 >= minTs) {
pParams->filterLength = 4;
......@@ -2193,15 +2194,15 @@ static void set_lpf_parameters(
pParams->filterLength = 16;
#if PARALLEL_DEBLOCKING_15TAPLUMAONLY
// No wide filtering for chroma plane
if (scaleHorz || scaleVert) {
if (plane != 0) {
pParams->filterLength = 8;
}
#endif
}
#else
pParams->filterLength = (TX_4X4 >= AOMMIN(ts, pvTs)) ? (4) : (8);
#endif // CONFIG_PARALLEL_DEBLOCKING_15TAP || PARALLEL_DEBLOCKING_15TAPLUMAONLY
#if PARALLEL_DEBLOCKING_DISABLE_15TAP
pParams->filterLength = (TX_4X4 >= AOMMIN(ts, pvTs)) ? (4) : (8);
#endif // PARALLEL_DEBLOCKING_DISABLE_15TAP
// update the level if the current block is skipped,
// but the previous one is not
......@@ -2283,7 +2284,6 @@ static void av1_filter_block_plane_vert(const AV1_COMMON *const cm,
aom_lpf_vertical_8_c(p, dstStride, params.mblim, params.lim,
params.hev_thr);
break;
#if CONFIG_PARALLEL_DEBLOCKING_15TAP || PARALLEL_DEBLOCKING_15TAPLUMAONLY
// apply 16-tap filtering
case 16:
#if CONFIG_HIGHBITDEPTH
......@@ -2296,7 +2296,6 @@ static void av1_filter_block_plane_vert(const AV1_COMMON *const cm,
aom_lpf_vertical_16_c(p, dstStride, params.mblim, params.lim,
params.hev_thr);
break;
#endif // CONFIG_PARALLEL_DEBLOCKING_15TAP || PARALLEL_DEBLOCKING_15TAPLUMAONLY
// no filtering
default: break;
}
......@@ -2371,7 +2370,6 @@ static void av1_filter_block_plane_horz(const AV1_COMMON *const cm,
aom_lpf_horizontal_8_c(p, dstStride, params.mblim, params.lim,
params.hev_thr);
break;
#if CONFIG_PARALLEL_DEBLOCKING_15TAP || PARALLEL_DEBLOCKING_15TAPLUMAONLY
// apply 16-tap filtering
case 16:
#if CONFIG_HIGHBITDEPTH
......@@ -2384,7 +2382,6 @@ static void av1_filter_block_plane_horz(const AV1_COMMON *const cm,
aom_lpf_horizontal_edge_16_c(p, dstStride, params.mblim, params.lim,
params.hev_thr);
break;
#endif // CONFIG_PARALLEL_DEBLOCKING_15TAP || PARALLEL_DEBLOCKING_15TAPLUMAONLY
// no filtering
default: break;
}
......@@ -2443,10 +2440,6 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm,
}
#else
#if CONFIG_EXT_PARTITION || CONFIG_EXT_PARTITION_TYPES
assert(0 && "Not yet updated. ToDo as next steps");
#endif // CONFIG_EXT_PARTITION || CONFIG_EXT_PARTITION_TYPES
// filter all vertical edges in every 64x64 super block
for (mi_row = start; mi_row < stop; mi_row += MAX_MIB_SIZE) {
MODE_INFO **mi = cm->mi_grid_visible + mi_row * cm->mi_stride;
......
......@@ -137,8 +137,7 @@ set(CONFIG_DELTA_Q 1 CACHE NUMBER "Internal flag.")
set(CONFIG_EXT_DELTA_Q 1 CACHE NUMBER "Internal flag.")
set(CONFIG_ADAPT_SCAN 0 CACHE NUMBER "Internal flag.")
set(CONFIG_FILTER_7BIT 1 CACHE NUMBER "Internal flag.")
set(CONFIG_PARALLEL_DEBLOCKING 0 CACHE NUMBER "Internal flag.")
set(CONFIG_PARALLEL_DEBLOCKING_15TAP 0 CACHE NUMBER "Internal flag.")
set(CONFIG_PARALLEL_DEBLOCKING 1 CACHE NUMBER "Internal flag.")
set(CONFIG_LOOPFILTERING_ACROSS_TILES 1 CACHE NUMBER "Internal flag.")
set(CONFIG_TILE_GROUPS 1 CACHE NUMBER "Internal flag.")
set(CONFIG_TEMPMV_SIGNALING 1 CACHE NUMBER "Internal flag.")
......
......@@ -302,7 +302,6 @@ EXPERIMENT_LIST="
adapt_scan
filter_7bit
parallel_deblocking
parallel_deblocking_15tap
loopfiltering_across_tiles
tile_groups
tempmv_signaling
......@@ -515,6 +514,7 @@ post_process_cmdline() {
soft_enable interintra
soft_enable one_sided_compound
soft_enable smooth_hv
soft_enable parallel_deblocking
# Backwards/jenkins compatibility with --enable-aom-highbitdepth
enabled aom_highbitdepth && enable_feature highbitdepth
......@@ -596,11 +596,6 @@ post_process_cmdline() {
soft_enable accounting
soft_enable inspection
fi
if enabled parallel_deblocking_15tap && ! enabled parallel_deblocking; then
log_echo "parallel_deblocking_15tap dependes on parallel_deblocking, so"
log_echo "enabling parallel_deblocking"
soft_enable parallel_deblocking
fi
}
process_targets() {
......
......@@ -410,7 +410,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
using std::tr1::make_tuple;
#if HAVE_SSE2
#if HAVE_SSE2 && (!CONFIG_PARALLEL_DEBLOCKING)
#if CONFIG_HIGHBITDEPTH
const loop8_param_t kHbdLoop8Test6[] = {
......@@ -478,7 +478,7 @@ INSTANTIATE_TEST_CASE_P(SSE2, Loop8Test6Param,
#endif // CONFIG_HIGHBITDEPTH
#endif
#if HAVE_AVX2 && (!CONFIG_HIGHBITDEPTH)
#if HAVE_AVX2 && (!CONFIG_HIGHBITDEPTH) && (!CONFIG_PARALLEL_DEBLOCKING)
INSTANTIATE_TEST_CASE_P(
AVX2, Loop8Test6Param,
::testing::Values(make_tuple(&aom_lpf_horizontal_edge_8_avx2,
......@@ -487,7 +487,7 @@ INSTANTIATE_TEST_CASE_P(
&aom_lpf_horizontal_edge_16_c, 8)));
#endif
#if HAVE_SSE2
#if HAVE_SSE2 && (!CONFIG_PARALLEL_DEBLOCKING)
#if CONFIG_HIGHBITDEPTH
const dualloop8_param_t kHbdLoop8Test9[] = {
make_tuple(&aom_highbd_lpf_horizontal_4_dual_sse2,
......@@ -531,7 +531,7 @@ INSTANTIATE_TEST_CASE_P(SSE2, Loop8Test9Param,
#endif // CONFIG_HIGHBITDEPTH
#endif
#if HAVE_NEON
#if HAVE_NEON && (!CONFIG_PARALLEL_DEBLOCKING)
#if CONFIG_HIGHBITDEPTH
// No neon high bitdepth functions.
#else
......@@ -567,9 +567,9 @@ INSTANTIATE_TEST_CASE_P(NEON, Loop8Test9Param,
make_tuple(&aom_lpf_vertical_4_dual_neon,
&aom_lpf_vertical_4_dual_c, 8)));
#endif // CONFIG_HIGHBITDEPTH
#endif // HAVE_NEON
#endif // HAVE_NEON && (!CONFIG_PARALLEL_DEBLOCKING)
#if HAVE_DSPR2 && !CONFIG_HIGHBITDEPTH
#if HAVE_DSPR2 && !CONFIG_HIGHBITDEPTH && (!CONFIG_PARALLEL_DEBLOCKING)
INSTANTIATE_TEST_CASE_P(
DSPR2, Loop8Test6Param,
::testing::Values(
......@@ -593,9 +593,9 @@ INSTANTIATE_TEST_CASE_P(
&aom_lpf_vertical_4_dual_c, 8),
make_tuple(&aom_lpf_vertical_8_dual_dspr2,
&aom_lpf_vertical_8_dual_c, 8)));
#endif // HAVE_DSPR2 && !CONFIG_HIGHBITDEPTH
#endif // HAVE_DSPR2 && !CONFIG_HIGHBITDEPTH && (!CONFIG_PARALLEL_DEBLOCKING)
#if HAVE_MSA && (!CONFIG_HIGHBITDEPTH)
#if HAVE_MSA && (!CONFIG_HIGHBITDEPTH) && (!CONFIG_PARALLEL_DEBLOCKING)
INSTANTIATE_TEST_CASE_P(
MSA, Loop8Test6Param,
::testing::Values(
......@@ -619,6 +619,6 @@ INSTANTIATE_TEST_CASE_P(
&aom_lpf_vertical_4_dual_c, 8),
make_tuple(&aom_lpf_vertical_8_dual_msa,
&aom_lpf_vertical_8_dual_c, 8)));
#endif // HAVE_MSA && (!CONFIG_HIGHBITDEPTH)
#endif // HAVE_MSA && (!CONFIG_HIGHBITDEPTH) && (!CONFIG_PARALLEL_DEBLOCKING)
} // namespace
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