Commit 5f75185e authored by vitor's avatar vitor

My commit at r14340 was not the right solution. For a monocromatic

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14343 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 09c31b39
......@@ -306,11 +306,10 @@ static void do_shiftings(elbg_data *elbg)
if (elbg->utility_inc[elbg->numCB-1] == 0)
return;
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]);
idx[2] = get_closest_codebook(elbg, idx[0]);
if (idx[1] != idx[0] && idx[1] != idx[2])
try_shift_candidate(elbg, idx);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment