Skip to content

Commit

Permalink
Globally register openhtj2k codec
Browse files Browse the repository at this point in the history
  • Loading branch information
martaiborra committed Sep 12, 2023
1 parent 219f2d6 commit ea1c222
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/blosc2.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ enum {
BLOSC2_GLOBAL_REGISTERED_CODECS_START = 32,
BLOSC2_GLOBAL_REGISTERED_CODECS_STOP = 159,
//!< Blosc-registered codecs must be between 31 - 159.
BLOSC2_GLOBAL_REGISTERED_CODECS = 1,
BLOSC2_GLOBAL_REGISTERED_CODECS = 5,
//!< Number of Blosc-registered codecs at the moment.
BLOSC2_USER_REGISTERED_CODECS_START = 160,
BLOSC2_USER_REGISTERED_CODECS_STOP = 255,
Expand Down
1 change: 1 addition & 0 deletions include/blosc2/codecs-registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum {
BLOSC_CODEC_ZFP_FIXED_ACCURACY = 33,
BLOSC_CODEC_ZFP_FIXED_PRECISION = 34,
BLOSC_CODEC_ZFP_FIXED_RATE = 35,
BLOSC_CODEC_OPENHTJ2K = 36,
};

void register_codecs(void);
Expand Down
9 changes: 9 additions & 0 deletions plugins/codecs/codecs-registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,13 @@ void register_codecs(void) {
zfp_rate.decoder = &zfp_rate_decompress;
zfp_rate.compname = "zfp_rate";
register_codec_private(&zfp_rate);

blosc2_codec openhtj2k;
openhtj2k.compcode = BLOSC_CODEC_OPENHTJ2K;
openhtj2k.version = 1;
openhtj2k.complib = BLOSC_CODEC_OPENHTJ2K;
openhtj2k.encoder = NULL;
openhtj2k.decoder = NULL;
openhtj2k.compname = "openhtj2k";
register_codec_private(&openhtj2k);
}

0 comments on commit ea1c222

Please sign in to comment.