mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
The codebook generator algorithm involves picking three
different codebook centroids ("high utility", "low utility" and "closest to the low utility one"). This change avoid the corner case of choosing two times the same centroid. Originally committed as revision 14340 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
26b86e47c0
commit
5916af1954
@ -299,8 +299,10 @@ static void do_shiftings(elbg_data *elbg)
|
||||
if (elbg->utility_inc[elbg->numCB-1] == 0)
|
||||
return;
|
||||
|
||||
idx[1] = get_high_utility_cell(elbg);
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user