未验证 提交 cb7fe597 编写于 作者: L Lilo Huang 提交者: GitHub

Merge pull request #23172 from lilohuang:master

Adding HEVC/H265 FourCC support to MSMF video writer

* Adding HEVC/H265 fourcc to MSMF video writer

Adding HEVC/H265 fourcc to MSMF video writer. I have verified it with my own video input stream, and it works well on my workstation.

* Update video io testing

* Adding macro fence to get rid of compiler error

H265/HEVC encoder is only available in Windows or later. https://learn.microsoft.com/en-us/windows/win32/medfound/h-265---hevc-video-encoder

* Update test_video_io.cpp
上级 8ffc06ff
......@@ -2469,6 +2469,12 @@ const GUID CvVideoWriter_MSMF::FourCC2GUID(int fourcc)
#endif
case CV_FOURCC_MACRO('H', '2', '6', '4'):
return MFVideoFormat_H264; break;
#if defined(NTDDI_WIN10)
case CV_FOURCC_MACRO('H', '2', '6', '5'):
return MFVideoFormat_H265; break;
case CV_FOURCC_MACRO('H', 'E', 'V', 'C'):
return MFVideoFormat_HEVC; break;
#endif
case CV_FOURCC_MACRO('M', '4', 'S', '2'):
return MFVideoFormat_M4S2; break;
case CV_FOURCC_MACRO('M', 'J', 'P', 'G'):
......
......@@ -388,6 +388,7 @@ static Ext_Fourcc_PSNR synthetic_params[] = {
{"wmv", "WMV3", 30.f, CAP_MSMF},
{"wmv", "WVC1", 30.f, CAP_MSMF},
{"mov", "H264", 30.f, CAP_MSMF},
// {"mov", "HEVC", 30.f, CAP_MSMF}, // excluded due to CI issue: https://github.com/opencv/opencv/pull/23172
#endif
#ifdef HAVE_AVFOUNDATION
......@@ -991,6 +992,7 @@ static Ext_Fourcc_PSNR hw_codecs[] = {
#ifdef _WIN32
{"mp4", "MPEG", 29.f, CAP_MSMF},
{"mp4", "H264", 29.f, CAP_MSMF},
{"mp4", "HEVC", 29.f, CAP_MSMF},
#endif
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册