summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-07-14 12:31:47 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-22 19:08:13 +0200
commit21962261c74aed4df00ae8348a5e2d1ecb67c52d (patch)
treeee1a317a78d6a3fb7c1119a6ae01ee67b230bc15
parentf65285aba0df7d46298abe0c945dfee05cbc6028 (diff)
qsv: handle the semi-packed formats in map_fourcc as well
This will allow using this function for encoding as well, where the input format is already the semi-packed version.
-rw-r--r--libavcodec/qsv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index 5f7653a3bf..c8b397810f 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -94,9 +94,11 @@ int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc)
switch (format) {
case AV_PIX_FMT_YUV420P:
case AV_PIX_FMT_YUVJ420P:
+ case AV_PIX_FMT_NV12:
*fourcc = MFX_FOURCC_NV12;
return AV_PIX_FMT_NV12;
case AV_PIX_FMT_YUV420P10:
+ case AV_PIX_FMT_P010:
*fourcc = MFX_FOURCC_P010;
return AV_PIX_FMT_P010;
default: