mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Fixed cu type definition and reconstruction function calling
reconstruction could have been called when no search was done
This commit is contained in:
parent
879c355d9d
commit
8ae453551d
|
@ -545,6 +545,7 @@ static int search_cu(encoder_control *encoder, int x, int y, int depth, lcu_t wo
|
||||||
int mode_cost = search_cu_inter(encoder, x, y, depth, work_tree[depth]);
|
int mode_cost = search_cu_inter(encoder, x, y, depth, work_tree[depth]);
|
||||||
if (mode_cost < cost) {
|
if (mode_cost < cost) {
|
||||||
cost = mode_cost;
|
cost = mode_cost;
|
||||||
|
cur_cu->type = CU_INTER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,15 +555,17 @@ static int search_cu(encoder_control *encoder, int x, int y, int depth, lcu_t wo
|
||||||
int mode_cost = search_cu_intra(encoder, x, y, depth, &work_tree[depth]);
|
int mode_cost = search_cu_intra(encoder, x, y, depth, &work_tree[depth]);
|
||||||
if (mode_cost < cost) {
|
if (mode_cost < cost) {
|
||||||
cost = mode_cost;
|
cost = mode_cost;
|
||||||
}
|
cur_cu->type = CU_INTRA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Reconstruct best mode
|
// Reconstruct best mode
|
||||||
if(cur_cu->type == CU_INTRA) {
|
if (cur_cu->type == CU_INTRA) {
|
||||||
intra_recon_lcu(encoder, x, y, depth,&work_tree[depth],encoder->in.cur_pic->width,encoder->in.cur_pic->height);
|
intra_recon_lcu(encoder, x, y, depth,&work_tree[depth],encoder->in.cur_pic->width,encoder->in.cur_pic->height);
|
||||||
} else {
|
} else if (cur_cu->type == CU_INTER) {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Recursively split all the way to max search depth.
|
// Recursively split all the way to max search depth.
|
||||||
if (depth < MAX_INTRA_SEARCH_DEPTH || depth < MAX_INTER_SEARCH_DEPTH) {
|
if (depth < MAX_INTRA_SEARCH_DEPTH || depth < MAX_INTER_SEARCH_DEPTH) {
|
||||||
|
|
Loading…
Reference in a new issue