]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'dc923bc23b3efd949d0bf67ff1abdb95059e5843'
authorHendrik Leppkes <h.leppkes@gmail.com>
Thu, 22 Oct 2015 13:54:14 +0000 (15:54 +0200)
committerHendrik Leppkes <h.leppkes@gmail.com>
Thu, 22 Oct 2015 13:55:43 +0000 (15:55 +0200)
* commit 'dc923bc23b3efd949d0bf67ff1abdb95059e5843':
  qsvenc: add an API for allocating opaque surfaces

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

diff --cc doc/APIchanges
index b9cdce6a28b44948f925c37574dd089af69fa1f6,5be090abc5a5656c61c5def5db8429dca1224e7e..f0bfffcc0e5cb1a5f54f50784dd9e14d57f0d569
@@@ -15,10 -13,10 +15,13 @@@ libavutil:     2015-08-2
  
  API changes, most recent first:
  
 -2015-xx-xx - xxxxxxx - lavc 57.0.0 - qsv.h
++2015-10-22 - xxxxxxx - lavc 57.8.100 / lavc 57.0.0 - qsv.h
+   Add an API for allocating opaque surfaces.
 -2015-xx-xx - xxxxxxx - lavu 55.2.0 - dict.h
 +2015-10-15 - xxxxxxx - lavf 57.4.100
 +  Remove the latm demuxer that was a duplicate of the loas demuxer.
 +
 +2015-10-14 - xxxxxxx - lavu 55.4.100 / lavu 55.2.0 - dict.h
    Change return type of av_dict_copy() from void to int, so that a proper
    error code can be reported.
  
Simple merge
index 08ff413ec46ae70a4f269797e97b20a1aa6378cd,d17ceaae76a16bcc3f962f807a7affc80221c0d6..df1f7778bd2e93e4142fd68cd77cf3b19927c339
@@@ -157,27 -134,7 +157,27 @@@ static int init_video_param(AVCodecCont
          q->extco.CAVLC                = avctx->coder_type == FF_CODER_TYPE_VLC ?
                                          MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
  
-         q->extparam_internal[0] = (mfxExtBuffer *)&q->extco;
 +        q->extco.PicTimingSEI         = q->pic_timing_sei ?
 +                                        MFX_CODINGOPTION_ON : MFX_CODINGOPTION_UNKNOWN;
 +
-         q->extparam_internal[1] = (mfxExtBuffer *)&q->extco2;
+         q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco;
 +
 +#if QSV_VERSION_ATLEAST(1,6)
 +        q->extco2.Header.BufferId      = MFX_EXTBUFF_CODING_OPTION2;
 +        q->extco2.Header.BufferSz      = sizeof(q->extco2);
 +
 +#if QSV_VERSION_ATLEAST(1,7)
 +        // valid value range is from 10 to 100 inclusive
 +        // to instruct the encoder to use the default value this should be set to zero
 +        q->extco2.LookAheadDepth        = q->look_ahead_depth != 0 ? FFMAX(10, q->look_ahead_depth) : 0;
 +#endif
 +#if QSV_VERSION_ATLEAST(1,8)
 +        q->extco2.LookAheadDS           = q->look_ahead_downsampling;
 +#endif
 +
++        q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco2;
 +
 +#endif
      }
  
      return 0;
index 13f1419a767183f21c2c16937d421b311f81597e,fdfc18be675fadab30cc2a1e9b7ccba7a6082afd..3dd7afe04173495deb3e8699e06a1c0074937e03
@@@ -50,12 -49,14 +50,17 @@@ typedef struct QSVEncContext 
      mfxFrameAllocRequest req;
  
      mfxExtCodingOption  extco;
-     mfxExtBuffer  *extparam_internal[2];
- #else
-     mfxExtBuffer  *extparam_internal[1];
 +#if QSV_VERSION_ATLEAST(1,6)
 +    mfxExtCodingOption2 extco2;
 -    mfxExtBuffer  *extparam_internal[2];
 +#endif
+     mfxExtOpaqueSurfaceAlloc opaque_alloc;
+     mfxFrameSurface1       **opaque_surfaces;
+     AVBufferRef             *opaque_alloc_buf;
++    mfxExtBuffer  *extparam_internal[3];
+     int         nb_extparam_internal;
      mfxExtBuffer **extparam;
  
      AVFifoBuffer *async_fifo;