Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Mar 2012 00:56:33 +0000 (01:56 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Mar 2012 00:56:33 +0000 (01:56 +0100)
* qatar/master:
  pcm-mpeg: convert to bytestream2 API
  Revert "h264: clear trailing bits in partially parsed NAL units"
  remove iwmmxt optimizations
  mimic: do not continue if swap_buf_size is 0
  mimic: convert to bytestream2 API
  frwu: use MKTAG to check marker instead of AV_RL32
  txd: port to bytestream2 API
  c93: convert to bytestream2 API
  iff: make .long_name more descriptive
  FATE: add test for cdxl demuxer
  rtsp: Fix a typo

Conflicts:
libavcodec/arm/dsputil_iwmmxt.c
libavcodec/arm/dsputil_iwmmxt_rnd_template.c
libavcodec/arm/mpegvideo_iwmmxt.c
libavcodec/c93.c
libavcodec/txd.c
libavutil/arm/cpu.c
tests/fate/demux.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
18 files changed:
1  2 
configure
libavcodec/arm/Makefile
libavcodec/arm/dsputil_arm.h
libavcodec/arm/dsputil_init_arm.c
libavcodec/arm/mpegvideo_arm.c
libavcodec/arm/mpegvideo_arm.h
libavcodec/c93.c
libavcodec/frwu.c
libavcodec/mimic.c
libavcodec/pcm-mpeg.c
libavcodec/s3tc.c
libavcodec/s3tc.h
libavcodec/txd.c
libavformat/iff.c
libavformat/rtsp.c
libavutil/Makefile
libavutil/cpu.c
libavutil/cpu.h

diff --cc configure
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -240,6 -228,16 +232,16 @@@ static int decode_frame(AVCodecContext 
          }
      }
  
 -            palette[i] = bytestream2_get_be24(&gb);
+     if (b & C93_HAS_PALETTE) {
+         uint32_t *palette = (uint32_t *) newpic->data[1];
+         for (i = 0; i < 256; i++) {
++            palette[i] = 0xFFU << 24 | bytestream2_get_be24(&gb);
+         }
+     } else {
+         if (oldpic->data[1])
+             memcpy(newpic->data[1], oldpic->data[1], 256 * 4);
+     }
      *picture = *newpic;
      *data_size = sizeof(AVFrame);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -23,8 -23,8 +23,9 @@@
  
  #include "libavutil/intreadwrite.h"
  #include "libavutil/imgutils.h"
 +#include "bytestream.h"
  #include "avcodec.h"
+ #include "bytestream.h"
  #include "s3tc.h"
  
  typedef struct TXDContext {
@@@ -102,31 -96,26 +97,32 @@@ static int txd_decode_frame(AVCodecCont
  
      if (depth == 8) {
          pal = (uint32_t *) p->data[1];
-         for (y=0; y<256; y++) {
-             v = AV_RB32(palette+y);
-             pal[y] = (v>>8) + (v<<24);
+         for (y = 0; y < 256; y++) {
+             v = bytestream2_get_be32(&gb);
+             pal[y] = (v >> 8) + (v << 24);
          }
-         if (buf_end - cur < w * h)
++        if (bytestream2_get_bytes_left(&gb) < w * h)
 +            return AVERROR_INVALIDDATA;
+         bytestream2_skip(&gb, 4);
          for (y=0; y<h; y++) {
-             memcpy(ptr, cur, w);
+             bytestream2_get_buffer(&gb, ptr, w);
              ptr += stride;
-             cur += w;
          }
      } else if (depth == 16) {
+         bytestream2_skip(&gb, 4);
          switch (d3d_format) {
          case 0:
              if (!(flags & 1))
                  goto unsupported;
          case FF_S3TC_DXT1:
-             if (buf_end - cur < (w/4) * (h/4) * 8)
++            if (bytestream2_get_bytes_left(&gb) < (w/4) * (h/4) * 8)
 +                return AVERROR_INVALIDDATA;
-             ff_decode_dxt1(cur, ptr, w, h, stride);
+             ff_decode_dxt1(&gb, ptr, w, h, stride);
              break;
          case FF_S3TC_DXT3:
-             if (buf_end - cur < (w/4) * (h/4) * 16)
++            if (bytestream2_get_bytes_left(&gb) < (w/4) * (h/4) * 16)
 +                return AVERROR_INVALIDDATA;
-             ff_decode_dxt3(cur, ptr, w, h, stride);
+             ff_decode_dxt3(&gb, ptr, w, h, stride);
              break;
          default:
              goto unsupported;
          switch (d3d_format) {
          case 0x15:
          case 0x16:
-             if (buf_end - cur < h * w * 4)
++            if (bytestream2_get_bytes_left(&gb) < h * w * 4)
 +                return AVERROR_INVALIDDATA;
              for (y=0; y<h; y++) {
-                 memcpy(ptr, cur, w*4);
+                 bytestream2_get_buffer(&gb, ptr, w * 4);
                  ptr += stride;
-                 cur += w*4;
              }
              break;
          default:
Simple merge
Simple merge
Simple merge
diff --cc libavutil/cpu.c
Simple merge
diff --cc libavutil/cpu.h
  #define AV_CPU_FLAG_SSE4         0x0100 ///< Penryn SSE4.1 functions
  #define AV_CPU_FLAG_SSE42        0x0200 ///< Nehalem SSE4.2 functions
  #define AV_CPU_FLAG_AVX          0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
 +#define AV_CPU_FLAG_CMOV      0x1000000 ///< supports cmov instruction
  #define AV_CPU_FLAG_XOP          0x0400 ///< Bulldozer XOP functions
  #define AV_CPU_FLAG_FMA4         0x0800 ///< Bulldozer FMA4 functions
- #define AV_CPU_FLAG_IWMMXT       0x0100 ///< XScale IWMMXT
  #define AV_CPU_FLAG_ALTIVEC      0x0001 ///< standard
  
  /**
@@@ -64,10 -53,9 +63,9 @@@ void av_force_cpu_flags(int flags)
   *
   * @warning this function is not thread safe.
   */
 -void av_set_cpu_flags_mask(int mask);
 +attribute_deprecated void av_set_cpu_flags_mask(int mask);
  
  /* The following CPU-specific functions shall not be called directly. */
- int ff_get_cpu_flags_arm(void);
  int ff_get_cpu_flags_ppc(void);
  int ff_get_cpu_flags_x86(void);