mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 10:34:05 +00:00
Fix uninitialized sao_info structure members, which was creating false positive when checkpointing SAO
This commit is contained in:
parent
f371bdafc3
commit
ae4dc4eb44
|
@ -301,6 +301,9 @@ static void encoder_state_worker_encode_lcu(void * opaque) {
|
|||
sao_luma->merge_left_flag = sao_luma->merge_left_flag & sao_chroma->merge_left_flag;
|
||||
sao_luma->merge_up_flag = sao_luma->merge_up_flag & sao_chroma->merge_up_flag;
|
||||
|
||||
assert(sao_luma->eo_class < SAO_NUM_EO);
|
||||
assert(sao_chroma->eo_class < SAO_NUM_EO);
|
||||
|
||||
CHECKPOINT_SAO_INFO("sao_luma", *sao_luma);
|
||||
CHECKPOINT_SAO_INFO("sao_chroma", *sao_chroma);
|
||||
}
|
||||
|
|
|
@ -737,6 +737,14 @@ static void sao_search_best_mode(const encoder_state * const encoder_state, cons
|
|||
{
|
||||
sao_info edge_sao;
|
||||
sao_info band_sao;
|
||||
|
||||
//Avoid "random" uninitialized value
|
||||
edge_sao.band_position = 0;
|
||||
edge_sao.eo_class = SAO_EO0;
|
||||
band_sao.offsets[0] = 0;
|
||||
band_sao.eo_class = SAO_EO0;
|
||||
//memset(&edge_sao, 0, sizeof(sao_info));
|
||||
//memset(&band_sao, 0, sizeof(sao_info));
|
||||
|
||||
sao_search_edge_sao(encoder_state, data, recdata, block_width, block_height, buf_cnt, &edge_sao, sao_top, sao_left);
|
||||
sao_search_band_sao(encoder_state, data, recdata, block_width, block_height, buf_cnt, &band_sao, sao_top, sao_left);
|
||||
|
|
Loading…
Reference in a new issue