Adding BUILD file under tensorflow/core/lib/png.
Also alias core:png_internal and core:android_png_internal into the newly created tensorflow/core/lib/png:png_io, and removed an unused header from scale_and_translate_op_test.cc. PiperOrigin-RevId: 278718751 Change-Id: Ida69c4925ee6b0236513a01541c2433a688a4b75
This commit is contained in:
parent
b422cb120c
commit
aac5c1cbce
@ -2153,7 +2153,6 @@ LIB_INTERNAL_PUBLIC_HEADERS = [
|
||||
"lib/monitoring/mobile_counter.h",
|
||||
"lib/monitoring/mobile_gauge.h",
|
||||
"lib/monitoring/mobile_sampler.h",
|
||||
"lib/png/png_io.h",
|
||||
"//tensorflow/core/lib/random:legacy_lib_internal_public_random_headers",
|
||||
"//tensorflow/core/lib/strings:legacy_lib_internal_public_string_headers",
|
||||
"lib/wav/wav_io.h",
|
||||
@ -2368,38 +2367,14 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
alias(
|
||||
name = "png_internal",
|
||||
srcs = ["lib/png/png_io.cc"],
|
||||
hdrs = [
|
||||
"lib/png/png_io.h",
|
||||
"//tensorflow/core/lib/bfloat16:bfloat16.h",
|
||||
"//tensorflow/core/lib/core:legacy_lib_core_stringpiece_header",
|
||||
"//tensorflow/core/platform:byte_order.h",
|
||||
"//tensorflow/core/platform:cpu_info.h",
|
||||
"//tensorflow/core/platform:default/integral_types.h",
|
||||
"//tensorflow/core/platform:default/logging.h",
|
||||
"//tensorflow/core/platform:logging.h",
|
||||
"//tensorflow/core/platform:macros.h",
|
||||
"//tensorflow/core/platform:platform.h",
|
||||
"//tensorflow/core/platform:png.h",
|
||||
"//tensorflow/core/platform:tstring.h",
|
||||
"//tensorflow/core/platform:types.h",
|
||||
],
|
||||
copts = tf_copts(),
|
||||
linkopts = select({
|
||||
"//tensorflow:freebsd": [],
|
||||
"//tensorflow:windows": [],
|
||||
"//conditions:default": ["-ldl"],
|
||||
}),
|
||||
deps = [
|
||||
":lib",
|
||||
":lib_internal",
|
||||
"//tensorflow/core/platform:png",
|
||||
"@com_google_absl//absl/base",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@zlib_archive//:zlib",
|
||||
],
|
||||
actual = "//tensorflow/core/lib/png:png_io",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "android_png_internal",
|
||||
actual = "//tensorflow/core/lib/png:png_io",
|
||||
)
|
||||
|
||||
cc_library(
|
||||
@ -2495,36 +2470,6 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "android_png_internal",
|
||||
srcs = if_android([
|
||||
"lib/png/png_io.cc",
|
||||
"//tensorflow/core/platform:png.h",
|
||||
]),
|
||||
hdrs = [
|
||||
"lib/png/png_io.h",
|
||||
"//tensorflow/core/lib/bfloat16:bfloat16.h",
|
||||
"//tensorflow/core/lib/core:legacy_lib_core_stringpiece_header",
|
||||
"//tensorflow/core/platform:byte_order.h",
|
||||
"//tensorflow/core/platform:cpu_info.h",
|
||||
"//tensorflow/core/platform:default/integral_types.h",
|
||||
"//tensorflow/core/platform:default/logging.h",
|
||||
"//tensorflow/core/platform:logging.h",
|
||||
"//tensorflow/core/platform:macros.h",
|
||||
"//tensorflow/core/platform:platform.h",
|
||||
"//tensorflow/core/platform:tstring.h",
|
||||
"//tensorflow/core/platform:types.h",
|
||||
],
|
||||
copts = tf_copts(),
|
||||
linkopts = ["-ldl"],
|
||||
deps = [
|
||||
"//tensorflow/core/platform:stringpiece",
|
||||
"//tensorflow/core/platform/default/build_config:logging",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@png",
|
||||
],
|
||||
)
|
||||
|
||||
tf_proto_library(
|
||||
name = "error_codes_proto_impl",
|
||||
srcs = ["protobuf/error_codes.proto"],
|
||||
@ -5182,10 +5127,7 @@ filegroup(
|
||||
name = "image_testdata",
|
||||
srcs = [
|
||||
# PNG data
|
||||
"lib/png/testdata/lena_gray.png",
|
||||
"lib/png/testdata/lena_rgba.png",
|
||||
"lib/png/testdata/lena_palette.png",
|
||||
"lib/png/testdata/lena_palette_trns.png",
|
||||
"//tensorflow/core/lib/png:testdata",
|
||||
# JPEG data
|
||||
"lib/jpeg/testdata/jpeg_merge_test1.jpg",
|
||||
"lib/jpeg/testdata/jpeg_merge_test1_cmyk.jpg",
|
||||
|
@ -25,7 +25,6 @@ limitations under the License.
|
||||
#include "tensorflow/core/kernels/ops_util.h"
|
||||
#include "tensorflow/core/kernels/sampling_kernels.h"
|
||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||
#include "tensorflow/core/lib/png/png_io.h"
|
||||
#include "tensorflow/core/lib/random/random.h"
|
||||
#include "tensorflow/core/lib/random/simple_philox.h"
|
||||
#include "tensorflow/core/lib/strings/str_util.h"
|
||||
|
32
tensorflow/core/lib/png/BUILD
Normal file
32
tensorflow/core/lib/png/BUILD
Normal file
@ -0,0 +1,32 @@
|
||||
package(
|
||||
default_visibility = [
|
||||
# tensorflow/core:lib effectively exposes all targets under tensorflow/core/lib/**
|
||||
"//tensorflow/core:__pkg__",
|
||||
],
|
||||
licenses = ["notice"], # Apache 2.0
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "png_io",
|
||||
srcs = ["png_io.cc"],
|
||||
hdrs = ["png_io.h"],
|
||||
deps = [
|
||||
"//tensorflow/core/platform:byte_order",
|
||||
"//tensorflow/core/platform:logging",
|
||||
"//tensorflow/core/platform:png",
|
||||
"//tensorflow/core/platform:stringpiece",
|
||||
"//tensorflow/core/platform:types",
|
||||
"@com_google_absl//absl/base",
|
||||
"@zlib_archive//:zlib",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "testdata",
|
||||
srcs = [
|
||||
"testdata/lena_gray.png",
|
||||
"testdata/lena_palette.png",
|
||||
"testdata/lena_palette_trns.png",
|
||||
"testdata/lena_rgba.png",
|
||||
],
|
||||
)
|
@ -36,8 +36,8 @@ limitations under the License.
|
||||
#include <vector>
|
||||
|
||||
#include "absl/base/casts.h"
|
||||
#include "tensorflow/core/lib/core/stringpiece.h"
|
||||
#include "tensorflow/core/platform/png.h"
|
||||
#include "tensorflow/core/platform/stringpiece.h"
|
||||
#include "tensorflow/core/platform/types.h"
|
||||
|
||||
namespace tensorflow {
|
||||
|
Loading…
Reference in New Issue
Block a user