代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/third_party_libjpeg-turbo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
} else {
import("//build/ohos.gni")
}
jpeg_sources = [
"jcapimin.c",
"jcapistd.c",
"jccoefct.c",
"jccolor.c",
"jcdctmgr.c",
"jchuff.c",
"jcicc.c",
"jcinit.c",
"jcmainct.c",
"jcmarker.c",
"jcmaster.c",
"jcomapi.c",
"jcparam.c",
"jcphuff.c",
"jcprepct.c",
"jcsample.c",
"jctrans.c",
"jdapimin.c",
"jdapistd.c",
"jdatadst.c",
"jdatasrc.c",
"jdcoefct.c",
"jdcolor.c",
"jddctmgr.c",
"jdhuff.c",
"jdicc.c",
"jdinput.c",
"jdmainct.c",
"jdmarker.c",
"jdmaster.c",
"jdmerge.c",
"jdphuff.c",
"jdpostct.c",
"jdsample.c",
"jdtrans.c",
"jerror.c",
"jfdctflt.c",
"jfdctfst.c",
"jfdctint.c",
"jidctflt.c",
"jidctfst.c",
"jidctint.c",
"jidctred.c",
"jmemmgr.c",
"jmemnobs.c",
"jquant1.c",
"jquant2.c",
"jutils.c",
]
include_dirs = []
define_config = []
cflags = []
mkernel = defined(ohos_kernel_type) && ohos_kernel_type == "liteos_m"
if (mkernel || is_win) {
jpeg_sources += [ "jsimd_none.c" ]
define_config += [
"NO_PUTENV",
"NO_GETENV",
]
} else if (current_cpu == "arm" || current_cpu == "arm64") {
jpeg_sources += [
"simd/arm/jcgray-neon.c",
"simd/arm/jcphuff-neon.c",
"simd/arm/jcsample-neon.c",
"simd/arm/jdmerge-neon.c",
"simd/arm/jdsample-neon.c",
"simd/arm/jfdctfst-neon.c",
"simd/arm/jidctred-neon.c",
"simd/arm/jquanti-neon.c",
]
# NEON_INTRINSICS as default
jpeg_sources += [
"simd/arm/jccolor-neon.c",
"simd/arm/jidctfst-neon.c",
"simd/arm/jidctint-neon.c",
]
define_config += [ "NEON_INTRINSICS" ]
cflags += [ "-DNEON_INTRINSICS" ]
include_dirs += [ "//third_party/libjpeg-turbo/simd/arm" ]
if (current_cpu == "arm") {
jpeg_sources += [
"simd/arm/aarch32/jchuff-neon.c",
"simd/arm/aarch32/jsimd.c",
"simd/arm/jdcolor-neon.c",
"simd/arm/jfdctint-neon.c",
]
cflags += [
"-mfpu=neon",
"-mfloat-abi=softfp",
]
} else {
jpeg_sources += [
"simd/arm/aarch64/jchuff-neon.c",
"simd/arm/aarch64/jsimd.c",
"simd/arm/jdcolor-neon.c",
"simd/arm/jfdctint-neon.c",
]
}
} else {
jpeg_sources += [ "jsimd_none.c" ]
}
if (!defined(ohos_lite)) {
jpeg_sources += [
# enable arith codec
"jaricom.c",
"jcarith.c",
"jdarith.c",
"jdatadst-tj.c",
"jdatasrc-tj.c",
"rdbmp.c",
"rdppm.c",
"transupp.c",
# enable turbo
"turbojpeg.c",
"wrbmp.c",
"wrppm.c",
]
define_config += [
"C_ARITH_CODING_SUPPORTED=1", #Support arithmetic encoding
"D_ARITH_CODING_SUPPORTED=1", #Support arithmetic decoding
"BMP_SUPPORTED=1", #Support arithmetic decoding
"PPM_SUPPORTED=1", #Support arithmetic decoding
]
}
config("turbojpeg_config") {
include_dirs += [ "//third_party/libjpeg-turbo" ]
defines = define_config
}
if (defined(ohos_lite)) {
lite_library("libjpeg") {
if (ohos_kernel_type == "liteos_m") {
target_type = "static_library"
} else {
target_type = "shared_library"
}
sources = jpeg_sources
public_configs = [ ":turbojpeg_config" ]
if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
cflags += [
"--diag_suppress",
"Pa181,Pe301,Pe546",
]
cflags_cc = cflags
}
}
} else {
ohos_static_library("turbojpeg_static") {
sources = jpeg_sources
public_configs = [ ":turbojpeg_config" ]
}
ohos_shared_library("turbojpeg") {
sources = jpeg_sources
public_configs = [ ":turbojpeg_config" ]
part_name = "libjpeg-turbo"
subsystem_name = "thirdparty"
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。