diff options
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r-- | libavcodec/qsv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 8596f0d94e..5be6405d47 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -89,6 +89,18 @@ int ff_qsv_error(int mfx_err) } } +int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc) +{ + switch (format) { + case AV_PIX_FMT_YUV420P: + case AV_PIX_FMT_YUVJ420P: + *fourcc = MFX_FOURCC_NV12; + return AV_PIX_FMT_NV12; + default: + return AVERROR(ENOSYS); + } +} + static int qsv_load_plugins(mfxSession session, const char *load_plugins, void *logctx) { |