Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 9 Feb 2012 23:38:13 +0000 (00:38 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 10 Feb 2012 00:20:07 +0000 (01:20 +0100)
* qatar/master: (26 commits)
  eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation
  yadif: specify array size outside DECLARE_ALIGNED
  prores: specify array size outside DECLARE_ALIGNED brackets.
  WavPack demuxer: set packet duration
  tta: use skip_bits_long()
  mxfdec: Ignore the last entry in Avid's index table segments
  mxfdec: Sanity-check SampleRate
  mxfdec: Handle small EditUnitByteCount
  mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a
  mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
  mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
  mxfdec: Sanity check PreviousPartition
  mxfdec: Never seek back in local sets and KLVs
  mxfdec: Move the current_partition check inside mxf_read_header()
  mxfdec: Fix infinite loop in mxf_packet_timestamps()
  mxfdec: Check eof_reached in mxf_read_local_tags()
  mxfdec: Check for NULL component
  mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
  mxfdec: Make sure x < index_table->nb_ptses
  build: Add missing directories to DIRS declarations.
  ...

Conflicts:
doc/build_system.txt
doc/fate.texi
libavfilter/x86/yadif_template.c
libavformat/mxfdec.c
libavutil/Makefile
tests/fate/audio.mak
tests/fate/prores.mak
tests/fate/screen.mak
tests/fate/video.mak
tests/ref/fate/bethsoft-vid
tests/ref/fate/cscd
tests/ref/fate/dfa4
tests/ref/fate/nuv
tests/ref/fate/vp8-sign-bias
tests/ref/fate/wmv8-drm
tests/ref/lavf/gxf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
40 files changed:
COPYING.LGPLv2.1
doc/fate.texi
doc/ffserver.conf
doc/filters.texi
doc/swscale.txt
doc/viterbi.txt
libavcodec/Makefile
libavcodec/arm/vp8.h
libavcodec/bfin/dsputil_bfin.c
libavcodec/bfin/fdct_bfin.S
libavcodec/bfin/idct_bfin.S
libavcodec/bfin/mpegvideo_bfin.c
libavcodec/bfin/pixels_bfin.S
libavcodec/bfin/vp3_bfin.c
libavcodec/bfin/vp3_idct_bfin.S
libavcodec/bytestream.h
libavcodec/eac3dec.c
libavcodec/ppc/idct_altivec.c
libavcodec/proresdec_lgpl.c
libavcodec/ps2/dsputil_mmi.c
libavcodec/ps2/idct_mmi.c
libavcodec/ps2/mpegvideo_mmi.c
libavcodec/rawenc.c
libavcodec/tta.c
libavcodec/x86/fdct_mmx.c
libavcodec/x86/fft.c
libavcodec/x86/fft_3dn2.c
libavcodec/x86/fft_sse.c
libavcodec/x86/idct_mmx.c
libavcodec/x86/idct_mmx_xvid.c
libavfilter/x86/yadif_template.c
libavformat/apetag.h
libavformat/mxfdec.c
libavformat/wv.c
libavutil/Makefile
libswscale/ppc/yuv2rgb_altivec.h
tests/fate/audio.mak
tests/fate/prores.mak
tests/fate/screen.mak
tests/fate/vpx.mak

index 00b4fed..58af0d3 100644 (file)
@@ -500,5 +500,3 @@ necessary.  Here is a sample; alter the names:
   Ty Coon, President of Vice
 
 That's all there is to it!
-
-
index acb4bfe..1612bdf 100644 (file)
@@ -171,4 +171,4 @@ the synchronisation of the samples directory.
 Example:
 @example
 make V=1 SAMPLES=/var/fate/samples THREADS=2 fate
-@end example
+@end example
\ No newline at end of file
index 2171170..d10ac5b 100644 (file)
@@ -373,5 +373,3 @@ ACL allow 192.168.0.0 192.168.255.255
 <Redirect index.html>
 URL http://www.ffmpeg.org/
 </Redirect>
-
-
index 938a5e1..12b551c 100644 (file)
@@ -3365,4 +3365,3 @@ mainly useful as a template and to be employed in analysis / debugging
 tools.
 
 @c man end VIDEO SINKS
-
index 4c62e67..0dc4b8a 100644 (file)
@@ -96,4 +96,3 @@ would benefit from it.
 Also, as already hinted at, initFilter() accepts an optional convolutional
 filter as input that can be used for contrast, saturation, blur, sharpening
 shift, chroma vs. luma shift, ...
-
index d9d924f..5362a0b 100644 (file)
@@ -107,4 +107,3 @@ one with score 3)
 
 Author: Michael niedermayer
 Copyright LGPL
