mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fixed CU type initialization and PU index calculations
This commit is contained in:
parent
c05e91472d
commit
f1882a0d82
|
@ -1875,7 +1875,7 @@ void encode_transform_tree(encoder_control* encoder, int32_t x, int32_t y, uint8
|
|||
|
||||
if(cur_cu->type == CU_INTRA)
|
||||
{
|
||||
int pu_index = x_pu + 2 * (y_pu);
|
||||
int pu_index = x_pu&1 + 2 * (y_pu&1);
|
||||
int luma_mode = cur_cu->intra[pu_index].mode;
|
||||
scan_idx_luma = SCAN_DIAG;
|
||||
|
||||
|
@ -1960,7 +1960,7 @@ void encode_transform_tree(encoder_control* encoder, int32_t x, int32_t y, uint8
|
|||
cur_cu->coeff_top_y[d] = 1;
|
||||
}
|
||||
} else {
|
||||
int pu_index = x_pu + 2 * y_pu;
|
||||
int pu_index = x_pu&1 + 2 * (y_pu&1);
|
||||
cur_cu->coeff_top_y[depth + pu_index] = 1;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -100,7 +100,7 @@ pixel intra_get_dc_pred(pixel *pic, uint16_t picwidth, uint8_t width)
|
|||
return (pixel)((sum + width) / (width + width));
|
||||
}
|
||||
|
||||
#define PU_INDEX(x_pu, y_pu) (((x_pu) % 2) + 2 * (y_pu % 2))
|
||||
#define PU_INDEX(x_pu, y_pu) (((x_pu) % 2) + 2 * ((y_pu) % 2))
|
||||
|
||||
/**
|
||||
* \brief Function for deriving intra luma predictions
|
||||
|
|
|
@ -576,7 +576,7 @@ static int search_cu(encoder_control *encoder, int x, int y, int depth, lcu_t wo
|
|||
cur_cu = &(&work_tree[depth])->cu[LCU_CU_OFFSET+(x_local>>3) + (y_local>>3)*LCU_T_CU_WIDTH];
|
||||
// Assign correct depth
|
||||
cur_cu->depth = depth; cur_cu->tr_depth = depth;
|
||||
|
||||
cur_cu->type = CU_NOTSET; cur_cu->part_size = SIZE_2Nx2N;
|
||||
// If the CU is completely inside the frame at this depth, search for
|
||||
// prediction modes at this depth.
|
||||
if (x + cu_width <= encoder->in.width &&
|
||||
|
|
Loading…
Reference in a new issue