Merge commit '581281e242609a222233a2e5538b89dfb88fb18e'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 20 Sep 2012 01:20:29 +0000 (03:20 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 20 Sep 2012 01:20:29 +0000 (03:20 +0200)
* commit '581281e242609a222233a2e5538b89dfb88fb18e':
  matroskadec: check realloc in lzo encoding
  matroska: honor error_recognition on unknown doctypes
  tiffdec: Add support for GRAY16LE.
  tiffenc: Add support for little endian RGB48 and GRAY16
  mpeg4: support frame parameter changes with frame-mt
  mpegvideo: check ff_find_unused_picture() return value for errors
  mpegvideo: release frame buffers before freeing them
  configure: msvc: default to 'lib' as 'ar' tool
  build: support some non-standard ar variants

Conflicts:
libavcodec/h263dec.c
libavcodec/mpegvideo.c
libavcodec/tiff.c
libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
configure
libavcodec/h263dec.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/tiffenc.c
libavformat/matroskadec.c
library.mak

diff --cc configure
+++ b/configure
@@@ -2688,8 -2416,18 +2689,19 @@@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc
      DEPCCFLAGS=$_flags
  fi
  
+ if $ar 2>&1 | grep -q Microsoft; then
+     arflags="-nologo"
+     ar_o='-out:$@'
+ elif $ar 2>&1 | grep -q 'Texas Instruments'; then
+     arflags="rq"
+     ar_o='$@'
+ else
+     arflags="rc"
+     ar_o='$@'
+ fi
  add_cflags $extra_cflags
 +add_cxxflags $extra_cxxflags
  add_asflags $extra_cflags
  
  if test -n "$sysroot"; then
@@@ -4113,13 -3657,12 +4125,15 @@@ DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS
  YASM=$yasmexe
  DEPYASM=$yasmexe
  AR=$ar
+ ARFLAGS=$arflags
+ AR_O=$ar_o
  RANLIB=$ranlib
 +CP=cp -p
  LN_S=$ln_s
 +STRIP=$strip
  CPPFLAGS=$CPPFLAGS
  CFLAGS=$CFLAGS
 +CXXFLAGS=$CXXFLAGS
  ASFLAGS=$ASFLAGS
  AS_C=$AS_C
  AS_O=$AS_O
@@@ -461,16 -433,7 +461,7 @@@ retry
      /* skip if the header was thrashed */
      if (ret < 0){
          av_log(s->avctx, AV_LOG_ERROR, "header damaged\n");
 -        return -1;
 +        return ret;
-     } else if ((s->width  != avctx->coded_width  ||
-                 s->height != avctx->coded_height ||
-                 (s->width  + 15) >> 4 != s->mb_width ||
-                 (s->height + 15) >> 4 != s->mb_height) &&
-                (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME))) {
-         av_log_missing_feature(s->avctx, "Width/height/bit depth/chroma idc changing with threads is", 0);
-         s->width = avctx->coded_width;
-         s->height= avctx->coded_height;
-         return AVERROR_PATCHWELCOME;   // width / height changed during parallelized decoding
      }
  
      avctx->has_b_frames= !s->low_delay;
Simple merge
@@@ -545,13 -545,20 +545,22 @@@ int ff_mpeg_update_thread_context(AVCod
          s->bitstream_buffer      = NULL;
          s->bitstream_buffer_size = s->allocated_bitstream_buffer_size = 0;
  
 -        ff_MPV_common_init(s);
 +        if (s1->context_initialized){
 +            s->picture_range_start  += MAX_PICTURE_COUNT;
 +            s->picture_range_end    += MAX_PICTURE_COUNT;
 +            ff_MPV_common_init(s);
 +        }
      }
  
+     if (s->height != s1->height || s->width != s1->width || s->context_reinit) {
+         int err;
+         s->context_reinit = 0;
+         s->height = s1->height;
+         s->width  = s1->width;
+         if ((err = ff_MPV_common_frame_size_change(s)) < 0)
+             return err;
+     }
      s->avctx->coded_height  = s1->avctx->coded_height;
      s->avctx->coded_width   = s1->avctx->coded_width;
      s->avctx->width         = s1->avctx->width;
@@@ -1393,10 -1417,11 +1404,12 @@@ int ff_MPV_frame_start(MpegEncContext *
  
              /* Allocate a dummy frame */
              i = ff_find_unused_picture(s, 0);
-             if (i < 0)
+             if (i < 0) {
+                 av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n");
                  return i;
+             }
              s->last_picture_ptr = &s->picture[i];
 +            s->last_picture_ptr->f.key_frame = 0;
              if (ff_alloc_picture(s, s->last_picture_ptr, 0) < 0) {
                  s->last_picture_ptr = NULL;
                  return -1;
              s->pict_type == AV_PICTURE_TYPE_B) {
              /* Allocate a dummy frame */
              i = ff_find_unused_picture(s, 0);
-             if (i < 0)
+             if (i < 0) {
+                 av_log(s->avctx, AV_LOG_ERROR, "no frame buffer available\n");
                  return i;
+             }
              s->next_picture_ptr = &s->picture[i];
 +            s->next_picture_ptr->f.key_frame = 0;
              if (ff_alloc_picture(s, s->next_picture_ptr, 0) < 0) {
                  s->next_picture_ptr = NULL;
                  return -1;
Simple merge
@@@ -516,15 -487,13 +516,16 @@@ AVCodec ff_tiff_encoder = 
      .type           = AVMEDIA_TYPE_VIDEO,
      .id             = AV_CODEC_ID_TIFF,
      .priv_data_size = sizeof(TiffEncoderContext),
 +    .init           = encode_init,
      .encode2        = encode_frame,
 +    .close          = encode_close,
      .pix_fmts       = (const enum PixelFormat[]) {
-         PIX_FMT_RGB24, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_GRAY8A, PIX_FMT_GRAY16LE,
 -        PIX_FMT_RGB24, PIX_FMT_RGB48LE, PIX_FMT_PAL8,
 -        PIX_FMT_GRAY8, PIX_FMT_GRAY16LE,
++        PIX_FMT_RGB24, PIX_FMT_PAL8, PIX_FMT_GRAY8,
++        PIX_FMT_GRAY8A, PIX_FMT_GRAY16LE,
          PIX_FMT_MONOBLACK, PIX_FMT_MONOWHITE,
 -        PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P,
 -        PIX_FMT_YUV410P, PIX_FMT_YUV411P,
 +        PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV440P, PIX_FMT_YUV444P,
 +        PIX_FMT_YUV410P, PIX_FMT_YUV411P, PIX_FMT_RGB48LE,
 +        PIX_FMT_RGBA, PIX_FMT_RGBA64LE,
          PIX_FMT_NONE
      },
      .long_name      = NULL_IF_CONFIG_SMALL("TIFF image"),
Simple merge
diff --cc library.mak
Simple merge