-
index 27372f3..7ff6975 100644 (file)
@@ -747,7 +747,7 @@ HOSTPROGS = aac_tablegen aacps_tablegen cbrt_tablegen cos_tablegen      \
             dv_tablegen motionpixels_tablegen mpegaudio_tablegen        \
             pcm_tablegen qdm2_tablegen sinewin_tablegen
 
-DIRS = alpha arm bfin ppc ps2 sh4 sparc x86
+DIRS = alpha arm avr32 bfin ppc ps2 sh4 sparc x86
 
 CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
 
index d3fce4c..5a7b142 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef AVCODEC_ARM_VP8_H
 #define AVCODEC_ARM_VP8_H
 
+#include "config.h"
+
 #if HAVE_ARMV6
 #define decode_block_coeffs_internal ff_decode_block_coeffs_armv6
 int ff_decode_block_coeffs_armv6(VP56RangeCoder *rc, DCTELEM block[16],
index bfcc337..2132d08 100644 (file)
@@ -270,6 +270,3 @@ void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
         }
     }
 }
-
-
-
index 0eac7a3..e15acb6 100644 (file)
@@ -330,4 +330,3 @@ DEFUN(fdct,mL1,
         (r7:4,p5:3) = [sp++];
         RTS;
 DEFUN_END(fdct)
-
index 04f9159..6643009 100644 (file)
@@ -302,5 +302,3 @@ DEFUN(idct,mL1,
     unlink;
     RTS;
 DEFUN_END(idct)
-
-
index 996290a..2f81927 100644 (file)
@@ -150,4 +150,3 @@ void MPV_common_init_bfin (MpegEncContext *s)
 {
 /*     s->dct_quantize= dct_quantize_bfin; */
 }
-
index 69b493b..1fc93f9 100644 (file)
@@ -737,5 +737,3 @@ DEFUN(sse16,mL1,
         unlink;
         rts;
 DEFUN_END(sse16)
-
-
index dfe34c5..6d6ac82 100644 (file)
@@ -41,5 +41,3 @@ void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block)
     ff_bfin_vp3_idct (block);
     ff_bfin_add_pixels_clamped (block, dest, line_size);
 }
-
-
index 21f732c..83747f9 100644 (file)
@@ -278,5 +278,3 @@ DEFUN(vp3_idct,mL1,
     unlink;
     RTS;
 DEFUN_END(vp3_idct)
-
-
index d315e3f..cba2dbb 100644 (file)
@@ -24,6 +24,7 @@
 #define AVCODEC_BYTESTREAM_H
 
 #include <string.h>
+
 #include "libavutil/common.h"
 #include "libavutil/intreadwrite.h"
 
@@ -36,46 +37,52 @@ typedef struct {
     int eof;
 } PutByteContext;
 
-#define DEF_T(type, name, bytes, read, write)                             \
-static av_always_inline type bytestream_get_ ## name(const uint8_t **b){\
-    (*b) += bytes;\
-    return read(*b - bytes);\
-}\
-static av_always_inline void bytestream_put_ ##name(uint8_t **b, const type value){\
-    write(*b, value);\
-    (*b) += bytes;\
-}\
-static av_always_inline void bytestream2_put_ ## name ## u(PutByteContext *p, const type value)\
-{\
-    bytestream_put_ ## name(&p->buffer, value);\
-}\
-static av_always_inline void bytestream2_put_ ## name(PutByteContext *p, const type value){\
-    if (!p->eof && (p->buffer_end - p->buffer >= bytes)) {\
-        write(p->buffer, value);\
-        p->buffer += bytes;\
-    } else\
-        p->eof = 1;\
-}\
-static av_always_inline type bytestream2_get_ ## name ## u(GetByteContext *g)\
-{\
-    return bytestream_get_ ## name(&g->buffer);\
-}\
-static av_always_inline type bytestream2_get_ ## name(GetByteContext *g)\
-{\
-    if (g->buffer_end - g->buffer < bytes)\
-        return 0;\
-    return bytestream2_get_ ## name ## u(g);\
-}\
-static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g)\
-{\
-    if (g->buffer_end - g->buffer < bytes)\
-        return 0;\
-    return read(g->buffer);\
+#define DEF_T(type, name, bytes, read, write)                                  \
+static av_always_inline type bytestream_get_ ## name(const uint8_t **b)        \
+{                                                                              \
+    (*b) += bytes;                                                             \
+    return read(*b - bytes);                                                   \
+}                                                                              \
+static av_always_inline void bytestream_put_ ## name(uint8_t **b,              \
+                                                     const type value)         \
+{                                                                              \
+    write(*b, value);                                                          \
+    (*b) += bytes;                                                             \
+}                                                                              \
+static av_always_inline void bytestream2_put_ ## name ## u(PutByteContext *p,  \
+                                                           const type value)   \
+{                                                                              \
+    bytestream_put_ ## name(&p->buffer, value);                                \
+}                                                                              \
+static av_always_inline void bytestream2_put_ ## name(PutByteContext *p,       \
+                                                      const type value)        \
+{                                                                              \
+    if (!p->eof && (p->buffer_end - p->buffer >= bytes)) {                     \
+        write(p->buffer, value);                                               \
+        p->buffer += bytes;                                                    \
+    } else                                                                     \
+        p->eof = 1;                                                            \
+}                                                                              \
+static av_always_inline type bytestream2_get_ ## name ## u(GetByteContext *g)  \
+{                                                                              \
+    return bytestream_get_ ## name(&g->buffer);                                \
+}                                                                              \
+static av_always_inline type bytestream2_get_ ## name(GetByteContext *g)       \
+{                                                                              \
+    if (g->buffer_end - g->buffer < bytes)                                     \
+        return 0;                                                              \
+    return bytestream2_get_ ## name ## u(g);                                   \
+}                                                                              \
+static av_always_inline type bytestream2_peek_ ## name(GetByteContext *g)      \
+{                                                                              \
+    if (g->buffer_end - g->buffer < bytes)                                     \
+        return 0;                                                              \
+    return read(g->buffer);                                                    \
 }
 
