]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/elbg.c
document some dsp alignments
[ffmpeg] / libavcodec / elbg.c
index 87ff0236b7cd2a2e4ad10f14a739a8d3a2565013..fed25fcdd4bf4d16934f12432f3e6b1484939053 100644 (file)
@@ -306,12 +306,11 @@ 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);
+            if (idx[1] != idx[0] && idx[1] != idx[2])
+                try_shift_candidate(elbg, idx);
         }
 }