Skip to content

Commit ab4f1fb

Browse files
Merge branch 'aous72:master' into feature/add-openexr-support
2 parents 74ba55a + 811f3a2 commit ab4f1fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+7656
-1127
lines changed

.github/workflows/ccp-workflow.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
jobs:
1111
build:
1212
strategy:
13+
fail-fast: false
1314
matrix:
1415
include: [
1516
{ system: MacOS, runner: macos-latest },
@@ -29,6 +30,7 @@ jobs:
2930

3031
build_windows:
3132
strategy:
33+
fail-fast: false
3234
matrix:
3335
include: [
3436
{ system: Windows, runner: windows-latest },
@@ -46,9 +48,11 @@ jobs:
4648

4749
test:
4850
strategy:
51+
fail-fast: false
4952
matrix:
5053
include: [
51-
{ system: MacOS, runner: macos-latest },
54+
{ system: MacOS-13, runner: macos-13 },
55+
{ system: MacOS-latest, runner: macos-latest },
5256
{ system: Ubuntu-latest, runner: ubuntu-latest },
5357
]
5458
name: ${{ matrix.system }} Test
@@ -67,6 +71,7 @@ jobs:
6771

6872
test_windows:
6973
strategy:
74+
fail-fast: false
7075
matrix:
7176
include: [
7277
{ system: Windows, runner: windows-latest },

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646

4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@v3
49+
uses: actions/checkout@v4
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@v2
53+
uses: github/codeql-action/init@v3
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -64,7 +64,7 @@ jobs:
6464
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6565
# If this step fails, then you should remove it and run the build manually (see below)
6666
- name: Autobuild
67-
uses: github/codeql-action/autobuild@v2
67+
uses: github/codeql-action/autobuild@v3
6868

6969
# ℹ️ Command-line programs to run using the OS shell.
7070
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -77,6 +77,6 @@ jobs:
7777
# ./location_of_script_within_repo/buildscript.sh
7878

7979
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v2
80+
uses: github/codeql-action/analyze@v3
8181
with:
8282
category: "/language:${{matrix.language}}"

src/apps/common/ojph_img_io.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace ojph {
6464
////////////////////////////////////////////////////////////////////////////
6565
// defined elsewhere
6666
class mem_fixed_allocator;
67-
struct line_buf;
67+
class line_buf;
6868

6969
////////////////////////////////////////////////////////////////////////////
7070
//
@@ -779,7 +779,7 @@ namespace ojph {
779779
ui32 bit_depth_of_data[4];
780780
ui32 bytes_per_sample;
781781
ui8* buffer;
782-
ui32 buffer_size;
782+
size_t buffer_size;
783783
ui32 cur_line, samples_per_line;
784784
};
785785
#endif /* OJPH_ENABLE_TIFF_SUPPORT */
@@ -856,7 +856,7 @@ namespace ojph {
856856
const char* fname;
857857
bool is_signed;
858858
ui32 bit_depth, bytes_per_sample;
859-
si32 lower_val, upper_val;
859+
si64 lower_val, upper_val;
860860
ui32 width;
861861
ui8* buffer;
862862
ui32 buffer_size;

src/apps/ojph_compress/ojph_compress.cpp

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -600,20 +600,25 @@ int main(int argc, char * argv[]) {
600600
".pfm files receive special treatment. Currently, lossy compression\n"
601601
"with these files is not supported, only lossless. When these files are\n"
602602
"used, the NLT segment marker is automatically inserted into the\n"
603-
"codestream. For these files the following arguments can be useful\n"
604-
" -signed a comma - separated list of true or false parameters, one\n"
603+
"codestream when needed, as explained shortly. The following arguments\n"
604+
"can be useful for this file type.\n"
605+
" -signed a comma-separated list of true or false parameters, one\n"
605606
" for each component; for example: true,false,false.\n"
606-
" The sign only affects how values are treated; for negative\n"
607-
" values the standard requires a special non-linear\n"
608-
" transformation. When signed is false, no transformation\n"
609-
" is employed, as we assume all values are 0 or positive.\n"
610-
" When signed is true, the aforementioned transformation is\n"
611-
" employed on negative values only.\n"
607+
" If you are sure that all sample values are positive or 0,\n"
608+
" set the corresponding entry to false; otherwise set it to\n"
609+
" true.\n"
610+
" When a component entry is set to true, an NLT segment\n"
611+
" marker segment is inserted into the codestream.\n"
612+
" The NLT segment specifies a non-linear transform that\n"
613+
" changes only negative values, producing better coding\n"
614+
" efficiency.\n"
615+
" The NLT segment marker might be less supported in other\n"
616+
" encoders.\n"
612617
" -bit_depth a comma-separated list of bit depth values, one per \n"
613618
" component; for example: 12,10,10.\n"
614619
" Floating value numbers are treated as integers, and they\n"
615620
" are shifted to the right, keeping only the specified\n"
616-
" number of bits. Note that a bit depth of 28 upwards is not\n"
621+
" number of bits. Up to 32 bits (which is the default) are\n"
617622
" supported.\n"
618623

619624
"\n";
@@ -779,10 +784,6 @@ int main(int argc, char * argv[]) {
779784
assert(num_comps == 1 || num_comps == 3);
780785
siz.set_num_components(num_comps);
781786

782-
if (bit_depth[0] == 0)
783-
OJPH_ERROR(0x01000091,
784-
"-bit_depth must be specified (this is temporary only).\n");
785-
786787
if (bit_depth[0] != 0) // one was set
787788
if (num_bit_depths < num_comps) // but if not enough, repeat
788789
for (ojph::ui32 c = num_bit_depths; c < num_comps; ++c)
@@ -851,11 +852,8 @@ int main(int argc, char * argv[]) {
851852
nlt.set_type3_transformation(c, true);
852853
}
853854
else
854-
OJPH_ERROR(0x01000093, "The support for pfm image is not "
855-
"complete; I need to figure how to modify the interface "
856-
"to better support the exchange of floating point data. "
857-
"Feeding float point data is not supported yet, unless it "
858-
"is for lossless compression.");
855+
OJPH_ERROR(0x01000093, "We currently support lossless only for "
856+
"pfm images; this may change in the future.");
859857

860858
codestream.set_planar(false);
861859
if (profile_string[0] != '\0')

0 commit comments

Comments
 (0)