-#define DEF(name, bytes, read, write) \
+#define DEF(name, bytes, read, write)                                          \
     DEF_T(unsigned int, name, bytes, read, write)
-#define DEF64(name, bytes, read, write) \
+#define DEF64(name, bytes, read, write)                                        \
     DEF_T(uint64_t, name, bytes, read, write)
 
 DEF64(le64, 8, AV_RL64, AV_WL64)
@@ -129,15 +136,17 @@ DEF  (byte, 1, AV_RB8 , AV_WB8 )
 #endif
 
 static av_always_inline void bytestream2_init(GetByteContext *g,
-                                              const uint8_t *buf, int buf_size)
+                                              const uint8_t *buf,
+                                              int buf_size)
 {
-    g->buffer  buf;
+    g->buffer       = buf;
     g->buffer_start = buf;
-    g->buffer_end = buf + buf_size;
+    g->buffer_end   = buf + buf_size;
 }
 
 static av_always_inline void bytestream2_init_writer(PutByteContext *p,
-                                                     uint8_t *buf, int buf_size)
+                                                     uint8_t *buf,
+                                                     int buf_size)
 {
     p->buffer       = buf;
     p->buffer_start = buf;
@@ -183,21 +192,22 @@ static av_always_inline int bytestream2_tell_p(PutByteContext *p)
     return (int)(p->buffer - p->buffer_start);
 }
 
