Commit 8494fbb7 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Minor clean ups on trellis quant and new-quant

Change-Id: If6358c7e86d45b517e213c4fbb49a63cf816089f
parent 9d0c03d6
......@@ -36,7 +36,7 @@ static INLINE int quantize_coeff_nuq(
int i, q;
int tmp = clamp(abs_coeff, INT16_MIN, INT16_MAX);
for (i = 0; i < NUQ_KNOTS; i++) {
if (tmp < cuml_bins_ptr[i]) {
if (tmp <= cuml_bins_ptr[i]) {
q = i;
break;
}
......@@ -67,7 +67,7 @@ static INLINE int quantize_coeff_bigtx_nuq(
int i, q;
int tmp = clamp(abs_coeff, INT16_MIN, INT16_MAX);
for (i = 0; i < NUQ_KNOTS; i++) {
if (tmp < ROUND_POWER_OF_TWO(cuml_bins_ptr[i], logsizeby16)) {
if (tmp <= ROUND_POWER_OF_TWO(cuml_bins_ptr[i], logsizeby16)) {
q = i;
break;
}
......@@ -1002,7 +1002,7 @@ static INLINE int highbd_quantize_coeff_nuq(
int i, q;
int64_t tmp = clamp(abs_coeff, INT32_MIN, INT32_MAX);
for (i = 0; i < NUQ_KNOTS; i++) {
if (tmp < cuml_bins_ptr[i]) {
if (tmp <= cuml_bins_ptr[i]) {
q = i;
break;
}
......@@ -1032,7 +1032,7 @@ static INLINE int highbd_quantize_coeff_fp_nuq(
int i, q;
int64_t tmp = clamp(abs_coeff, INT32_MIN, INT32_MAX);
for (i = 0; i < NUQ_KNOTS; i++) {
if (tmp < cuml_bins_ptr[i]) {
if (tmp <= cuml_bins_ptr[i]) {
q = i;
break;
}
......@@ -1061,7 +1061,7 @@ static INLINE int highbd_quantize_coeff_bigtx_fp_nuq(
int i, q;
int64_t tmp = clamp(abs_coeff, INT32_MIN, INT32_MAX);
for (i = 0; i < NUQ_KNOTS; i++) {
if (tmp < ROUND_POWER_OF_TWO(cuml_bins_ptr[i], logsizeby16)) {
if (tmp <= ROUND_POWER_OF_TWO(cuml_bins_ptr[i], logsizeby16)) {
q = i;
break;
}
......@@ -1096,7 +1096,7 @@ static INLINE int highbd_quantize_coeff_bigtx_nuq(
int i, q;
int64_t tmp = clamp(abs_coeff, INT32_MIN, INT32_MAX);
for (i = 0; i < NUQ_KNOTS; i++) {
if (tmp < ROUND_POWER_OF_TWO(cuml_bins_ptr[i], logsizeby16)) {
if (tmp <= ROUND_POWER_OF_TWO(cuml_bins_ptr[i], logsizeby16)) {
q = i;
break;
}
......
......@@ -28,13 +28,6 @@
extern "C" {
#endif
// Setting this to 1 will disable trellis optimization within the
// transform search. Trellis optimization will still be applied
// in the final encode.
#ifndef DISABLE_TRELLISQ_SEARCH
#define DISABLE_TRELLISQ_SEARCH 0
#endif
struct TileInfo;
struct macroblock;
struct RD_STATS;
......
......@@ -17,6 +17,11 @@
#include "aom_dsp/aom_dsp_common.h"
// Setting this to 1 will disable trellis optimization within the
// transform search. Trellis optimization will still be applied
// in the final encode.
#define DISABLE_TRELLISQ_SEARCH 0
#define MAX_MESH_SPEED 5 // Max speed setting for mesh motion method
static MESH_PATTERN
good_quality_mesh_patterns[MAX_MESH_SPEED + 1][MAX_MESH_STEP] = {
......@@ -578,7 +583,7 @@ void av1_set_speed_features_framesize_independent(AV1_COMP *cpi) {
cpi->find_fractional_mv_step = av1_find_best_sub_pixel_tree_pruned_evenmore;
}
x->optimize = sf->optimize_coefficients && oxcf->pass != 1;
x->optimize = oxcf->pass != 1 ? sf->optimize_coefficients : NO_TRELLIS_OPT;
#if CONFIG_AOM_QM
// FIXME: trellis not very efficient for quantisation matrices
if (cm->using_qmatrix) x->optimize = 0;
......
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