mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fixed dequantization of inter-blocks
This commit is contained in:
parent
bc815e8cd2
commit
3d8e14f58b
|
@ -1573,7 +1573,7 @@ void encode_transform_tree(encoder_control *encoder, transform_info *ti,
|
||||||
// if non-zero coeffs
|
// if non-zero coeffs
|
||||||
if (cb_y) {
|
if (cb_y) {
|
||||||
// RECONSTRUCT for predictions
|
// RECONSTRUCT for predictions
|
||||||
dequant(encoder, coeff_y, pre_quant_coeff, width, width, 0);
|
dequant(encoder, coeff_y, pre_quant_coeff, width, width, 0, ti->block_type);
|
||||||
itransform2d(block,pre_quant_coeff,width,0);
|
itransform2d(block,pre_quant_coeff,width,0);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -1646,7 +1646,7 @@ void encode_transform_tree(encoder_control *encoder, transform_info *ti,
|
||||||
|
|
||||||
if (cb_u) {
|
if (cb_u) {
|
||||||
// RECONSTRUCT for predictions
|
// RECONSTRUCT for predictions
|
||||||
dequant(encoder, coeff_u, pre_quant_coeff, width >> 1, width >> 1, 2);
|
dequant(encoder, coeff_u, pre_quant_coeff, width >> 1, width >> 1, 2, ti->block_type);
|
||||||
itransform2d(block,pre_quant_coeff,LCU_WIDTH>>(depth+1),65535);
|
itransform2d(block,pre_quant_coeff,LCU_WIDTH>>(depth+1),65535);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -1672,7 +1672,7 @@ void encode_transform_tree(encoder_control *encoder, transform_info *ti,
|
||||||
|
|
||||||
if (cb_v) {
|
if (cb_v) {
|
||||||
// RECONSTRUCT for predictions
|
// RECONSTRUCT for predictions
|
||||||
dequant(encoder, coeff_v, pre_quant_coeff, width >> 1, width >> 1, 3);
|
dequant(encoder, coeff_v, pre_quant_coeff, width >> 1, width >> 1, 3, ti->block_type);
|
||||||
itransform2d(block,pre_quant_coeff,LCU_WIDTH>>(depth+1),65535);
|
itransform2d(block,pre_quant_coeff,LCU_WIDTH>>(depth+1),65535);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
|
@ -903,7 +903,7 @@ void quant(encoder_control *encoder, int16_t *coef, int16_t *q_coef, int32_t wid
|
||||||
* \brief inverse quantize transformed and quantized coefficents
|
* \brief inverse quantize transformed and quantized coefficents
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void dequant(encoder_control *encoder, int16_t *q_coef, int16_t *coef, int32_t width, int32_t height,int8_t type)
|
void dequant(encoder_control *encoder, int16_t *q_coef, int16_t *coef, int32_t width, int32_t height,int8_t type, int8_t block_type)
|
||||||
{
|
{
|
||||||
int32_t shift,add,coeff_q;
|
int32_t shift,add,coeff_q;
|
||||||
uint32_t log2_tr_size = g_convert_to_bit[ width ] + 2;
|
uint32_t log2_tr_size = g_convert_to_bit[ width ] + 2;
|
||||||
|
@ -912,7 +912,7 @@ void dequant(encoder_control *encoder, int16_t *q_coef, int16_t *coef, int32_t w
|
||||||
int32_t transform_shift = 15 - g_bitdepth - (g_convert_to_bit[ width ] + 2);
|
int32_t transform_shift = 15 - g_bitdepth - (g_convert_to_bit[ width ] + 2);
|
||||||
int32_t qp_scaled;
|
int32_t qp_scaled;
|
||||||
int32_t qp_base = encoder->QP;
|
int32_t qp_base = encoder->QP;
|
||||||
int32_t scalinglist_type = (/*pcCU->isintra(uiAbsPartIdx)*/1 ? 0 : 3) + (int8_t)("\0\3\1\2"[type]);
|
int32_t scalinglist_type = (block_type == CU_INTRA ? 0 : 3) + (int8_t)("\0\3\1\2"[type]);
|
||||||
int32_t *dequant_coef;
|
int32_t *dequant_coef;
|
||||||
|
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ extern const uint8_t g_chroma_scale[58];
|
||||||
|
|
||||||
void quant(encoder_control *encoder, int16_t *coef, int16_t *q_coef, int32_t width,
|
void quant(encoder_control *encoder, int16_t *coef, int16_t *q_coef, int32_t width,
|
||||||
int32_t height, uint32_t *ac_sum, int8_t type, int8_t scan_idx, int8_t block_type);
|
int32_t height, uint32_t *ac_sum, int8_t type, int8_t scan_idx, int8_t block_type);
|
||||||
void dequant(encoder_control *encoder, int16_t *q_coef, int16_t *coef, int32_t width, int32_t height,int8_t type);
|
void dequant(encoder_control *encoder, int16_t *q_coef, int16_t *coef, int32_t width, int32_t height,int8_t type, int8_t block_type);
|
||||||
|
|
||||||
void transform2d(int16_t *block,int16_t *coeff, int8_t block_size, int32_t mode);
|
void transform2d(int16_t *block,int16_t *coeff, int8_t block_size, int32_t mode);
|
||||||
void itransform2d(int16_t *block,int16_t *coeff, int8_t block_size, int32_t mode);
|
void itransform2d(int16_t *block,int16_t *coeff, int8_t block_size, int32_t mode);
|
||||||
|
|
Loading…
Reference in a new issue