[FFmpeg-cvslog] avfilter/paletteuse: use explicit key indexes in set_frame_lut

Clément Bœsch git at videolan.org
Tue Jan 3 18:31:23 EET 2023


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Fri Dec 30 11:44:21 2022 +0100| [6e05622216e188fa601f663cdf4ac999172a081f] | committer: Clément Bœsch

avfilter/paletteuse: use explicit key indexes in set_frame_lut

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

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

diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c
index 252ad746f0..944ff5c74d 100644
--- a/libavfilter/vf_paletteuse.c
+++ b/libavfilter/vf_paletteuse.c
@@ -918,15 +918,15 @@ DEFINE_SET_FRAME(burkes,          DITHERING_BURKES)
 DEFINE_SET_FRAME(atkinson,        DITHERING_ATKINSON)
 
 static const set_frame_func set_frame_lut[NB_DITHERING] = {
-    set_frame_none,
-    set_frame_bayer,
-    set_frame_heckbert,
-    set_frame_floyd_steinberg,
-    set_frame_sierra2,
-    set_frame_sierra2_4a,
-    set_frame_sierra3,
-    set_frame_burkes,
-    set_frame_atkinson,
+    [DITHERING_NONE]            = set_frame_none,
+    [DITHERING_BAYER]           = set_frame_bayer,
+    [DITHERING_HECKBERT]        = set_frame_heckbert,
+    [DITHERING_FLOYD_STEINBERG] = set_frame_floyd_steinberg,
+    [DITHERING_SIERRA2]         = set_frame_sierra2,
+    [DITHERING_SIERRA2_4A]      = set_frame_sierra2_4a,
+    [DITHERING_SIERRA3]         = set_frame_sierra3,
+    [DITHERING_BURKES]          = set_frame_burkes,
+    [DITHERING_ATKINSON]        = set_frame_atkinson,
 };
 
 static int dither_value(int p)



More information about the ffmpeg-cvslog mailing list