mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-28 03:34:06 +00:00
Fix calculating reference CU index in inter search
Fixes a possible segfault when SMP or AMP blocks are used.
This commit is contained in:
parent
f4538ab474
commit
d6a3e02f16
|
@ -1086,7 +1086,7 @@ static void search_pu_inter_ref(const encoder_state_t * const state,
|
||||||
};
|
};
|
||||||
const vector2d_t frame_cu = {
|
const vector2d_t frame_cu = {
|
||||||
(frame_px.x + (width >> 1)) >> MIN_SIZE,
|
(frame_px.x + (width >> 1)) >> MIN_SIZE,
|
||||||
(frame_px.y + (width >> 1)) >> MIN_SIZE
|
(frame_px.y + (height >> 1)) >> MIN_SIZE
|
||||||
};
|
};
|
||||||
const cu_info_t *ref_cu_array = state->global->ref->cu_arrays[ref_idx]->data;
|
const cu_info_t *ref_cu_array = state->global->ref->cu_arrays[ref_idx]->data;
|
||||||
const int width_in_scu = frame->width_in_lcu << MAX_DEPTH;
|
const int width_in_scu = frame->width_in_lcu << MAX_DEPTH;
|
||||||
|
|
Loading…
Reference in a new issue