Merge commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 16 May 2013 07:11:04 +0000 (09:11 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 16 May 2013 07:11:04 +0000 (09:11 +0200)
* commit 'd46c588f3cb1963a00e990ceaf4ba9ffa05a716d':
  Remove commented-out #includes
  h263dec: Remove broken and disabled debug cruft
  vc1: Reindent INIT_LUT(), align backslashes

Conflicts:
libavcodec/vc1.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h263dec.c
libavcodec/vc1.c
libavformat/nut.h
libavutil/rational.c

Simple merge
@@@ -578,52 -571,26 +578,52 @@@ int ff_vc1_decode_entry_point(AVCodecCo
  }
  
  /* fill lookup tables for intensity compensation */
- #define INIT_LUT(lumscale, lumshift, luty, lutuv, chain)   do {\
-     int scale, shift, i;                            \
-     if (!lumscale) {                                \
-         scale = -64;                                \
-         shift = (255 - lumshift * 2) << 6;          \
-         if (lumshift > 31)                          \
-             shift += 128 << 6;                      \
-     } else {                                        \
-         scale = lumscale + 32;                      \
-         if (lumshift > 31)                          \
-             shift = (lumshift - 64) << 6;           \
-         else                                        \
-             shift = lumshift << 6;                  \
-     }                                               \
-     for (i = 0; i < 256; i++) {                     \
-         int iy = chain ? luty[i] : i;               \
-         int iu = chain ? lutuv[i] : i;              \
-         luty[i]  = av_clip_uint8((scale * iy + shift + 32) >> 6);           \
-         lutuv[i] = av_clip_uint8((scale * (iu - 128) + 128*64 + 32) >> 6);  \
-     } \
-     }while(0)
 -#define INIT_LUT(lumscale, lumshift, luty, lutuv) do {                        \
++#define INIT_LUT(lumscale, lumshift, luty, lutuv, chain)   do {               \
+         int scale, shift, i;                                                  \
+         if (!lumscale) {                                                      \
+             scale = -64;                                                      \
+             shift = (255 - lumshift * 2) << 6;                                \
+             if (lumshift > 31)                                                \
+                 shift += 128 << 6;                                            \
+         } else {                                                              \
+             scale = lumscale + 32;                                            \
+             if (lumshift > 31)                                                \
+                 shift = (lumshift - 64) << 6;                                 \
+             else                                                              \
+                 shift = lumshift << 6;                                        \
+         }                                                                     \
+         for (i = 0; i < 256; i++) {                                           \
 -            luty[i]  = av_clip_uint8((scale * i + shift + 32) >> 6);          \
 -            lutuv[i] = av_clip_uint8((scale * (i - 128) + 128*64 + 32) >> 6); \
++            int iy = chain ? luty[i] : i;                                     \
++            int iu = chain ? lutuv[i] : i;                                    \
++            luty[i]  = av_clip_uint8((scale * iy + shift + 32) >> 6);         \
++            lutuv[i] = av_clip_uint8((scale * (iu - 128) + 128*64 + 32) >> 6);\
+         }                                                                     \
+     } while(0)
  
 +
 +static void rotate_luts(VC1Context *v)
 +{
 +#define ROTATE(DEF, L, N, C, A) do {\
 +        if (v->s.pict_type == AV_PICTURE_TYPE_BI || v->s.pict_type == AV_PICTURE_TYPE_B) {\
 +            C = A;\
 +        } else {\
 +            DEF;\
 +            memcpy(&tmp, &L  , sizeof(tmp));\
 +            memcpy(&L  , &N  , sizeof(tmp));\
 +            memcpy(&N  , &tmp, sizeof(tmp));\
 +            C = N;\
 +        }\
 +    }while(0)
 +
 +        ROTATE(int tmp            , v->last_use_ic, v->next_use_ic, v->curr_use_ic, v->aux_use_ic);
 +        ROTATE(uint8_t tmp[2][256], v->last_luty , v->next_luty , v->curr_luty , v->aux_luty);
 +        ROTATE(uint8_t tmp[2][256], v->last_lutuv, v->next_lutuv, v->curr_lutuv, v->aux_lutuv);
 +
 +    INIT_LUT(32, 0 , v->curr_luty[0] , v->curr_lutuv[0] , 0);
 +    INIT_LUT(32, 0 , v->curr_luty[1] , v->curr_lutuv[1] , 0);
 +    v->curr_use_ic = 0;
 +}
 +
  int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
  {
      int pqindex, lowquant, status;
Simple merge
Simple merge