diff options
author | Yaroslav Pogrebnyak <yyyaroslav@gmail.com> | 2020-03-19 13:08:20 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2020-03-19 16:38:08 +0100 |
commit | 08d46cb58659af9d9f2bd2ef22d78ba512e7950c (patch) | |
tree | e20b20c1a7101ea90124ef5ae379a5431a4b8613 /libavutil/hwcontext_cuda.c | |
parent | f5f6fbb6b2e597b582ec4ec71d6ffefb777a4c71 (diff) | |
download | ffmpeg-08d46cb58659af9d9f2bd2ef22d78ba512e7950c.tar.gz |
avutil/hwcontext_cuda: add YUVA420P pixel format
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavutil/hwcontext_cuda.c')
-rw-r--r-- | libavutil/hwcontext_cuda.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavutil/hwcontext_cuda.c b/libavutil/hwcontext_cuda.c index a87c280cf7..4add65e009 100644 --- a/libavutil/hwcontext_cuda.c +++ b/libavutil/hwcontext_cuda.c @@ -39,6 +39,7 @@ typedef struct CUDAFramesContext { static const enum AVPixelFormat supported_formats[] = { AV_PIX_FMT_NV12, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_P010, AV_PIX_FMT_P016, @@ -274,7 +275,7 @@ static int cuda_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst, .srcPitch = src->linesize[i], .dstPitch = dst->linesize[i], .WidthInBytes = FFMIN(src->linesize[i], dst->linesize[i]), - .Height = src->height >> (i ? priv->shift_height : 0), + .Height = src->height >> ((i == 0 || i == 3) ? 0 : priv->shift_height), }; ret = CHECK_CU(cu->cuMemcpy2DAsync(&cpy, hwctx->stream)); |