Another fix for reference building.

This commit is contained in:
siivonek 2021-10-13 14:17:17 +02:00
parent b0a4f3345a
commit eb32f40bd9

View file

@ -713,11 +713,16 @@ void kvz_intra_build_reference_any(
if (px.x == 0) {
// On left border, no need for multi ref index
out_left_ref[0] = out_left_ref[1];
if (px.y == 0) {
out_top_ref[0] = out_left_ref[1];
}
else {
// Fill top reference top left pixels with nearest
kvz_pixel nearest = top_border[0];
for (int i = 0; i <= multi_ref_index; ++i) {
out_top_ref[i] = nearest;
}
}
} else {
// Copy reference clockwise.
out_left_ref[0] = out_left_ref[1];