OSDN Git Service

FFMAX
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Oct 2006 09:09:38 +0000 (09:09 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Oct 2006 09:09:38 +0000 (09:09 +0000)
Originally committed as revision 6785 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/jpeg_ls.c

index 8dabcc0..b322ab7 100644 (file)
@@ -77,9 +77,7 @@ static void ls_init_state(JLSState *state){
         state->limit = (4 * state->bpp) - state->qbpp;
 
     for(i = 0; i < 367; i++) {
-        state->A[i] = (state->range + 32) >> 6;
-        if(state->A[i] < 2)
-            state->A[i] = 2;
+        state->A[i] = FFMAX((state->range + 32) >> 6, 2);
         state->N[i] = 1;
     }