From ca0c51f05f6238a68fbc33efedef4e6ec7f0b56d Mon Sep 17 00:00:00 2001 From: Johann Date: Fri, 3 Mar 2023 12:46:01 +0900 Subject: [PATCH] Revert "Allow macroblock_plane to have its own rounding buffer" This reverts commit 5359ae810cdbb974060297ecf935183baf7b009b. Reason for revert: Blocks quantize cleanups Original change's description: > Allow macroblock_plane to have its own rounding buffer > > Add 8 bytes buffer to macroblock_plane to support rounding factor. > > Change-Id: I3751689e4449c0caea28d3acf6cd17d7f39508ed Change-Id: Ia2424d2114207370f0b45350313a5ff8521d25a8 --- vp9/encoder/vp9_block.h | 2 +- vp9/encoder/vp9_quantize.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/vp9/encoder/vp9_block.h b/vp9/encoder/vp9_block.h index 1786952..3e2c9a3 100644 --- a/vp9/encoder/vp9_block.h +++ b/vp9/encoder/vp9_block.h @@ -34,7 +34,7 @@ struct macroblock_plane { struct buf_2d src; // Quantizer setings - DECLARE_ALIGNED(16, int16_t, round_fp[8]); + int16_t *round_fp; int16_t *quant_fp; int16_t *quant; int16_t *quant_shift; diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c index dcc4444..115c667 100644 --- a/vp9/encoder/vp9_quantize.c +++ b/vp9/encoder/vp9_quantize.c @@ -249,8 +249,7 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) { // Y x->plane[0].quant = quants->y_quant[qindex]; x->plane[0].quant_fp = quants->y_quant_fp[qindex]; - memcpy(x->plane[0].round_fp, quants->y_round_fp[qindex], - 8 * sizeof(*(x->plane[0].round_fp))); + x->plane[0].round_fp = quants->y_round_fp[qindex]; x->plane[0].quant_shift = quants->y_quant_shift[qindex]; x->plane[0].zbin = quants->y_zbin[qindex]; x->plane[0].round = quants->y_round[qindex]; @@ -262,8 +261,7 @@ void vp9_init_plane_quantizers(VP9_COMP *cpi, MACROBLOCK *x) { for (i = 1; i < 3; i++) { x->plane[i].quant = quants->uv_quant[qindex]; x->plane[i].quant_fp = quants->uv_quant_fp[qindex]; - memcpy(x->plane[i].round_fp, quants->uv_round_fp[qindex], - 8 * sizeof(*(x->plane[i].round_fp))); + x->plane[i].round_fp = quants->uv_round_fp[qindex]; x->plane[i].quant_shift = quants->uv_quant_shift[qindex]; x->plane[i].zbin = quants->uv_zbin[qindex]; x->plane[i].round = quants->uv_round[qindex]; -- 2.7.4