Some fixes to quantization and compiler warnings
The bugs affected only the tx64x64 experiment. This patch fixes them. Also fixes some compiler warnings Change-Id: I4cf1e24a4f1fa59831bf29750cf6daa8373e8e8f
This commit is contained in:
parent
9909903229
commit
4c1049d7a8
@ -11,6 +11,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "vp9/common/vp9_palette.h"
|
||||
|
||||
|
@ -491,7 +491,8 @@ void vp9_denoiser_free(VP9_DENOISER *denoiser) {
|
||||
vp9_free_frame_buffer(&denoiser->running_avg_y[i]);
|
||||
}
|
||||
}
|
||||
if (&denoiser->mc_running_avg_y != NULL) {
|
||||
// NOTE: the check below is commented out to fix jenkins compile warning
|
||||
if (1) { // &denoiser->mc_running_avg_y != NULL) {
|
||||
vp9_free_frame_buffer(&denoiser->mc_running_avg_y);
|
||||
}
|
||||
}
|
||||
|
@ -81,8 +81,9 @@ static INLINE void quantize_dc_bigtx(const tran_low_t *coeff_ptr,
|
||||
int tmp, eob = -1;
|
||||
|
||||
if (!skip_block) {
|
||||
|
||||
tmp = clamp(abs_coeff + round_ptr[rc != 0], INT16_MIN, INT16_MAX);
|
||||
tmp = clamp(abs_coeff +
|
||||
ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1 + logsizeby32),
|
||||
INT16_MIN, INT16_MAX);
|
||||
tmp = (tmp * quant) >> (15 - logsizeby32);
|
||||
qcoeff_ptr[rc] = (tmp ^ coeff_sign) - coeff_sign;
|
||||
dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr / (2 << logsizeby32);
|
||||
@ -121,16 +122,17 @@ static INLINE void highbd_quantize_dc_bigtx(const tran_low_t *coeff_ptr,
|
||||
uint16_t *eob_ptr,
|
||||
int logsizeby32) {
|
||||
int eob = -1;
|
||||
|
||||
if (!skip_block) {
|
||||
const int rc = 0;
|
||||
const int coeff = coeff_ptr[rc];
|
||||
const int coeff_sign = (coeff >> 31);
|
||||
const int abs_coeff = (coeff ^ coeff_sign) - coeff_sign;
|
||||
|
||||
const int64_t tmp =
|
||||
(clamp(abs_coeff + round_ptr[rc != 0], INT32_MIN, INT32_MAX) *
|
||||
quant) >> (15 - logsizeby32);
|
||||
int64_t tmp =
|
||||
clamp(abs_coeff +
|
||||
ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1 + logsizeby32),
|
||||
INT32_MIN, INT32_MAX);
|
||||
tmp = (tmp * quant) >> (15 - logsizeby32);
|
||||
qcoeff_ptr[rc] = (tmp ^ coeff_sign) - coeff_sign;
|
||||
dqcoeff_ptr[rc] = qcoeff_ptr[rc] * dequant_ptr / (2 << logsizeby32);
|
||||
if (tmp)
|
||||
@ -288,7 +290,7 @@ static INLINE void quantize_fp_bigtx(const tran_low_t *coeff_ptr,
|
||||
int abs_coeff = (coeff ^ coeff_sign) - coeff_sign;
|
||||
|
||||
if (abs_coeff >= (dequant_ptr[rc != 0] >> (2 + logsizeby32))) {
|
||||
abs_coeff += ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1);
|
||||
abs_coeff += ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1 + logsizeby32);
|
||||
abs_coeff = clamp(abs_coeff, INT16_MIN, INT16_MAX);
|
||||
tmp = (abs_coeff * quant_ptr[rc != 0]) >> (15 - logsizeby32);
|
||||
qcoeff_ptr[rc] = (tmp ^ coeff_sign) - coeff_sign;
|
||||
@ -375,7 +377,8 @@ static INLINE void highbd_quantize_fp_bigtx(const tran_low_t *coeff_ptr,
|
||||
const int abs_coeff = (coeff ^ coeff_sign) - coeff_sign;
|
||||
|
||||
if (abs_coeff >= (dequant_ptr[rc != 0] >> (2 + logsizeby32))) {
|
||||
tmp = clamp(abs_coeff + ROUND_POWER_OF_TWO(round_ptr[rc != 0], 1),
|
||||
tmp = clamp(abs_coeff + ROUND_POWER_OF_TWO(round_ptr[rc != 0],
|
||||
1 + logsizeby32),
|
||||
INT32_MIN, INT32_MAX);
|
||||
tmp = (tmp * quant_ptr[rc != 0]) >> (15 - logsizeby32);
|
||||
qcoeff_ptr[rc] = (tmp ^ coeff_sign) - coeff_sign;
|
||||
@ -611,8 +614,8 @@ static INLINE void quantize_b_bigtx(const tran_low_t *coeff_ptr,
|
||||
const int16_t *scan,
|
||||
const int16_t *iscan,
|
||||
int logsizeby32) {
|
||||
const int zbins[2] = {ROUND_POWER_OF_TWO(zbin_ptr[0], 1),
|
||||
ROUND_POWER_OF_TWO(zbin_ptr[1], 1)};
|
||||
const int zbins[2] = {ROUND_POWER_OF_TWO(zbin_ptr[0], 1 + logsizeby32),
|
||||
ROUND_POWER_OF_TWO(zbin_ptr[1], 1 + logsizeby32)};
|
||||
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||
|
||||
int idx = 0;
|
||||
@ -714,8 +717,8 @@ static INLINE void highbd_quantize_b_bigtx(const tran_low_t *coeff_ptr,
|
||||
const int16_t *scan,
|
||||
const int16_t *iscan,
|
||||
int logsizeby32) {
|
||||
const int zbins[2] = {ROUND_POWER_OF_TWO(zbin_ptr[0], 1),
|
||||
ROUND_POWER_OF_TWO(zbin_ptr[1], 1)};
|
||||
const int zbins[2] = {ROUND_POWER_OF_TWO(zbin_ptr[0], 1 + logsizeby32),
|
||||
ROUND_POWER_OF_TWO(zbin_ptr[1], 1 + logsizeby32)};
|
||||
const int nzbins[2] = {zbins[0] * -1, zbins[1] * -1};
|
||||
|
||||
int idx = 0;
|
||||
|
@ -740,7 +740,6 @@ void projectPointsHomography(double *mat, double *points,
|
||||
}
|
||||
|
||||
int findTranslation(const int np, double *pts1, double *pts2, double *mat) {
|
||||
const int np2 = np * 2;
|
||||
int i;
|
||||
double sx, sy, dx, dy;
|
||||
double sumx, sumy;
|
||||
|
Loading…
x
Reference in New Issue
Block a user