[FFmpeg-cvslog] lavfi/paletteuse: fix debug_accuracy after aba926e7d

Clément Bœsch git at videolan.org
Sat Oct 28 19:03:42 EEST 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Oct 28 17:59:47 2017 +0200| [3d547c19c211ac61771629e6bcdfbdba393a76ae] | committer: Clément Bœsch

lavfi/paletteuse: fix debug_accuracy after aba926e7d

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d547c19c211ac61771629e6bcdfbdba393a76ae
---

 libavfilter/vf_paletteuse.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c
index 73d22a5b95..19017ac7b7 100644
--- a/libavfilter/vf_paletteuse.c
+++ b/libavfilter/vf_paletteuse.c
@@ -558,16 +558,16 @@ static int debug_accuracy(const struct color_node *node, const uint32_t *palette
     for (r = 0; r < 256; r++) {
         for (g = 0; g < 256; g++) {
             for (b = 0; b < 256; b++) {
-                const uint8_t rgb[] = {r, g, b};
-                const int r1 = COLORMAP_NEAREST(search_method, palette, node, rgb, trans_thresh);
-                const int r2 = colormap_nearest_bruteforce(palette, rgb, trans_thresh);
+                const uint8_t argb[] = {0xff, r, g, b};
+                const int r1 = COLORMAP_NEAREST(search_method, palette, node, argb, trans_thresh);
+                const int r2 = colormap_nearest_bruteforce(palette, argb, trans_thresh);
                 if (r1 != r2) {
                     const uint32_t c1 = palette[r1];
                     const uint32_t c2 = palette[r2];
-                    const uint8_t palrgb1[] = { c1>>16 & 0xff, c1>> 8 & 0xff, c1 & 0xff };
-                    const uint8_t palrgb2[] = { c2>>16 & 0xff, c2>> 8 & 0xff, c2 & 0xff };
-                    const int d1 = diff(palrgb1, rgb, trans_thresh);
-                    const int d2 = diff(palrgb2, rgb, trans_thresh);
+                    const uint8_t palargb1[] = { 0xff, c1>>16 & 0xff, c1>> 8 & 0xff, c1 & 0xff };
+                    const uint8_t palargb2[] = { 0xff, c2>>16 & 0xff, c2>> 8 & 0xff, c2 & 0xff };
+                    const int d1 = diff(palargb1, argb, trans_thresh);
+                    const int d2 = diff(palargb2, argb, trans_thresh);
                     if (d1 != d2) {
                         av_log(NULL, AV_LOG_ERROR,
                                "/!\\ %02X%02X%02X: %d ! %d (%06"PRIX32" ! %06"PRIX32") / dist: %d ! %d\n",



More information about the ffmpeg-cvslog mailing list