Skip to content

Commit e922883

Browse files
committed
Another trial to fix compilation, make ubuntu gcc static_assert conditionally.
1 parent a3bf557 commit e922883

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

avs_core/convert/intel/convert_planar_avx2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ static void convert_yuv_to_planarrgb_avx2_internal(BYTE* (&dstp)[3], int(&dstPit
595595
}
596596
else {
597597
// this path must error out, never can be used, redirected to full-float workflow for this case due to speed reasons.
598-
static_assert(false, "64-bit patch needed for RGB->YUV conversion, but not supported in this path. Redirected to float workflow instead.");
598+
static_assert(!would_need_64bit_v_patch, "64-bit patch needed for RGB->YUV conversion, but not supported in this path. Redirected to float workflow instead.");
599599
v_patch_G = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
600600
v_patch_B = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.u_r + m.u_g + m.u_b) + chroma_offset_out_for_patch);
601601
v_patch_R = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.v_r + m.v_g + m.v_b) + chroma_offset_out_for_patch);
@@ -612,7 +612,7 @@ static void convert_yuv_to_planarrgb_avx2_internal(BYTE* (&dstp)[3], int(&dstPit
612612
}
613613
else {
614614
// this path must error out, never can be used, redirected to full-float workflow for this case due to speed reasons.
615-
static_assert(false, "64-bit patch needed for RGB->Y conversion, but not supported in this path. Redirected to float workflow instead.");
615+
static_assert(!would_need_64bit_v_patch, "64-bit patch needed for RGB->Y conversion, but not supported in this path. Redirected to float workflow instead.");
616616
v_patch_G = _mm256_set1_epi64x(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
617617
//v_patch_B = _mm256_set1_epi64x(0); // no chroma
618618
//v_patch_R = _mm256_set1_epi64x(0); // no chroma

avs_core/convert/intel/convert_planar_sse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static void convert_yuv_to_planarrgb_sse2_internal(BYTE* (&dstp)[3], int(&dstPit
276276
v_patch_R = _mm_set1_epi32(luma_or_rgbin_pivot * (m.v_r + m.v_g + m.v_b) + chroma_offset_out_for_patch);
277277
}
278278
else {
279-
static_assert(false, "64-bit patch needed for RGB->YUV conversion, but not supported in this path. Redirected to float workflow instead.");
279+
static_assert(!would_need_64bit_v_patch, "64-bit patch needed for RGB->YUV conversion, but not supported in this path. Redirected to float workflow instead.");
280280
v_patch_G = _mm_set1_epi64x(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
281281
v_patch_B = _mm_set1_epi64x(luma_or_rgbin_pivot * (m.u_r + m.u_g + m.u_b) + chroma_offset_out_for_patch);
282282
v_patch_R = _mm_set1_epi64x(luma_or_rgbin_pivot * (m.v_r + m.v_g + m.v_b) + chroma_offset_out_for_patch);
@@ -287,7 +287,7 @@ static void convert_yuv_to_planarrgb_sse2_internal(BYTE* (&dstp)[3], int(&dstPit
287287
v_patch_G = _mm_set1_epi32(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
288288
}
289289
else {
290-
static_assert(false, "64-bit patch needed for RGB->Y conversion, but not supported in this path. Redirected to float workflow instead.");
290+
static_assert(!would_need_64bit_v_patch, "64-bit patch needed for RGB->Y conversion, but not supported in this path. Redirected to float workflow instead.");
291291
v_patch_G = _mm_set1_epi64x(luma_or_rgbin_pivot * (m.y_r + m.y_g + m.y_b) + offset_out_for_patch);
292292
}
293293
}

0 commit comments

Comments
 (0)