mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
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
This commit is contained in:
parent
8ffc06ff72
commit
cb7fe597a5
@ -2469,6 +2469,12 @@ const GUID CvVideoWriter_MSMF::FourCC2GUID(int fourcc)
|
|||||||
#endif
|
#endif
|
||||||
case CV_FOURCC_MACRO('H', '2', '6', '4'):
|
case CV_FOURCC_MACRO('H', '2', '6', '4'):
|
||||||
return MFVideoFormat_H264; break;
|
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'):
|
case CV_FOURCC_MACRO('M', '4', 'S', '2'):
|
||||||
return MFVideoFormat_M4S2; break;
|
return MFVideoFormat_M4S2; break;
|
||||||
case CV_FOURCC_MACRO('M', 'J', 'P', 'G'):
|
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", "WMV3", 30.f, CAP_MSMF},
|
||||||
{"wmv", "WVC1", 30.f, CAP_MSMF},
|
{"wmv", "WVC1", 30.f, CAP_MSMF},
|
||||||
{"mov", "H264", 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
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_AVFOUNDATION
|
#ifdef HAVE_AVFOUNDATION
|
||||||
@ -991,6 +992,7 @@ static Ext_Fourcc_PSNR hw_codecs[] = {
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
{"mp4", "MPEG", 29.f, CAP_MSMF},
|
{"mp4", "MPEG", 29.f, CAP_MSMF},
|
||||||
{"mp4", "H264", 29.f, CAP_MSMF},
|
{"mp4", "H264", 29.f, CAP_MSMF},
|
||||||
|
{"mp4", "HEVC", 29.f, CAP_MSMF},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user