mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fixed quant to select table according to block type
This commit is contained in:
parent
c9cf75775b
commit
bb9ac4f03b
|
@ -756,7 +756,7 @@ void itransform2d(int16_t *block,int16_t *coeff, int8_t block_size, int32_t mode
|
|||
*
|
||||
*/
|
||||
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 )
|
||||
int32_t height, uint32_t *ac_sum, int8_t type, int8_t scan_idx, int8_t block_type )
|
||||
{
|
||||
int8_t use_rdo_q_for_transform_skip = 0;
|
||||
uint32_t log2_block_size = g_convert_to_bit[ width ] + 2;
|
||||
|
@ -786,7 +786,7 @@ void quant(encoder_control *encoder, int16_t *coef, int16_t *q_coef, int32_t wid
|
|||
int32_t n;
|
||||
uint32_t dir = 0;
|
||||
uint32_t log2_tr_size = g_convert_to_bit[ width ] + 2;
|
||||
int32_t scalinglist_type = 3 + (int8_t)("\0\3\1\2"[type]);
|
||||
int32_t scalinglist_type = (block_type == CU_INTRA ? 1 : 3) + (int8_t)("\0\3\1\2"[type]);
|
||||
|
||||
int32_t *quant_coeff = g_quant_coeff[log2_tr_size-2][scalinglist_type][qp_scaled%6];
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ extern const uint8_t g_chroma_scale[58];
|
|||
|
||||
|
||||
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 );
|
||||
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 transform2d(int16_t *block,int16_t *coeff, int8_t block_size, int32_t mode);
|
||||
|
|
Loading…
Reference in a new issue