Commit a33304f0 authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Add VAR_TX_NO_TX_MODE experiment.

This experiment removes the tx_mode flag from the uncompressed frame
 header and instead always uses a constant value.

objective-1-fast:

master@2017-06-29T00:51:22.142Z -> no_tx_mode@2017-06-29T01:09:32.392Z
   PSNR | PSNR Cb | PSNR Cr | PSNR HVS |    SSIM | MS SSIM | CIEDE 2000
-0.0103 |  0.0183 | -0.0076 |  -0.0103 | -0.0052 | -0.0208 |     0.0004

Change-Id: I9d49c4d99ed102e52c86e339f20623063886f49d
parent d8b1ddce
......@@ -149,6 +149,10 @@ static TX_MODE read_tx_mode(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
TX_MODE tx_mode;
#endif
if (cm->all_lossless) return ONLY_4X4;
#if CONFIG_VAR_TX_NO_TX_MODE
(void)rb;
return TX_MODE_SELECT;
#else
#if CONFIG_TX64X64
tx_mode = aom_rb_read_bit(rb) ? TX_MODE_SELECT : aom_rb_read_literal(rb, 2);
if (tx_mode == ALLOW_32X32) tx_mode += aom_rb_read_bit(rb);
......@@ -156,6 +160,7 @@ static TX_MODE read_tx_mode(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
#else
return aom_rb_read_bit(rb) ? TX_MODE_SELECT : aom_rb_read_literal(rb, 2);
#endif // CONFIG_TX64X64
#endif // CONFIG_VAR_TX_NO_TX_MODE
}
#if !CONFIG_EC_ADAPT
......
......@@ -3913,6 +3913,11 @@ static void write_tx_mode(AV1_COMMON *cm, TX_MODE *mode,
*mode = ONLY_4X4;
return;
}
#if CONFIG_VAR_TX_NO_TX_MODE
(void)wb;
*mode = TX_MODE_SELECT;
return;
#else
#if CONFIG_TX64X64
aom_wb_write_bit(wb, *mode == TX_MODE_SELECT);
if (*mode != TX_MODE_SELECT) {
......@@ -3923,6 +3928,7 @@ static void write_tx_mode(AV1_COMMON *cm, TX_MODE *mode,
aom_wb_write_bit(wb, *mode == TX_MODE_SELECT);
if (*mode != TX_MODE_SELECT) aom_wb_write_literal(wb, *mode, 2);
#endif // CONFIG_TX64X64
#endif // CONFIG_VAR_TX_NO_TX_MODE
}
#if !CONFIG_EC_ADAPT
......
......@@ -4532,6 +4532,9 @@ static MV_REFERENCE_FRAME get_frame_type(const AV1_COMP *cpi) {
static TX_MODE select_tx_mode(const AV1_COMP *cpi) {
if (cpi->common.all_lossless) return ONLY_4X4;
#if CONFIG_VAR_TX_NO_TX_MODE
return TX_MODE_SELECT;
#else
if (cpi->sf.tx_size_search_method == USE_LARGESTALL)
return ALLOW_32X32 + CONFIG_TX64X64;
else if (cpi->sf.tx_size_search_method == USE_FULL_RD ||
......@@ -4539,6 +4542,7 @@ static TX_MODE select_tx_mode(const AV1_COMP *cpi) {
return TX_MODE_SELECT;
else
return cpi->common.tx_mode;
#endif // CONFIG_VAR_TX_NO_TX_MODE
}
void av1_init_tile_data(AV1_COMP *cpi) {
......
......@@ -169,4 +169,5 @@ set(CONFIG_LGT 0 CACHE NUMBER "Internal flag.")
set(CONFIG_SBL_SYMBOL 0 CACHE NUMBER "Internal flag.")
set(CONFIG_NCOBMC_ADAPT_WEIGHT 0 CACHE NUMBER "Internal flag.")
set(CONFIG_BGSPRITE 0 CACHE NUMBER "Internal flag.")
set(CONFIG_VAR_TX_NO_TX_MODE 1 CACHE NUMBER "Internal flag.")
set(CONFIG_ANALYZER 0 CACHE NUMBER "Internal flag.")
......@@ -237,6 +237,12 @@ if (CONFIG_ANALYZER)
endif ()
endif ()
if (CONFIG_VAR_TX_NO_TX_MODE AND NOT CONFIG_VAR_TX)
message(WARNING
"--- CONFIG_VAR_TX_NO_TX_MODE requires CONFIG_VAR_TX, disabling.")
set(CONFIG_VAR_TX_NO_TX_MODE 0)
endif()
if (NOT MSVC)
aom_push_var(CMAKE_REQUIRED_LIBRARIES "m")
aom_check_c_compiles("fenv_check"
......
......@@ -330,6 +330,7 @@ EXPERIMENT_LIST="
sbl_symbol
ncobmc_adapt_weight
bgsprite
var_tx_no_tx_mode
"
CONFIG_LIST="
dependency_tracking
......@@ -563,6 +564,10 @@ post_process_cmdline() {
log_echo "disabling reference_buffer"
disable_feature reference_buffer
fi
if enabled var_tx_no_tx_mode && ! enabled var_tx; then
log_echo "var_tx_no_tx_mode requires var_tx, so disabling var_tx_no_tx_mode"
disable_feature var_tx_no_tx_mode
fi
if enabled ext_tile; then
log_echo "ext_tile not compatible with tile_groups, so"
log_echo "disabling tile_groups"
......
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