mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-30 20:54:07 +00:00
[LMCS] free source_lmcs and rec_lmcs in encoder_state_encode (as done with normal source and rec)
This commit is contained in:
parent
1b8c8b2c68
commit
e9044bfbc5
|
@ -1105,10 +1105,15 @@ static void encoder_state_encode(encoder_state_t * const main_state) {
|
||||||
width,
|
width,
|
||||||
height
|
height
|
||||||
);
|
);
|
||||||
sub_state->tile->frame->source_lmcs = sub_state->tile->frame->source;
|
|
||||||
sub_state->tile->frame->rec_lmcs = sub_state->tile->frame->rec;
|
|
||||||
|
|
||||||
if (sub_state->encoder_control->cfg.lmcs_enable) {
|
if (sub_state->encoder_control->cfg.lmcs_enable) {
|
||||||
|
kvz_image_free(sub_state->tile->frame->source_lmcs);
|
||||||
|
sub_state->tile->frame->source_lmcs = NULL;
|
||||||
|
|
||||||
|
kvz_image_free(sub_state->tile->frame->rec_lmcs);
|
||||||
|
sub_state->tile->frame->rec_lmcs = NULL;
|
||||||
|
|
||||||
sub_state->tile->frame->source_lmcs = kvz_image_make_subimage(
|
sub_state->tile->frame->source_lmcs = kvz_image_make_subimage(
|
||||||
main_state->tile->frame->source_lmcs,
|
main_state->tile->frame->source_lmcs,
|
||||||
offset_x,
|
offset_x,
|
||||||
|
@ -1125,6 +1130,9 @@ static void encoder_state_encode(encoder_state_t * const main_state) {
|
||||||
);
|
);
|
||||||
|
|
||||||
sub_state->tile->frame->source_lmcs_mapped = true;
|
sub_state->tile->frame->source_lmcs_mapped = true;
|
||||||
|
} else {
|
||||||
|
sub_state->tile->frame->source_lmcs = sub_state->tile->frame->source;
|
||||||
|
sub_state->tile->frame->rec_lmcs = sub_state->tile->frame->rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_state->tile->frame->cu_array = kvz_cu_subarray(
|
sub_state->tile->frame->cu_array = kvz_cu_subarray(
|
||||||
|
|
Loading…
Reference in a new issue