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
15
src/search.c
15
src/search.c
|
@ -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]);
|
||||
if (mode_cost < 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]);
|
||||
if (mode_cost < cost) {
|
||||
cost = mode_cost;
|
||||
cur_cu->type = CU_INTRA;
|
||||
}
|
||||
}
|
||||
// Reconstruct best mode
|
||||
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);
|
||||
} else if (cur_cu->type == CU_INTER) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
// Reconstruct best mode
|
||||
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);
|
||||
} else {
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
||||
// Recursively split all the way to max search depth.
|
||||
if (depth < MAX_INTRA_SEARCH_DEPTH || depth < MAX_INTER_SEARCH_DEPTH) {
|
||||
|
|
Loading…
Reference in a new issue