Merge commit '92736c74fb1633e36f7134a880422a9b7db14d3f'
authorHendrik Leppkes <h.leppkes@gmail.com>
Mon, 14 Nov 2016 14:20:00 +0000 (15:20 +0100)
committerHendrik Leppkes <h.leppkes@gmail.com>
Mon, 14 Nov 2016 14:20:00 +0000 (15:20 +0100)
* commit '92736c74fb1633e36f7134a880422a9b7db14d3f':
  qsvdec: add support for P010 (10-bit 420) decoding

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
libavcodec/qsv.c
libavcodec/qsvdec.c
libavcodec/qsvdec_h2645.c

Simple merge
@@@ -133,12 -139,12 +139,12 @@@ static int qsv_decode_init(AVCodecConte
          return ret;
  
      param.mfx.CodecId      = ret;
 -    param.mfx.CodecProfile = avctx->profile;
 -    param.mfx.CodecLevel   = avctx->level;
 +    param.mfx.CodecProfile = ff_qsv_profile_to_mfx(avctx->codec_id, avctx->profile);
 +    param.mfx.CodecLevel   = avctx->level == FF_LEVEL_UNKNOWN ? MFX_LEVEL_UNKNOWN : avctx->level;
  
-     param.mfx.FrameInfo.BitDepthLuma   = 8;
-     param.mfx.FrameInfo.BitDepthChroma = 8;
-     param.mfx.FrameInfo.Shift          = 0;
+     param.mfx.FrameInfo.BitDepthLuma   = desc->comp[0].depth;
+     param.mfx.FrameInfo.BitDepthChroma = desc->comp[0].depth;
+     param.mfx.FrameInfo.Shift          = desc->comp[0].depth > 8;
      param.mfx.FrameInfo.FourCC         = q->fourcc;
      param.mfx.FrameInfo.Width          = avctx->coded_width;
      param.mfx.FrameInfo.Height         = avctx->coded_height;
@@@ -266,9 -266,10 +266,10 @@@ AVCodec ff_hevc_qsv_decoder = 
      .decode         = qsv_decode_frame,
      .flush          = qsv_decode_flush,
      .close          = qsv_decode_close,
 -    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
 +    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
      .priv_class     = &hevc_class,
      .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+                                                     AV_PIX_FMT_P010,
                                                      AV_PIX_FMT_QSV,
                                                      AV_PIX_FMT_NONE },
  };
@@@ -304,9 -305,10 +305,10 @@@ AVCodec ff_h264_qsv_decoder = 
      .decode         = qsv_decode_frame,
      .flush          = qsv_decode_flush,
      .close          = qsv_decode_close,
 -    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1,
 +    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
      .priv_class     = &class,
      .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+                                                     AV_PIX_FMT_P010,
                                                      AV_PIX_FMT_QSV,
                                                      AV_PIX_FMT_NONE },
  };