Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Jul 2011 09:56:53 +0000 (11:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Jul 2011 10:08:52 +0000 (12:08 +0200)
* qatar/master:
  dnxhddec: optimise dnxhd_decode_dct_block()
  rtp: remove disabled code
  eac3enc: use different numbers of blocks per frame to allow higher bitrates
  dnxhd: add regression test for 10-bit
  dnxhd: 10-bit support
  dsputil: update per-arch init funcs for non-h264 high bit depth
  dsputil: template get_pixels() for different bit depths
  dsputil: create 16/32-bit dctcoef versions of some functions
  jfdctint: add 10-bit version
  mov: add clcp type track as Subtitle stream.
  mpeg4: add Mpeg4 Profiles names.
  mpeg4: decode Level Profile for MPEG4 Part 2.
  ffprobe: display bitstream level.
  imgconvert: remove unused glue and xglue macros

Conflicts:
libavcodec/dsputil_template.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
42 files changed:
1  2 
ffprobe.c
libavcodec/ac3enc.c
libavcodec/ac3enc.h
libavcodec/ac3enc_fixed.c
libavcodec/ac3enc_float.c
libavcodec/alpha/dsputil_alpha.c
libavcodec/arm/dsputil_init_arm.c
libavcodec/arm/dsputil_init_armv6.c
libavcodec/arm/dsputil_init_neon.c
libavcodec/arm/dsputil_iwmmxt.c
libavcodec/avcodec.h
libavcodec/bfin/dsputil_bfin.c
libavcodec/dct-test.c
libavcodec/dnxhddata.c
libavcodec/dnxhddata.h
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dnxhdenc.h
libavcodec/dsputil.c
libavcodec/dsputil.h
libavcodec/dsputil_template.c
libavcodec/h264.c
libavcodec/imgconvert.c
libavcodec/mlib/dsputil_mlib.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo_enc.c
libavcodec/ppc/dsputil_altivec.c
libavcodec/ppc/dsputil_ppc.c
libavcodec/ppc/h264_altivec.c
libavcodec/ps2/dsputil_mmi.c
libavcodec/sh4/dsputil_align.c
libavcodec/sh4/dsputil_sh4.c
libavcodec/sparc/dsputil_vis.c
libavcodec/x86/dnxhd_mmx.c
libavcodec/x86/dsputil_mmx.c
libavcodec/x86/dsputilenc_mmx.c
libavformat/mov.c
libavformat/rtpdec.c
libavformat/rtpproto.c
tests/codec-regression.sh
tests/ref/vsynth1/dnxhd_720p_10bit
tests/ref/vsynth2/dnxhd_720p_10bit

diff --cc ffprobe.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1,10 -1,13 +1,13 @@@
  /*
   * VC3/DNxHD decoder.
   * Copyright (c) 2007 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
+  * Copyright (c) 2011 MirriAd Ltd
+  *
+  * 10 bit support added by MirriAd Ltd, Joseph Artsimovich <joseph@mirriad.com>
   *
 - * This file is part of Libav.
 + * This file is part of FFmpeg.
   *
 - * Libav is free software; you can redistribute it and/or
 + * FFmpeg is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.
@@@ -53,9 -62,7 +62,8 @@@ static av_cold int dnxhd_decode_init(AV
      DNXHDContext *ctx = avctx->priv_data;
  
      ctx->avctx = avctx;
-     dsputil_init(&ctx->dsp, avctx);
      avctx->coded_frame = &ctx->picture;
 +    avcodec_get_frame_defaults(&ctx->picture);
      ctx->picture.type = AV_PICTURE_TYPE_I;
      ctx->picture.key_frame = 1;
      return 0;
@@@ -117,14 -118,27 +125,27 @@@ static int dnxhd_decode_header(DNXHDCon
      av_dlog(ctx->avctx, "width %d, heigth %d\n", ctx->width, ctx->height);
  
      if (buf[0x21] & 0x40) {
-         av_log(ctx->avctx, AV_LOG_ERROR, "10 bit per component\n");
-         return -1;
+         ctx->avctx->pix_fmt = PIX_FMT_YUV422P10;
+         ctx->avctx->bits_per_raw_sample = 10;
+         if (ctx->bit_depth != 10) {
+             dsputil_init(&ctx->dsp, ctx->avctx);
+             ctx->bit_depth = 10;
+             ctx->decode_dct_block = dnxhd_decode_dct_block_10;
+         }
+     } else {
+         ctx->avctx->pix_fmt = PIX_FMT_YUV422P;
+         ctx->avctx->bits_per_raw_sample = 8;
+         if (ctx->bit_depth != 8) {
+             dsputil_init(&ctx->dsp, ctx->avctx);
+             ctx->bit_depth = 8;
+             ctx->decode_dct_block = dnxhd_decode_dct_block_8;
+         }
      }
  
 -    ctx->cid = AV_RB32(buf + 0x28);
 -    av_dlog(ctx->avctx, "compression id %d\n", ctx->cid);
 +    cid = AV_RB32(buf + 0x28);
 +    av_dlog(ctx->avctx, "compression id %d\n", cid);
  
 -    if (dnxhd_init_vlc(ctx, ctx->cid) < 0)
 +    if (dnxhd_init_vlc(ctx, cid) < 0)
          return -1;
  
      if (buf_size < ctx->cid_table->coding_unit_size) {
@@@ -1,12 -1,14 +1,14 @@@
  /*
   * VC3/DNxHD encoder
   * Copyright (c) 2007 Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
+  * Copyright (c) 2011 MirriAd Ltd
   *
   * VC-3 encoder funded by the British Broadcasting Corporation
+  * 10 bit support added by MirriAd Ltd, Joseph Artsimovich <joseph@mirriad.com>
   *
 - * This file is part of Libav.
 + * This file is part of FFmpeg.
   *
 - * Libav is free software; you can redistribute it and/or
 + * FFmpeg is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.
Simple merge
Simple merge
Simple merge
@@@ -1231,17 -1277,3 +1277,4 @@@ void FUNCC(ff_put_pixels16x16)(uint8_t 
  void FUNCC(ff_avg_pixels16x16)(uint8_t *dst, uint8_t *src, int stride) {
      FUNCC(avg_pixels16)(dst, src, stride, 16);
  }
- static void FUNCC(clear_block)(DCTELEM *block)
- {
-     memset(block, 0, sizeof(dctcoef)*64);
- }
- /**
-  * memset(blocks, 0, sizeof(DCTELEM)*6*64)
-  */
- static void FUNCC(clear_blocks)(DCTELEM *blocks)
- {
-     memset(blocks, 0, sizeof(dctcoef)*6*64);
- }
 +
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0000000,4a815a9..b307050
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,4 +1,4 @@@
 -3ed972af47641d39a19916b0cd119120 *./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd
++cb29b6ae4e1562d95f9311991fef98df *./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd
+ 2293760 ./tests/data/vsynth1/dnxhd-720p-10bit.dnxhd
 -b64efb0b4eb934bb66f4530c12d5d7fa *./tests/data/dnxhd_720p_10bit.vsynth1.out.yuv
 -stddev:    6.27 PSNR: 32.18 MAXDIFF:   65 bytes:   760320/  7603200
++2f45bb1af7da5dd3dca870ac87237b7d *./tests/data/dnxhd_720p_10bit.vsynth1.out.yuv
++stddev:    6.27 PSNR: 32.18 MAXDIFF:   64 bytes:   760320/  7603200
index 0000000,734df4f..df30f67
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,4 +1,4 @@@
 -0b8389955cce583bd2db7d2e727a6f15 *./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd
++8648511257afb816b5b911706ca391db *./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd
+ 2293760 ./tests/data/vsynth2/dnxhd-720p-10bit.dnxhd
 -bde04e992df2473e89aef4460265332d *./tests/data/dnxhd_720p_10bit.vsynth2.out.yuv
 -stddev:    1.45 PSNR: 44.89 MAXDIFF:   22 bytes:   760320/  7603200
++391b6f5aa7c7b488b479cb43d420b860 *./tests/data/dnxhd_720p_10bit.vsynth2.out.yuv
++stddev:    1.35 PSNR: 45.46 MAXDIFF:   23 bytes:   760320/  7603200