diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-11-13 21:59:11 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-12-02 09:03:31 +0100 |
commit | a74d9c1803462e0f7862f7b0659ab70939b92e15 (patch) | |
tree | 5a7e5e20b02a0db1d668957b0a3fa4d9515163d3 /video/decode | |
parent | 36eebc231e0ad94f31ed27f43e52b439a77a2560 (diff) |
vo_opengl: support for vda hardware decoding
The harder work was done in the previous commits. After that this feature comes
out almost for free.
The only problem is I can't get the textures created with CGLTexImageIOSurface2D
to download properly, thus the code performs download using some CoreVideo APIs.
If someone knows why download of textures created with CGLTexImageIOSurface2D
doesn't work please contact me :)
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/vda.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/decode/vda.c b/video/decode/vda.c index 2aba19111f..c20bdc9b5f 100644 --- a/video/decode/vda.c +++ b/video/decode/vda.c @@ -88,6 +88,8 @@ static void print_vda_error(int lev, char *message, int error_code) static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info, const char *decoder) { + hwdec_request_api(info, "vda"); + if (!find_codec(mp_codec_to_av_codec_id(decoder), FF_PROFILE_UNKNOWN)) return HWDEC_ERR_NO_CODEC; return 0; @@ -107,6 +109,7 @@ static int init_vda_decoder(struct lavc_ctx *ctx) .width = ctx->avctx->width, .height = ctx->avctx->height, .format = pe->vda_codec, + // equals to k2vuyPixelFormat (= YUY2/UYVY) .cv_pix_fmt_type = kCVPixelFormatType_422YpCbCr8, #if HAVE_VDA_LIBAVCODEC_REFCOUNTING |