Skip to content

Commit

Permalink
Design simplifications and nomenclature changes
Browse files Browse the repository at this point in the history
- Future Ans compressor will be a black box, meaning that there is no need on sharing 'Rle' and 'ZigZag' functions, or an identical loop procedure ('IterateLifts').
- Still, the loop procedure stays, as can be useful when implementing the '-ratio' option in the library itself.
  • Loading branch information
baAlex committed Aug 8, 2022
1 parent 7f8ec31 commit 3bdac1d
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 776 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ endif ()


set(AKO_SOURCES
"./library/compression-rle.c"
"./library/compression.c"
"./library/decode.c"
"./library/developer.c"
Expand Down Expand Up @@ -99,8 +98,4 @@ if (AKO_TESTS)
add_executable("cdf53-test" "./tests/cdf53-test.c")
target_include_directories("cdf53-test" PRIVATE "./library/")
target_link_libraries("cdf53-test" PRIVATE "ako-static")

add_executable("rle-test" "./tests/rle-test.c")
target_include_directories("rle-test" PRIVATE "./library/")
target_link_libraries("rle-test" PRIVATE "ako-static")
endif ()
20 changes: 1 addition & 19 deletions library/ako-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,12 @@ struct akoLiftHead
int16_t quantization;
};

// compression-rle.c:

#define AKO_RLE_BLOCKS_LEN_MAX 65535
#define AKO_RLE_DEFAULT_TRIGGER_DELAY 0

size_t akoRleEncode(size_t blocks_len, size_t trigger_delay, size_t input_size, size_t output_size,
const ucoeff_t* input, void* output);
size_t akoRleDecode(size_t blocks_len, size_t input_size, size_t output_size, const void* input, ucoeff_t* output);

size_t akoOldRleEncode(size_t blocks_len, size_t trigger_delay, size_t input_size, size_t output_size,
const ucoeff_t* input, void* output);
size_t akoOldRleDecode(size_t blocks_len, size_t input_size, size_t output_size, const void* input, ucoeff_t* output);

// compression.c:

size_t akoCompress(const struct akoSettings* s, size_t channels, size_t tile_w, size_t tile_h, coeff_t* input,
void* output);

size_t akoCompress(enum akoCompression, size_t channels, size_t tile_w, size_t tile_h, coeff_t* input, void* output);
size_t akoDecompress(enum akoCompression, size_t decompressed_size, size_t output_size, const void* input,
void* output);

void akoZigZagToUnsigned(size_t len, void* inout);
void akoZigZagToSigned(size_t len, void* inout);

// developer.c:

void akoSavePgmI16(size_t width, size_t height, size_t in_stride, const int16_t* in, const char* filename);
Expand Down
Loading

0 comments on commit 3bdac1d

Please sign in to comment.