[FFmpeg-cvslog] avutil/hwcontext_cuda: add YUVA420P pixel format
Yaroslav Pogrebnyak
git at videolan.org
Thu Mar 19 17:39:13 EET 2020
ffmpeg | branch: master | Yaroslav Pogrebnyak <yyyaroslav at gmail.com> | Thu Mar 19 13:08:20 2020 +0100| [08d46cb58659af9d9f2bd2ef22d78ba512e7950c] | committer: Timo Rothenpieler
avutil/hwcontext_cuda: add YUVA420P pixel format
Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08d46cb58659af9d9f2bd2ef22d78ba512e7950c
---
libavutil/hwcontext_cuda.c | 3 ++-
libavutil/version.h | 2 +-
2 files changed, 3 insertions(+), 2 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));
diff --git a/libavutil/version.h b/libavutil/version.h
index 8c4f91bb8f..fb66893a65 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 42
-#define LIBAVUTIL_VERSION_MICRO 100
+#define LIBAVUTIL_VERSION_MICRO 101
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list