Merge commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Dec 2014 12:06:25 +0000 (13:06 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Dec 2014 12:06:25 +0000 (13:06 +0100)
* commit 'c220a60f92dde9c7c118fc4deddff5c1f617cda9':
  vdpau: add helper for surface chroma type and size

Conflicts:
libavcodec/vdpau.c
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
doc/APIchanges
libavcodec/vdpau.c
libavcodec/vdpau.h
libavcodec/version.h

diff --cc doc/APIchanges
Simple merge
index ea239bb311a7c209f6b48736ee19e352b19427fd,ea67314f93babfb9d42582792b7d6754e56e509f..8577c19b531031f89c859c5b48727f720779140a
@@@ -64,13 -64,46 +64,53 @@@ static int vdpau_error(VdpStatus status
      }
  }
  
 +AVVDPAUContext *av_alloc_vdpaucontext(void)
 +{
 +    return av_vdpau_alloc_context();
 +}
 +
 +MAKE_ACCESSORS(AVVDPAUContext, vdpau_hwaccel, AVVDPAU_Render2, render2)
 +
+ int av_vdpau_get_surface_parameters(AVCodecContext *avctx,
+                                     VdpChromaType *type,
+                                     uint32_t *width, uint32_t *height)
+ {
+     VdpChromaType t;
+     uint32_t w = avctx->coded_width;
+     uint32_t h = avctx->coded_height;
+     /* See <vdpau/vdpau.h> for per-type alignment constraints. */
+     switch (avctx->sw_pix_fmt) {
+     case AV_PIX_FMT_YUV420P:
+     case AV_PIX_FMT_YUVJ420P:
+         t = VDP_CHROMA_TYPE_420;
+         w = (w + 1) & ~1;
+         h = (h + 3) & ~3;
+         break;
+     case AV_PIX_FMT_YUV422P:
+     case AV_PIX_FMT_YUVJ422P:
+         t = VDP_CHROMA_TYPE_422;
+         w = (w + 1) & ~1;
+         h = (h + 1) & ~1;
+         break;
+     case AV_PIX_FMT_YUV444P:
+     case AV_PIX_FMT_YUVJ444P:
+         t = VDP_CHROMA_TYPE_444;
+         h = (h + 1) & ~1;
+         break;
+     default:
+         return AVERROR(ENOSYS);
+     }
+     if (type)
+         *type = t;
+     if (width)
+         *width = w;
+     if (height)
+         *height = h;
+     return 0;
+ }
  int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile,
                           int level)
  {
Simple merge
index 7e33da02d91dfebf5ae1a716f04e2399ec452e6a,d5393fa530de5ba57d53d9adb8b6912025b33f5e..d8c891de2227218cbfacadacd9095baf3e5f5fb7
@@@ -29,8 -29,8 +29,8 @@@
  #include "libavutil/version.h"
  
  #define LIBAVCODEC_VERSION_MAJOR 56
- #define LIBAVCODEC_VERSION_MINOR  18
 -#define LIBAVCODEC_VERSION_MINOR 10
 -#define LIBAVCODEC_VERSION_MICRO  0
++#define LIBAVCODEC_VERSION_MINOR  19
 +#define LIBAVCODEC_VERSION_MICRO 100
  
  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                 LIBAVCODEC_VERSION_MINOR, \