My commit at r14340 was not the right solution. For a monochromatic
frame, there will be only one centroid and it will be impossible to find three distinct ones. It is better to just avoid shifting if there are not three different centroids. Originally committed as revision 14343 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -306,12 +306,11 @@ static void do_shiftings(elbg_data *elbg)
|
|||||||
if (elbg->utility_inc[elbg->numCB-1] == 0)
|
if (elbg->utility_inc[elbg->numCB-1] == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
idx[1] = get_high_utility_cell(elbg);
|
||||||
idx[2] = get_closest_codebook(elbg, idx[0]);
|
idx[2] = get_closest_codebook(elbg, idx[0]);
|
||||||
do {
|
|
||||||
idx[1] = get_high_utility_cell(elbg);
|
|
||||||
} while (idx[1] == idx[0] || idx[1] == idx[2]);
|
|
||||||
|
|
||||||
try_shift_candidate(elbg, idx);
|
if (idx[1] != idx[0] && idx[1] != idx[2])
|
||||||
|
try_shift_candidate(elbg, idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user