Merge commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Dec 2014 12:16:46 +0000 (13:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Dec 2014 12:17:20 +0000 (13:17 +0100)
* commit 'ebd5320afd42d4315851f3e0ca7f5d4a6300eb68':
  vdpau: add support for 4:2:2 and 4:4:4 chroma sampling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264_slice.c
libavcodec/vdpau.c

@@@ -1031,32 -969,11 +1031,35 @@@ static enum AVPixelFormat get_pixel_for
          else
              *fmt++ = AV_PIX_FMT_YUV420P10;
          break;
 +    case 12:
 +        if (CHROMA444(h)) {
 +            if (h->avctx->colorspace == AVCOL_SPC_RGB) {
 +                *fmt++ = AV_PIX_FMT_GBRP12;
 +            } else
 +                *fmt++ = AV_PIX_FMT_YUV444P12;
 +        } else if (CHROMA422(h))
 +            *fmt++ = AV_PIX_FMT_YUV422P12;
 +        else
 +            *fmt++ = AV_PIX_FMT_YUV420P12;
 +        break;
 +    case 14:
 +        if (CHROMA444(h)) {
 +            if (h->avctx->colorspace == AVCOL_SPC_RGB) {
 +                *fmt++ = AV_PIX_FMT_GBRP14;
 +            } else
 +                *fmt++ = AV_PIX_FMT_YUV444P14;
 +        } else if (CHROMA422(h))
 +            *fmt++ = AV_PIX_FMT_YUV422P14;
 +        else
 +            *fmt++ = AV_PIX_FMT_YUV420P14;
 +        break;
      case 8:
+ #if CONFIG_H264_VDPAU_HWACCEL
+         *fmt++ = AV_PIX_FMT_VDPAU;
+ #endif
          if (CHROMA444(h)) {
 +            if (h->avctx->colorspace == AVCOL_SPC_YCGCO)
 +                av_log(h->avctx, AV_LOG_WARNING, "Detected unsupported YCgCo colorspace.\n");
              if (h->avctx->colorspace == AVCOL_SPC_RGB)
                  *fmt++ = AV_PIX_FMT_GBRP;
              else if (h->avctx->color_range == AVCOL_RANGE_JPEG)
Simple merge