VNC-151 Refactor libyuv usage

This commit is contained in:
El 2026-04-15 08:44:37 +00:00
parent d7cc8c4694
commit ed089a5fe6
No known key found for this signature in database
GPG key ID: EB3F4C9EA29CDE59
3 changed files with 5 additions and 11 deletions

View file

@ -218,7 +218,7 @@ endif()
set(HAVE_PAM ${ENABLE_PAM})
option(DEBUG_FFMPEG "Debug ffmpeg" OFF)
option(ENABLE_LIBYUV "Enable libyuv conversion support" ON)
option(ENABLE_XDAMAGE "Enable XDamage" OFF)
# Check for SSE2
check_cxx_compiler_flag(-msse2 COMPILER_SUPPORTS_SSE2)

View file

@ -152,15 +152,11 @@ else ()
set(RFB_LIBRARIES ${RFB_LIBRARIES} ${TBB_LIBRARIES})
endif ()
if (ENABLE_LIBYUV)
find_library(LIBYUV_LIBRARY NAMES yuv)
#pkg_check_modules(LIBYUV libyuv)
if (NOT LIBYUV_LIBRARY)
message(FATAL_ERROR "ENABLE_LIBYUV=ON but libyuv was not found")
endif ()
set(RFB_DEFINITIONS ${RFB_DEFINITIONS} LIBYUV_CONVERSION)
find_library(LIBYUV_LIBRARY NAMES yuv)
if (LIBYUV_LIBRARY)
set(RFB_LIBRARIES ${RFB_LIBRARIES} ${LIBYUV_LIBRARY})
else ()
message(FATAL_ERROR "libyuv was not found")
endif ()
add_library(rfb STATIC ${RFB_SOURCES})

View file

@ -329,7 +329,6 @@ namespace rfb {
int err{};
#if defined(LIBYUV_CONVERSION)
DEBUG_LOG(vlog, "Converting ARGB to NV12: src_stride=%d, dst_linesize[0]=%d, dst_linesize[1]=%d, dst_width=%d, dst_height=%d",
src_stride_bytes, frame->linesize[0], frame->linesize[1], dst_width, dst_height);
@ -339,7 +338,6 @@ namespace rfb {
return false;
}
DEBUG_LOG(vlog, "ARGB to NV12 conversion successful");
#endif
frame->pts = pts++;
auto *hw_frame = hw_frame_guard.get();