-static av_always_inline int bytestream2_seek(GetByteContext *g, int offset,
+static av_always_inline int bytestream2_seek(GetByteContext *g,
+                                             int offset,
                                              int whence)
 {
     switch (whence) {
     case SEEK_CUR:
-        offset = av_clip(offset, -(g->buffer - g->buffer_start),
-                         g->buffer_end - g->buffer);
+        offset     = av_clip(offset, -(g->buffer - g->buffer_start),
+                             g->buffer_end - g->buffer);
         g->buffer += offset;
         break;
     case SEEK_END:
-        offset = av_clip(offset, -(g->buffer_end - g->buffer_start), 0);
+        offset    = av_clip(offset, -(g->buffer_end - g->buffer_start), 0);
         g->buffer = g->buffer_end + offset;
         break;
     case SEEK_SET:
-        offset = av_clip(offset, 0, g->buffer_end - g->buffer_start);
+        offset    = av_clip(offset, 0, g->buffer_end - g->buffer_start);
         g->buffer = g->buffer_start + offset;
         break;
     default:
@@ -206,7 +216,8 @@ static av_always_inline int bytestream2_seek(GetByteContext *g, int offset,
     return bytestream2_tell(g);
 }
 
-static av_always_inline int bytestream2_seek_p(PutByteContext *p, int offset,
+static av_always_inline int bytestream2_seek_p(PutByteContext *p,
+                                               int offset,
                                                int whence)
 {
     p->eof = 0;
@@ -214,20 +225,20 @@ static av_always_inline int bytestream2_seek_p(PutByteContext *p, int offset,
     case SEEK_CUR:
         if (p->buffer_end - p->buffer < offset)
             p->eof = 1;
-        offset = av_clip(offset, -(p->buffer - p->buffer_start),
-                         p->buffer_end - p->buffer);
+        offset     = av_clip(offset, -(p->buffer - p->buffer_start),
+                             p->buffer_end - p->buffer);
         p->buffer += offset;
         break;
     case SEEK_END:
         if (offset > 0)
             p->eof = 1;
-        offset = av_clip(offset, -(p->buffer_end - p->buffer_start), 0);
+        offset    = av_clip(offset, -(p->buffer_end - p->buffer_start), 0);
         p->buffer = p->buffer_end + offset;
         break;
     case SEEK_SET:
         if (p->buffer_end - p->buffer_start < offset)
             p->eof = 1;
-        offset = av_clip(offset, 0, p->buffer_end - p->buffer_start);
+        offset    = av_clip(offset, 0, p->buffer_end - p->buffer_start);
         p->buffer = p->buffer_start + offset;
         break;
     default:
@@ -280,14 +291,18 @@ static av_always_inline unsigned int bytestream2_get_eof(PutByteContext *p)
     return p->eof;
 }
 
-static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b, uint8_t *dst, unsigned int size)
+static av_always_inline unsigned int bytestream_get_buffer(const uint8_t **b,
+                                                           uint8_t *dst,
+                                                           unsigned int size)
 {
     memcpy(dst, *b, size);
     (*b) += size;
     return size;
 }
 
-static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
+static av_always_inline void bytestream_put_buffer(uint8_t **b,
+                                                   const uint8_t *src,
+                                                   unsigned int size)
 {
     memcpy(*b, src, size);
     (*b) += size;
index ad240e4..7fc1bb5 100644 (file)
@@ -140,7 +140,7 @@ void ff_eac3_apply_spectral_extension(AC3DecodeContext *s)
            each band. */
         bin = s->spx_src_start_freq;
         for (bnd = 0; bnd < s->num_spx_bands; bnd++) {
-            float nscale = s->spx_noise_blend[ch][bnd] * rms_energy[bnd] * (1.0f/(1<<31));
+            float nscale = s->spx_noise_blend[ch][bnd] * rms_energy[bnd] * (1.0f / INT32_MIN);
             float sscale = s->spx_signal_blend[ch][bnd];
             for (i = 0; i < s->spx_band_sizes[bnd]; i++) {
                 float noise  = nscale * (int32_t)av_lfg_get(&s->dith_state);
index d65ba24..f1c95c1 100644 (file)
@@ -215,4 +215,3 @@ void idct_add_altivec(uint8_t* dest, int stride, int16_t *blk)
     ADD (dest, vx6, perm0)      dest += stride;
     ADD (dest, vx7, perm1)
 }
-
index 5fe4775..33653de 100644 (file)
@@ -42,7 +42,7 @@ typedef struct {
     int slice_num;
     int x_pos, y_pos;
     int slice_width;
-    DECLARE_ALIGNED(16, DCTELEM, blocks[8 * 4 * 64]);
+    DECLARE_ALIGNED(16, DCTELEM, blocks)[8 * 4 * 64];
 } ProresThreadData;
 
 typedef struct {
@@ -57,8 +57,8 @@ typedef struct {
     uint8_t    qmat_chroma[64];          ///< dequantization matrix for chroma
     int        qmat_changed;             ///< 1 - global quantization matrices changed
     int        prev_slice_sf;            ///< scalefactor of the previous decoded slice
-    DECLARE_ALIGNED(16, int16_t, qmat_luma_scaled[64]);
-    DECLARE_ALIGNED(16, int16_t, qmat_chroma_scaled[64]);
+    DECLARE_ALIGNED(16, int16_t, qmat_luma_scaled)[64];
+    DECLARE_ALIGNED(16, int16_t, qmat_chroma_scaled)[64];
     int        total_slices;            ///< total number of slices in a picture
     ProresThreadData *slice_data;
     int        pic_num;
index d04a425..26259c8 100644 (file)
@@ -164,4 +164,3 @@ void dsputil_init_mmi(DSPContext* c, AVCodecContext *avctx)
         c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
     }
 }
-
index bfe362a..5a3af17 100644 (file)
@@ -359,4 +359,3 @@ void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
         //let savedtemp regs be saved
         __asm__ volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
 }
-
index 68c3b0d..8c8d3a7 100644 (file)
@@ -85,5 +85,3 @@ void MPV_common_init_mmi(MpegEncContext *s)
     s->dct_unquantize_h263_intra =
     s->dct_unquantize_h263_inter = dct_unquantize_h263_mmi;
 }
-
-
index 8fc9cd9..577a8fc 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "avcodec.h"
 #include "raw.h"
+#include "internal.h"
 #include "libavutil/pixdesc.h"
 #include "libavutil/intreadwrite.h"
 
@@ -40,19 +41,29 @@ static av_cold int raw_init_encoder(AVCodecContext *avctx)
     return 0;
 }
 
-static int raw_encode(AVCodecContext *avctx,
-                            unsigned char *frame, int buf_size, void *data)
+static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,
+                      const AVFrame *frame, int *got_packet)
 {
-    int ret = avpicture_layout((AVPicture *)data, avctx->pix_fmt, avctx->width,
-                                               avctx->height, frame, buf_size);
+    int ret = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
+
+    if (ret < 0)
+        return ret;
+
+    if ((ret = ff_alloc_packet(pkt, ret)) < 0)
+        return ret;
+    if ((ret = avpicture_layout((const AVPicture *)frame, avctx->pix_fmt, avctx->width,
+                                avctx->height, pkt->data, pkt->size)) < 0)
+        return ret;
 
     if(avctx->codec_tag == AV_RL32("yuv2") && ret > 0 &&
        avctx->pix_fmt   == PIX_FMT_YUYV422) {
         int x;
         for(x = 1; x < avctx->height*avctx->width*2; x += 2)
-            frame[x] ^= 0x80;
+            pkt->data[x] ^= 0x80;
     }
-    return ret;
+    pkt->flags |= AV_PKT_FLAG_KEY;
+    *got_packet = 1;
+    return 0;
 }
 
 AVCodec ff_rawvideo_encoder = {
@@ -61,6 +72,6 @@ AVCodec ff_rawvideo_encoder = {
     .id             = CODEC_ID_RAWVIDEO,
     .priv_data_size = sizeof(AVFrame),
     .init           = raw_init_encoder,
-    .encode         = raw_encode,
+    .encode2        = raw_encode,
     .long_name = NULL_IF_CONFIG_SMALL("raw video"),
 };
index 8d49bc8..ab83730 100644 (file)
@@ -201,7 +201,6 @@ static const int64_t tta_channel_layouts[7] = {
 static av_cold int tta_decode_init(AVCodecContext * avctx)
 {
     TTAContext *s = avctx->priv_data;
-    int i;
 
     s->avctx = avctx;
 
@@ -213,7 +212,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
     if (show_bits_long(&s->gb, 32) == AV_RL32("TTA1"))
     {
         /* signature */
-        skip_bits(&s->gb, 32);
+        skip_bits_long(&s->gb, 32);
 
         s->format = get_bits(&s->gb, 16);
         if (s->format > 2) {
@@ -231,7 +230,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
         s->bps = (avctx->bits_per_coded_sample + 7) / 8;
         avctx->sample_rate = get_bits_long(&s->gb, 32);
         s->data_length = get_bits_long(&s->gb, 32);
-        skip_bits(&s->gb, 32); // CRC32 of header
+        skip_bits_long(&s->gb, 32); // CRC32 of header
 
         if (s->channels == 0) {
             av_log(s->avctx, AV_LOG_ERROR, "Invalid number of channels\n");
@@ -272,9 +271,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
             s->data_length, s->frame_length, s->last_frame_length, s->total_frames);
 
         // FIXME: seek table
-        for (i = 0; i < s->total_frames; i++)
-            skip_bits(&s->gb, 32);
-        skip_bits(&s->gb, 32); // CRC32 of seektable
+        skip_bits_long(&s->gb, 32 * s->total_frames);
+        skip_bits_long(&s->gb, 32); // CRC32 of seektable
 
         if(s->frame_length >= UINT_MAX / (s->channels * sizeof(int32_t))){
             av_log(avctx, AV_LOG_ERROR, "frame_length too large\n");
@@ -413,7 +411,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
 
     if (get_bits_left(&s->gb) < 32)
         return -1;
-    skip_bits(&s->gb, 32); // frame crc
+    skip_bits_long(&s->gb, 32); // frame crc
 
         // convert to output buffer
         switch(s->bps) {
index 94f6157..3662242 100644 (file)
@@ -579,4 +579,3 @@ void ff_fdct_sse2(int16_t *block)
     fdct_col_sse2(block, block1, 0);
     fdct_row_sse2(block1, block);
 }
-
index d2d157c..8544e32 100644 (file)
@@ -67,4 +67,3 @@ av_cold void ff_dct_init_mmx(DCTContext *s)
 #endif
 }
 #endif
-
index 7a6cac1..f3c5dd0 100644 (file)
@@ -171,4 +171,3 @@ void ff_imdct_calc_3dn2(FFTContext *s, FFTSample *output, const FFTSample *input
     );
     __asm__ volatile("femms");
 }
-
index 43f19ff..a09ad38 100644 (file)
@@ -108,4 +108,3 @@ void ff_imdct_calc_sse(FFTContext *s, FFTSample *output, const FFTSample *input)
         XMM_CLOBBERS_ONLY("%xmm0", "%xmm1", "%xmm7")
     );
 }
-
index ed2d321..f199941 100644 (file)
@@ -626,4 +626,3 @@ declare_idct (ff_mmxext_idct, mmxext_table,
 
 declare_idct (ff_mmx_idct, mmx_table,
               mmx_row_head, mmx_row, mmx_row_tail, mmx_row_mid)
-
index 466cf75..1b48ab5 100644 (file)
@@ -523,4 +523,3 @@ __asm__ volatile(
     DCT_8_INV_COL(8(%0), 8(%0))
     :: "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16));
 }
-
index 0b60526..71cf9d1 100644 (file)
@@ -261,4 +261,3 @@ void RENAME(ff_yadif_filter_line)(uint8_t *dst,
 #undef CHECK1
 #undef CHECK2
 #undef FILTER
-
index 8aaef68..869fc4b 100644 (file)
@@ -30,4 +30,4 @@
  */
 void ff_ape_parse_tag(AVFormatContext *s);
 
-#endif /* AVFORMAT_ID3V2_H */
+#endif /* AVFORMAT_APETAG_H */
index c927869..44533b4 100644 (file)
@@ -490,7 +490,8 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
     /* sanity check PreviousPartition if set */
     if (partition->previous_partition &&
         mxf->run_in + partition->previous_partition >= klv_offset) {
-        av_log(mxf->fc, AV_LOG_ERROR, "PreviousPartition points to this partition or forward\n");
+        av_log(mxf->fc, AV_LOG_ERROR,
+               "PreviousPartition points to this partition or forward\n");
         return AVERROR_INVALIDDATA;
     }
 
@@ -1107,7 +1108,6 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta
 
         if (s->nb_index_entries == 2 * s->index_duration + 1) {
             index_delta = 2;    /* Avid index */
-
             /* ignore the last entry - it's the size of the essence container */
             n--;
         }
@@ -1117,7 +1117,8 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta
             int index  = x + offset;
 
             if (x >= index_table->nb_ptses) {
-                av_log(mxf->fc, AV_LOG_ERROR, "x >= nb_ptses - IndexEntryCount %i < IndexDuration %"PRId64"?\n",
+                av_log(mxf->fc, AV_LOG_ERROR,
+                       "x >= nb_ptses - IndexEntryCount %i < IndexDuration %"PRId64"?\n",
                        s->nb_index_entries, s->index_duration);
                 break;
             }
@@ -1401,8 +1402,10 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
                 st->codec->codec_id = container_ul->id;
             st->codec->channels = descriptor->channels;
             st->codec->bits_per_coded_sample = descriptor->bits_per_sample;
+
             if (descriptor->sample_rate.den > 0)
-            st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
+                st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
+
             /* TODO: implement CODEC_ID_RAWAUDIO */
             if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
                 if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
@@ -1496,14 +1499,15 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
         else if ((ret = read_child(ctx, pb, tag, size, uid, -1)) < 0)
             return ret;
 
-        /* accept the 64k local set limit being exceeded (Avid)
-         * don't accept it extending past the end of the KLV though (zzuf5.mxf) */
+        /* Accept the 64k local set limit being exceeded (Avid). Don't accept
+         * it extending past the end of the KLV though (zzuf5.mxf). */
         if (avio_tell(pb) > klv_end) {
-            av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x extends past end of local set @ %#"PRIx64"\n",
+            av_log(mxf->fc, AV_LOG_ERROR,
+                   "local tag %#04x extends past end of local set @ %#"PRIx64"\n",
                    tag, klv->offset);
             return AVERROR_INVALIDDATA;
         } else if (avio_tell(pb) <= next)   /* only seek forward, else this can loop for a long time */
-        avio_seek(pb, next, SEEK_SET);
+            avio_seek(pb, next, SEEK_SET);
     }
     if (ctx_size) ctx->type = type;
     return ctx_size ? mxf_add_metadata_set(mxf, ctx) : 0;
@@ -1628,8 +1632,9 @@ static int is_pcm(enum CodecID codec_id)
 }
 
 /**
- * Deals with the case where for some audio atoms EditUnitByteCount is very small (2, 4..).
- * In those cases we should read more than one sample per call to mxf_read_packet().
+ * Deal with the case where for some audio atoms EditUnitByteCount is
+ * very small (2, 4..). In those cases we should read more than one
+ * sample per call to mxf_read_packet().
  */
 static void mxf_handle_small_eubc(AVFormatContext *s)
 {
@@ -1641,15 +1646,18 @@ static void mxf_handle_small_eubc(AVFormatContext *s)
         return;
 
     /* expect PCM with exactly one index table segment and a small (< 32) EUBC */
-    if (s->nb_streams != 1 || s->streams[0]->codec->codec_type != AVMEDIA_TYPE_AUDIO ||
-        !is_pcm(s->streams[0]->codec->codec_id) || mxf->nb_index_tables != 1 ||
-        mxf->index_tables[0].nb_segments != 1 ||
+    if (s->nb_streams != 1                                     ||
+        s->streams[0]->codec->codec_type != AVMEDIA_TYPE_AUDIO ||
+        !is_pcm(s->streams[0]->codec->codec_id)                ||
+        mxf->nb_index_tables != 1                              ||
+        mxf->index_tables[0].nb_segments != 1                  ||
         mxf->index_tables[0].segments[0]->edit_unit_byte_count >= 32)
         return;
 
     /* arbitrarily default to 48 kHz PAL audio frame size */
-    /* TODO: we could compute this from the ratio between the audio and video edit rates
-     *       for 48 kHz NTSC we could use the 1802-1802-1802-1802-1801 pattern */
+    /* TODO: We could compute this from the ratio between the audio
+     *       and video edit rates for 48 kHz NTSC we could use the
+     *       1802-1802-1802-1802-1801 pattern. */
     mxf->edit_units_per_packet = 1920;
 }
 
@@ -1799,7 +1807,8 @@ static void mxf_packet_timestamps(MXFContext *mxf, AVPacket *pkt)
     int64_t last_ofs = -1, next_ofs;
     MXFIndexTable *t = &mxf->index_tables[0];
 
-    /* this is called from the OP1a demuxing logic, which means there may be no index tables */
+    /* this is called from the OP1a demuxing logic, which means there
+     * may be no index tables */
     if (mxf->nb_index_tables <= 0)
         return;
 
@@ -1809,9 +1818,10 @@ static void mxf_packet_timestamps(MXFContext *mxf, AVPacket *pkt)
             break;
 
         if (next_ofs <= last_ofs) {
-            /* large next_ofs didn't change or current_edit_unit wrapped around
-             * this fixes the infinite loop on zzuf3.mxf */
-            av_log(mxf->fc, AV_LOG_ERROR, "next_ofs didn't change. not deriving packet timestamps\n");
+            /* large next_ofs didn't change or current_edit_unit wrapped
+             * around this fixes the infinite loop on zzuf3.mxf */
+            av_log(mxf->fc, AV_LOG_ERROR,
+                   "next_ofs didn't change. not deriving packet timestamps\n");
             return;
         }
 
index 537fdec..767f4f4 100644 (file)
@@ -251,6 +251,7 @@ static int wv_read_packet(AVFormatContext *s,
     int ret;
     int size, ver, off;
     int64_t pos;
+    uint32_t block_samples;
 
     if (url_feof(s->pb))
         return AVERROR(EIO);
@@ -316,6 +317,12 @@ static int wv_read_packet(AVFormatContext *s,
     pkt->stream_index = 0;
     wc->block_parsed = 1;
     pkt->pts = wc->soff;
+    block_samples = AV_RN32(wc->extra);
+    if (block_samples > INT32_MAX)
+        av_log(s, AV_LOG_WARNING, "Too many samples in block: %"PRIu32"\n", block_samples);
+    else
+        pkt->duration = block_samples;
+
     av_add_index_entry(s->streams[0], pos, pkt->pts, 0, 0, AVINDEX_KEYFRAME);
     return 0;
 }
index b918da7..6d78bd5 100644 (file)
@@ -88,7 +88,7 @@ TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo
 
 TOOLS = ffeval
 
-DIRS = arm bfin sh4 x86
+DIRS = arm avr32 bfin mips ppc sh4 tomi x86
 
 ARCH_HEADERS = bswap.h intmath.h intreadwrite.h timer.h
 
index 8c62c32..aa52a47 100644 (file)
 #ifndef SWSCALE_PPC_YUV2RGB_ALTIVEC_H
 #define SWSCALE_PPC_YUV2RGB_ALTIVEC_H
 
+#include <stdint.h>
+
+#include "libswscale/swscale_internal.h"
+
 #define YUV2PACKEDX_HEADER(suffix)                                  \
     void ff_yuv2 ## suffix ## _X_altivec(SwsContext *c,             \
                                          const int16_t *lumFilter,  \
index bad874b..f694cb9 100644 (file)
@@ -32,4 +32,4 @@ FATE_AUDIO += fate-ws_snd
 fate-ws_snd: CMD = md5 -i $(SAMPLES)/vqa/ws_snd.vqa -f s16le
 
 FATE_TESTS += $(FATE_AUDIO)
-fate-audio: $(FATE_AUDIO)
+fate-audio: $(FATE_AUDIO)
\ No newline at end of file
index 1890dac..d211d3f 100644 (file)
@@ -12,4 +12,3 @@ fate-prores-422_hq:    CMD = framecrc -flags +bitexact -i $(SAMPLES)/prores/Sequ
 fate-prores-422_lt:    CMD = framecrc -flags +bitexact -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_LT.mov -pix_fmt yuv422p10le
 fate-prores-422_proxy: CMD = framecrc -flags +bitexact -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_422_Proxy.mov -pix_fmt yuv422p10le
 fate-prores-alpha:     CMD = framecrc -flags +bitexact -i $(SAMPLES)/prores/Sequence_1-Apple_ProRes_with_Alpha.mov -pix_fmt yuv444p10le
-
index 28fb9a9..1cc519d 100644 (file)
@@ -1,3 +1,4 @@
+# FIXME dropped frames in this test because of coarse timebase
 FATE_SCREEN += fate-cscd
 fate-cscd: CMD = framecrc -i $(SAMPLES)/CSCD/sample_video.avi -an -pix_fmt rgb24
 
index 73dfab1..f682365 100644 (file)
@@ -33,6 +33,8 @@ endef
 define FATE_VP8_FULL
 $(foreach N,$(VP8_SUITE),$(eval $(call FATE_VP8_SUITE,$(N),$(1),$(2))))
 
+# FIXME this file contains two frames with identical timestamps,
+# so avconv drops one of them
 FATE_VP8 += fate-vp8-sign-bias$(1)
 fate-vp8-sign-bias$(1): CMD = framemd5 $(2) -i $(SAMPLES)/vp8/sintel-signbias.ivf
 fate-vp8-sign-bias$(1): REF = $(SRC_PATH)/tests/ref/fate/vp8-sign-bias