3 is not exactly descriptive.
---
 libavcodec/jpegls.h    | 4 +++-
 libavcodec/jpeglsdec.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/jpegls.h b/libavcodec/jpegls.h
index 4bf9562..1ab15ee 100644
--- a/libavcodec/jpegls.h
+++ b/libavcodec/jpegls.h
@@ -36,12 +36,14 @@ typedef struct JpeglsContext {
     AVFrame picture;
 } JpeglsContext;
 
+#define COMPONENTS 3
+
 typedef struct JLSState {
     int T1, T2, T3;
     int A[367], B[367], C[365], N[367];
     int limit, reset, bpp, qbpp, maxval, range;
     int near, twonear;
-    int run_index[3];
+    int run_index[COMPONENTS];
 } JLSState;
 
 extern const uint8_t ff_log2_run[32];
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 6d884a4..d4ecf3d 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -332,7 +332,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int 
near,
         memset(cur, 0, s->picture_ptr->linesize[0]);
         width = s->width * 3;
         for (i = 0; i < s->height; i++) {
-            for (j = 0; j < 3; j++) {
+            for (j = 0; j < COMPONENTS; j++) {
                 ls_decode_line(state, s, last + j, cur + j,
                                Rc[j], width, 3, j, 8);
                 Rc[j] = last[j];
-- 
1.8.2.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to