Skip to content

Commit 2b97ac6

Browse files
committed
fix: remove avx2 requirment for windows
1 parent 8139e1e commit 2b97ac6

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
CasparCG 2.5.0 Stable
22
==========================================
33

4-
### Important
5-
6-
We recommend running CasparCG 2.5 on CPUs which support AVX2. Officially Chrome claims to require AVX2, and it is required for some of our in-progress HDR support.
7-
Intel CPUs based on Haswell or later support this, which were first released to consumers in 2013, or 2014 for servers.
8-
9-
Starting with CasparCG 2.6, this will become a requirement
10-
114
### Core
125
##### Improvements
136
* Initial support for HDR. This is limited to a subset of producers and consumers at this stage.

src/CMakeModules/Bootstrap_Windows.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,4 @@ string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
281281

282282
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa /Zi /W4 /WX /MP /fp:fast /Zm192 /FIcommon/compiler/vs/disable_silly_warnings.h")
283283
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D TBB_USE_ASSERT=1 /D TBB_USE_DEBUG /bigobj")
284-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /arch:AVX2 /Ot /Gy /bigobj")
284+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /arch:AVX /Ot /Gy /bigobj")

src/modules/decklink/consumer/config.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
#include <common/param.h>
2525
#include <common/ptree.h>
2626

27+
#ifdef WIN32
28+
#include <isa_availability.h>
29+
30+
#define CHECK_INSTRUCTION_SUPPORT(a, v) (__check_arch_support((a), (v)) || __check_isa_support((a), (v)))
31+
#endif
32+
2733
namespace caspar { namespace decklink {
2834

2935
port_configuration parse_output_config(const boost::property_tree::wptree& ptree,
@@ -130,6 +136,14 @@ configuration parse_xml_config(const boost::property_tree::wptree& ptree,
130136
CASPAR_THROW_EXCEPTION(user_error()
131137
<< msg_info(L"The decklink consumer only supports rgba output on 8-bit channels"));
132138
}
139+
140+
#ifdef WIN32
141+
if (!CHECK_INSTRUCTION_SUPPORT(__IA_SUPPORT_VECTOR256, 0) &&
142+
config.pixel_format != configuration::pixel_format_t::rgba) {
143+
CASPAR_THROW_EXCEPTION(user_error()
144+
<< msg_info(L"You cpu does not support the features needed for yuv output"));
145+
}
146+
#endif
133147
}
134148

135149
config.primary = parse_output_config(ptree, format_repository);

0 commit comments

Comments
 (0)