Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restructure folders to avoid possible namespace collision #48

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ cc_library {
enabled: false,
host_supported: true,
vendor_available: true,
export_include_dirs: ["lib"],
local_include_dirs: ["lib"],
export_include_dirs: ["lib/include"],
local_include_dirs: ["lib/include"],

srcs: [
"lib/icc.cpp",
"lib/jpegr.cpp",
"lib/gainmapmath.cpp",
"lib/jpegrutils.cpp",
"lib/multipictureformat.cpp",
"lib/src/icc.cpp",
"lib/src/jpegr.cpp",
"lib/src/gainmapmath.cpp",
"lib/src/jpegrutils.cpp",
"lib/src/multipictureformat.cpp",
],

shared_libs: [
Expand All @@ -67,10 +67,10 @@ cc_library {
"liblog",
],

export_include_dirs: ["lib"],
export_include_dirs: ["lib/include"],

srcs: [
"lib/jpegencoderhelper.cpp",
"lib/src/jpegencoderhelper.cpp",
],
}

Expand All @@ -85,9 +85,9 @@ cc_library {
"liblog",
],

export_include_dirs: ["lib"],
export_include_dirs: ["lib/include"],

srcs: [
"lib/jpegdecoderhelper.cpp",
"lib/src/jpegdecoderhelper.cpp",
],
}
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ set_property(DIRECTORY PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
###########################################################
# File Lists
###########################################################
file(GLOB UHDR_LIB_LIST "${SOURCE_DIR}/*.cpp")
file(GLOB UHDR_LIB_LIST "${SOURCE_DIR}/src/*.cpp")
file(GLOB UHDR_TEST_LIST "${TESTS_DIR}/*.cpp")
file(GLOB UHDR_BM_LIST "${BENCHMARK_DIR}/*.cpp")
file(GLOB IMAGE_IO_LIST "${THIRD_PARTY_DIR}/image_io/src/**/*.cc")

set(COMMON_INCLUDE_LIST ${SOURCE_DIR} ${JPEG_INCLUDE_DIRS})
set(COMMON_INCLUDE_LIST ${SOURCE_DIR}/include/ ${JPEG_INCLUDE_DIRS})
set(COMMON_LIBS_LIST ${JPEG_LIBRARIES} Threads::Threads)

###########################################################
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This will generate the following files under *{build_directory/Release}*:
mkdir {build_directory}
cd {build_directory}
cmake -G "NMake Makefiles" -DUHDR_BUILD_TESTS=1 ../
cmake --build ./ --config=Release
cmake --build ./
ctest

This will generate the following files under *{build_directory}*:
Expand Down Expand Up @@ -132,5 +132,5 @@ Using libultrahdr
libultrahdr includes two classes of APIs, one to compress and the other to
decompress HDR images:

- Refer to [jpegr.h](lib/jpegr.h) for detailed description of various encode and decode api.
- Refer to [jpegr.h](lib/include/ultrahdr/jpegr.h) for detailed description of various encode and decode api.
- Refer to [ultrahdr_app.cpp](examples/ultrahdr_app.cpp) for examples of its usage.
2 changes: 1 addition & 1 deletion benchmark/benchmark_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <benchmark/benchmark.h>

#include "jpegr.h"
#include "ultrahdr/jpegr.h"

using namespace ultrahdr;

Expand Down
6 changes: 3 additions & 3 deletions examples/ultrahdr_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#include <fstream>
#include <iostream>

#include "ultrahdrcommon.h"
#include "gainmapmath.h"
#include "jpegr.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/gainmapmath.h"
#include "ultrahdr/jpegr.h"

using namespace ultrahdr;

Expand Down
2 changes: 1 addition & 1 deletion fuzzer/ultrahdr_dec_fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <iostream>
#include <memory>

#include "jpegr.h"
#include "ultrahdr/jpegr.h"

using namespace ultrahdr;

Expand Down
6 changes: 3 additions & 3 deletions fuzzer/ultrahdr_enc_fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <memory>
#include <random>

#include "ultrahdrcommon.h"
#include "gainmapmath.h"
#include "jpegr.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/gainmapmath.h"
#include "ultrahdr/jpegr.h"

using namespace ultrahdr;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/jpegr.h → lib/include/ultrahdr/jpegr.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#include <cfloat>

#include "ultrahdr.h"
#include "jpegdecoderhelper.h"
#include "jpegencoderhelper.h"
#include "ultrahdr/ultrahdr.h"
#include "ultrahdr/jpegdecoderhelper.h"
#include "ultrahdr/jpegencoderhelper.h"

namespace ultrahdr {

Expand Down
4 changes: 2 additions & 2 deletions lib/jpegrutils.h → lib/include/ultrahdr/jpegrutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#ifndef ULTRAHDR_JPEGRUTILS_H
#define ULTRAHDR_JPEGRUTILS_H

#include "ultrahdr.h"
#include "jpegr.h"
#include "ultrahdr/ultrahdr.h"
#include "ultrahdr/jpegr.h"

namespace ultrahdr {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#define Endian_SwapBE16(n) (n)
#endif

#include "ultrahdr.h"
#include "jpegr.h"
#include "gainmapmath.h"
#include "jpegrutils.h"
#include "ultrahdr/ultrahdr.h"
#include "ultrahdr/jpegr.h"
#include "ultrahdr/gainmapmath.h"
#include "ultrahdr/jpegrutils.h"

namespace ultrahdr {

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/gainmapmath.cpp → lib/src/gainmapmath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "gainmapmath.h"
#include "ultrahdr/gainmapmath.h"

namespace ultrahdr {

Expand Down
4 changes: 2 additions & 2 deletions lib/icc.cpp → lib/src/icc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#include <cstring>

#include "ultrahdrcommon.h"
#include "icc.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/icc.h"

namespace ultrahdr {

Expand Down
6 changes: 3 additions & 3 deletions lib/jpegdecoderhelper.cpp → lib/src/jpegdecoderhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

#include <cstring>

#include "ultrahdrcommon.h"
#include "ultrahdr.h"
#include "jpegdecoderhelper.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/ultrahdr.h"
#include "ultrahdr/jpegdecoderhelper.h"

using namespace std;

Expand Down
6 changes: 3 additions & 3 deletions lib/jpegencoderhelper.cpp → lib/src/jpegencoderhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#include <memory>
#include <string>

#include "ultrahdrcommon.h"
#include "ultrahdr.h"
#include "jpegencoderhelper.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/ultrahdr.h"
#include "ultrahdr/jpegencoderhelper.h"

namespace ultrahdr {

Expand Down
8 changes: 4 additions & 4 deletions lib/jpegr.cpp → lib/src/jpegr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include <mutex>
#include <thread>

#include "ultrahdrcommon.h"
#include "jpegr.h"
#include "icc.h"
#include "multipictureformat.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/jpegr.h"
#include "ultrahdr/icc.h"
#include "ultrahdr/multipictureformat.h"

#include "image_io/base/data_segment_data_source.h"
#include "image_io/jpeg/jpeg_info.h"
Expand Down
6 changes: 3 additions & 3 deletions lib/jpegrutils.cpp → lib/src/jpegrutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include <algorithm>
#include <cmath>

#include "ultrahdrcommon.h"
#include "jpegr.h"
#include "jpegrutils.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/jpegr.h"
#include "ultrahdr/jpegrutils.h"

#include "image_io/xml/xml_reader.h"
#include "image_io/xml/xml_writer.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "multipictureformat.h"
#include "ultrahdr/multipictureformat.h"

namespace ultrahdr {
size_t calculateMpfSize() {
Expand Down
2 changes: 1 addition & 1 deletion tests/gainmapmath_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>

#include "gainmapmath.h"
#include "ultrahdr/gainmapmath.h"

namespace ultrahdr {

Expand Down
2 changes: 1 addition & 1 deletion tests/icchelper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <gtest/gtest.h>

#include "icc.h"
#include "ultrahdr/icc.h"

namespace ultrahdr {

Expand Down
6 changes: 3 additions & 3 deletions tests/jpegdecoderhelper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <fstream>
#include <iostream>

#include "ultrahdrcommon.h"
#include "jpegdecoderhelper.h"
#include "icc.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/jpegdecoderhelper.h"
#include "ultrahdr/icc.h"

namespace ultrahdr {

Expand Down
6 changes: 3 additions & 3 deletions tests/jpegencoderhelper_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <fstream>
#include <iostream>

#include "ultrahdrcommon.h"
#include "ultrahdr.h"
#include "jpegencoderhelper.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/ultrahdr.h"
#include "ultrahdr/jpegencoderhelper.h"

namespace ultrahdr {

Expand Down
6 changes: 3 additions & 3 deletions tests/jpegr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include <fstream>
#include <iostream>

#include "ultrahdrcommon.h"
#include "jpegr.h"
#include "jpegrutils.h"
#include "ultrahdr/ultrahdrcommon.h"
#include "ultrahdr/jpegr.h"
#include "ultrahdr/jpegrutils.h"

//#define DUMP_OUTPUT

Expand Down