diff options
author | Zhong Li <zhong.li@intel.com> | 2019-08-13 14:11:08 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2019-08-20 13:34:02 +0800 |
commit | f3dfd34f27ae11279baa9e2e2525e990b7c858f4 (patch) | |
tree | 5009b5a1f9c668f7f983784f4f047c61db133455 | |
parent | f115a2b7635d9e47b1299661ddaa6ac2386e9db1 (diff) | |
download | ffmpeg-f3dfd34f27ae11279baa9e2e2525e990b7c858f4.tar.gz |
lavc/qsv: make function qsv_map_fourcc() can be called externally
Signed-off-by: Zhong Li <zhong.li@intel.com>
-rw-r--r-- | libavcodec/qsv.c | 4 | ||||
-rw-r--r-- | libavcodec/qsv_internal.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 437ef7ca75..533804ac4d 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -207,7 +207,7 @@ int ff_qsv_print_warning(void *log_ctx, mfxStatus err, return ret; } -static enum AVPixelFormat qsv_map_fourcc(uint32_t fourcc) +enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc) { switch (fourcc) { case MFX_FOURCC_NV12: return AV_PIX_FMT_NV12; @@ -518,7 +518,7 @@ static mfxStatus qsv_frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req, frames_hwctx = frames_ctx->hwctx; frames_ctx->format = AV_PIX_FMT_QSV; - frames_ctx->sw_format = qsv_map_fourcc(i->FourCC); + frames_ctx->sw_format = ff_qsv_map_fourcc(i->FourCC); frames_ctx->width = i->Width; frames_ctx->height = i->Height; frames_ctx->initial_pool_size = req->NumFrameSuggested; diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index f701ceec8d..c50e9c792c 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -92,6 +92,8 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id); int ff_qsv_profile_to_mfx(enum AVCodecID codec_id, int profile); int ff_qsv_level_to_mfx(enum AVCodecID codec_id, int level); +enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc); + int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc); enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type); |