mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Added cu->inter.mv_ref_coded variable
This commit is contained in:
parent
ec02642cc8
commit
eba298e635
1
src/cu.h
1
src/cu.h
|
@ -63,6 +63,7 @@ typedef struct
|
|||
int16_t mvd[2];
|
||||
uint8_t mv_cand; // \brief selected MV candidate
|
||||
uint8_t mv_ref; // \brief Index of the encoder_control.ref array.
|
||||
uint8_t mv_ref_coded; // \brief Coded and corrected index of ref picture
|
||||
uint8_t mv_dir; // \brief Probably describes if mv_ref is forward, backward or both. Might not be needed?
|
||||
int8_t mode;
|
||||
} cu_info_inter;
|
||||
|
|
|
@ -1198,7 +1198,7 @@ void encode_coding_tree(encoder_state * const encoder_state,
|
|||
if (cur_cu->inter.mv_dir & (1 << ref_list_idx)) {
|
||||
if (ref_list[ref_list_idx] != 1) { //encoder_state->ref_idx_num[uiRefListIdx] != 1)//NumRefIdx != 1)
|
||||
// parseRefFrmIdx
|
||||
int32_t ref_frame = cur_cu->inter.mv_ref;
|
||||
int32_t ref_frame = cur_cu->inter.mv_ref_coded;
|
||||
|
||||
cabac->cur_ctx = &(cabac->ctx.cu_ref_pic_model[0]);
|
||||
CABAC_BIN(cabac, (ref_frame != 0), "ref_frame_flag");
|
||||
|
|
|
@ -60,6 +60,7 @@ void inter_set_block(videoframe* frame, uint32_t x_cu, uint32_t y_cu, uint8_t de
|
|||
cu->inter.mv[1] = cur_cu->inter.mv[1];
|
||||
cu->inter.mv_dir = cur_cu->inter.mv_dir;
|
||||
cu->inter.mv_ref = cur_cu->inter.mv_ref;
|
||||
cu->inter.mv_ref_coded = cur_cu->inter.mv_ref_coded;
|
||||
cu->tr_depth = tr_depth;
|
||||
}
|
||||
}
|
||||
|
|
12
src/search.c
12
src/search.c
|
@ -702,17 +702,17 @@ static int search_cu_inter(const encoder_state * const encoder_state, int x, int
|
|||
int j, ref_list[2] = { 0, 0 };
|
||||
for (j = 0; j < encoder_state->global->ref->used_size; j++) {
|
||||
if (encoder_state->global->ref->images[j]->poc < encoder_state->global->poc) {
|
||||
ref_list[0]++;
|
||||
if (ref_idx == j) {
|
||||
cur_cu->inter.mv_dir = 1;
|
||||
cur_cu->inter.mv_ref = ref_list[0];
|
||||
cur_cu->inter.mv_dir = 1;
|
||||
cur_cu->inter.mv_ref_coded = ref_list[0];
|
||||
}
|
||||
} else {
|
||||
ref_list[1]++;
|
||||
ref_list[0]++;
|
||||
} else {
|
||||
if (ref_idx == j) {
|
||||
cur_cu->inter.mv_dir = 2;
|
||||
cur_cu->inter.mv_ref = ref_list[1];
|
||||
cur_cu->inter.mv_ref_coded = ref_list[1];
|
||||
}
|
||||
ref_list[1]++;
|
||||
}
|
||||
}
|
||||
cur_cu->merged = merged;
|
||||
|
|
Loading…
Reference in a new issue