Merge commit '8c09532672d7d3196ec52afefa2c96633bc17b62'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Mar 2014 00:05:37 +0000 (01:05 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Mar 2014 00:05:37 +0000 (01:05 +0100)
* commit '8c09532672d7d3196ec52afefa2c96633bc17b62':
  rv10: K&R formatting cosmetics

Conflicts:
libavcodec/rv10.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/rv10.c

@@@ -300,14 -301,22 +301,22 @@@ static int rv20_decode_picture_header(R
  {
      MpegEncContext *s = &rv->m;
      int seq, mb_pos, i, ret;
 -    int rpr_bits;
 +    int rpr_max;
  
      i = get_bits(&s->gb, 2);
-     switch(i) {
-     case 0: s->pict_type = AV_PICTURE_TYPE_I; break;
-     case 1: s->pict_type = AV_PICTURE_TYPE_I; break; //hmm ...
-     case 2: s->pict_type = AV_PICTURE_TYPE_P; break;
-     case 3: s->pict_type = AV_PICTURE_TYPE_B; break;
+     switch (i) {
+     case 0:
+         s->pict_type = AV_PICTURE_TYPE_I;
+         break;
+     case 1:
+         s->pict_type = AV_PICTURE_TYPE_I;
+         break;                                  // hmm ...
+     case 2:
+         s->pict_type = AV_PICTURE_TYPE_P;
+         break;
+     case 3:
+         s->pict_type = AV_PICTURE_TYPE_B;
+         break;
      default:
          av_log(s->avctx, AV_LOG_ERROR, "unknown frame type\n");
          return AVERROR_INVALIDDATA;
      s->unrestricted_mv = 1;
      s->h263_aic        = s->pict_type == AV_PICTURE_TYPE_I;
      s->modified_quant  = 1;
 -    s->loop_filter     = 1;
 +    if (!s->avctx->lowres)
 +        s->loop_filter = 1;
  
      if (s->avctx->debug & FF_DEBUG_PICT_INFO) {
-         av_log(s->avctx, AV_LOG_INFO, "num:%5d x:%2d y:%2d type:%d qscale:%2d rnd:%d\n",
-                seq, s->mb_x, s->mb_y, s->pict_type, s->qscale, s->no_rounding);
+         av_log(s->avctx, AV_LOG_INFO,
+                "num:%5d x:%2d y:%2d type:%d qscale:%2d rnd:%d\n",
+                seq, s->mb_x, s->mb_y, s->pict_type, s->qscale,
+                s->no_rounding);
      }
  
 -    assert(s->pict_type != AV_PICTURE_TYPE_B || !s->low_delay);
 +    av_assert0(s->pict_type != AV_PICTURE_TYPE_B || !s->low_delay);
  
-     return s->mb_width*s->mb_height - mb_pos;
+     return s->mb_width * s->mb_height - mb_pos;
  }
  
  static av_cold int rv10_decode_init(AVCodecContext *avctx)
  
      if (avctx->debug & FF_DEBUG_PICT_INFO) {
          av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", rv->sub_id,
-                ((uint32_t*)avctx->extradata)[0]);
 -               avctx->extradata_size >= 4 ? ((uint32_t *) avctx->extradata)[0]
 -                                          : -1);
++               ((uint32_t *) avctx->extradata)[0]);
      }
  
      avctx->pix_fmt = AV_PIX_FMT_YUV420P;