diff --git a/bundle.json b/bundle.json index 69c5530d496ceb58dd1dd4b869b55c9ec2dd8927..fbe85d7ec3801eaebbed7a8cdf689f7d71dd99a3 100644 --- a/bundle.json +++ b/bundle.json @@ -43,8 +43,7 @@ "c_utils", "player_framework", "window_manager", - "distributed_hardware_fwk", - "libyuv" + "distributed_hardware_fwk" ], "third_party": [ "libjpeg-turbo" diff --git a/distributedscreen.gni b/distributedscreen.gni index 9b03bc42b055546c1078bd9a5118f510c2c68ee3..596bfeeb3ac1a6bbdbce732d626341f2f3e8c059 100644 --- a/distributedscreen.gni +++ b/distributedscreen.gni @@ -28,7 +28,3 @@ fwk_services_path = "${distributedhardwarefwk_path}/services" fwk_interfaces_path = "${distributedhardwarefwk_path}/interfaces" ipc_interfaces_path = "${ipc_path}/interfaces" build_flags = [ "-Werror" ] - -declare_args() { - distributed_screen_common = true -} diff --git a/services/common/imageJpeg/src/jpeg_image_processor.cpp b/services/common/imageJpeg/src/jpeg_image_processor.cpp index c8c5a2be2d2a8a6fa27396eae28aecf628819fd2..a49cd1103a5504ea4c7685f2762cc2da415d0f97 100644 --- a/services/common/imageJpeg/src/jpeg_image_processor.cpp +++ b/services/common/imageJpeg/src/jpeg_image_processor.cpp @@ -22,10 +22,6 @@ #include #include -#ifdef LIBYUV -#include -#endif - #include "dscreen_errcode.h" #include "dscreen_log.h" @@ -277,21 +273,10 @@ void JpegImageProcessor::DecompressJpegToNV12(size_t jpegSize, uint8_t *inputDat JSAMPARRAY buffer = (*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo, JPOOL_IMAGE, row_stride, 1); uint32_t uvIndex = cinfo.output_width * cinfo.output_height; int32_t i = 0; -#ifdef LIBYUV - uint8_t *rgb = new uint8_t[cinfo.output_width * cinfo.output_height * RGBA_CHROMA]; - int32_t rgbIndex = 0; -#else int32_t yIndex = 0; -#endif while (cinfo.output_scanline < cinfo.output_height) { (void)jpeg_read_scanlines(&cinfo, buffer, 1); for (unsigned int j = 0 ; j < cinfo.output_width ; j++) { -#ifdef LIBYUV - rgb[rgbIndex++] = buffer[0][j * RGB_CHROMA + TWO]; - rgb[rgbIndex++] = buffer[0][j * RGB_CHROMA + 1]; - rgb[rgbIndex++] = buffer[0][j * RGB_CHROMA]; - rgb[rgbIndex++] = 0xff; -#else int32_t y = ((YR_PARAM * buffer[0][j * RGB_CHROMA] + YG_PARAM * buffer[0][j * RGB_CHROMA + 1] + YB_PARAM * buffer[0][j * RGB_CHROMA + TWO] + UA_PARAM) >> MOVEBITS) + YA_PARAM; int32_t u = ((UB_PARAM * buffer[0][j * RGB_CHROMA + TWO] - UR_PARAM * buffer[0][j * RGB_CHROMA] - @@ -303,17 +288,11 @@ void JpegImageProcessor::DecompressJpegToNV12(size_t jpegSize, uint8_t *inputDat outputData[uvIndex++] = static_cast((u < 0) ? 0 : (u > YUV_PARAM) ? YUV_PARAM : u); outputData[uvIndex++] = static_cast((v < 0) ? 0 : (v > YUV_PARAM) ? YUV_PARAM : v); } -#endif } ++i; } (void)jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); -#ifdef LIBYUV - libyuv::ARGBToNV12(rgb, cinfo.output_width * RGBA_CHROMA, outputData, cinfo.output_width, - outputData + uvIndex, cinfo.output_width, cinfo.output_width, cinfo.output_height); - delete [] rgb; -#endif } } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file diff --git a/services/screentransport/screensinktrans/BUILD.gn b/services/screentransport/screensinktrans/BUILD.gn index fa1bb0de1ab33c0918000e8a8f6e1e94f569ddbb..21829486a6098669a6cbddc8ea41ba4a4df280ab 100644 --- a/services/screentransport/screensinktrans/BUILD.gn +++ b/services/screentransport/screensinktrans/BUILD.gn @@ -85,11 +85,6 @@ ohos_shared_library("distributed_screen_sinktrans") { "player_framework:media_client", ] - if (!distributed_screen_common) { - cflags = [ "-DLIBYUV" ] - external_deps += [ "libyuv:yuv" ] - } - subsystem_name = "distributedhardware" part_name = "distributed_screen" diff --git a/services/screentransport/screensourcetrans/BUILD.gn b/services/screentransport/screensourcetrans/BUILD.gn index 49aa88c3c418b216bec3bf75cad0fdf7731f2e15..0dde974a946690d21f217a7edbedd7d6aee67f43 100644 --- a/services/screentransport/screensourcetrans/BUILD.gn +++ b/services/screentransport/screensourcetrans/BUILD.gn @@ -85,11 +85,6 @@ ohos_shared_library("distributed_screen_sourcetrans") { "player_framework:media_client", ] - if (!distributed_screen_common) { - cflags = [ "-DLIBYUV" ] - external_deps += [ "libyuv:yuv" ] - } - subsystem_name = "distributedhardware" part_name = "distributed_screen"