Skip to content
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
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ Changes
- Remove unused ax_with_libdeflate.m4 file from build system.


Release 1.4.0: Februrary 2023
-----------------------------
Release 1.4.0: February 2023
----------------------------

This is almost entirely minor bug fixing with a few small updates.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ easy solution is simply to pick the method with the most uniform
performance without having bad worst-case rates.

Hence by default the simulated gather implementation is now the
default. The old code can be reenabled by building with:
default. The old code can be re-enabled by building with:

make CPPFLAGS=-DUSE_GATHER

Expand Down Expand Up @@ -107,7 +107,7 @@ and the more advanced codecs have additional options to pass in order
(so it should really be renamed to flags). See below. Fqzcomp
requires more input data - also see below. In all cases, sufficient
information is stored in the compressed byte stream such that the
decompression will work without needing these input paramaters.
decompression will work without needing these input parameters.

Finally the various `compress_bound` functions give the size of buffer
needed to be allocated when compressing a block of data.
Expand Down Expand Up @@ -198,7 +198,7 @@ uint8_t *tok3_decode_names(uint8_t *in, uint32_t sz, uint32_t *out_len);

This differs to the general purpose entropy encoders as it takes a
specific type of data. The names should be newline or nul separated
for `encode_names`. `decode_names` will alway return nul terminated
for `encode_names`. `decode_names` will always return nul terminated
names, so you may need to swap these to newlines if you do round-trip
tests.

Expand Down
2 changes: 1 addition & 1 deletion htscodecs/fqzcomp_qual.c
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ unsigned char *compress_block_fqz2f(int vers,
return comp;
}

// Read fqz paramaters.
// Read fqz parameters.
//
// FIXME: pass in and check in_size.
//
Expand Down
6 changes: 3 additions & 3 deletions htscodecs/fqzcomp_qual.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ typedef struct {
unsigned int ptab[1024];
unsigned int dtab[256];

// Not stored paramters, but computed as part of encoder
// Not stored parameters, but computed as part of encoder
// parameterisation.
int qshift;
int pshift;
Expand Down Expand Up @@ -144,7 +144,7 @@ typedef struct {
* @param in_size Size of in buffer
* @param out_size Size of returned output
* @param strat FQZ compression strategy (0 to FQZ_MAX_STRAT)
* @param gp Optional fqzcomp paramters (may be NULL).
* @param gp Optional fqzcomp parameters (may be NULL).
*
* @return The compressed quality buffer on success,
* NULL on failure.
Expand All @@ -166,7 +166,7 @@ char *fqz_compress(int vers, fqz_slice *s, char *in, size_t in_size,
char *fqz_decompress(char *in, size_t in_size, size_t *out_size,
int *lengths, int nlengths);

/** A utlity function to analyse a quality buffer to gather statistical
/** A utility function to analyse a quality buffer to gather statistical
* information. This is written into qhist and pm. This function is only
* useful if you intend on passing your own fqz_gparams block to
* fqz_compress.
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/rANS_static32x16pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ unsigned char *rans_compress_O0_32x16(unsigned char *in,
double e = hist8e(in, in_size, F);
int low_ent = e < 2;

// Normalise so frequences sum to power of 2
// Normalise so frequencies sum to power of 2
uint32_t fsum = in_size;
uint32_t max_val = round2(fsum);
if (max_val > TOTFREQ)
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/rANS_static32x16pr_avx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ unsigned char *rans_compress_O0_32x16_avx2(unsigned char *in,
if (hist8(in, in_size, F) < 0)
return NULL;

// Normalise so frequences sum to power of 2
// Normalise so frequencies sum to power of 2
uint32_t fsum = in_size;
uint32_t max_val = round2(fsum);
if (max_val > TOTFREQ)
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/rANS_static32x16pr_avx512.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ unsigned char *rans_compress_O0_32x16_avx512(unsigned char *in,
if (hist8(in, in_size, F) < 0)
return NULL;

// Normalise so frequences sum to power of 2
// Normalise so frequencies sum to power of 2
uint32_t fsum = in_size;
uint32_t max_val = round2(fsum);
if (max_val > TOTFREQ)
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/rANS_static32x16pr_neon.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ unsigned char *rans_compress_O0_32x16_neon(unsigned char *in,
if (hist8(in, in_size, F) < 0)
return NULL;

// Normalise so frequences sum to power of 2
// Normalise so frequencies sum to power of 2
uint32_t fsum = in_size;
uint32_t max_val = round2(fsum);
if (max_val > TOTFREQ)
Expand Down
8 changes: 4 additions & 4 deletions htscodecs/rANS_static32x16pr_sse4.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ unsigned char *rans_compress_O0_32x16_sse4(unsigned char *in,
if (hist8(in, in_size, F) < 0)
return NULL;

// Normalise so frequences sum to power of 2
// Normalise so frequencies sum to power of 2
uint32_t fsum = in_size;
uint32_t max_val = round2(fsum);
if (max_val > TOTFREQ)
Expand Down Expand Up @@ -409,7 +409,7 @@ unsigned char *rans_compress_O0_32x16_sse4(unsigned char *in,
__m128i freqv6 = _mm_and_si128(SDv6, _mm_set1_epi32(0xffff));
__m128i freqv5 = _mm_and_si128(SDv5, _mm_set1_epi32(0xffff));

// Bake this into the tabel to start with?
// Bake this into the table to start with?
shiftv8 = _mm_sub_epi32(shiftv8, _mm_set1_epi32(32));
shiftv7 = _mm_sub_epi32(shiftv7, _mm_set1_epi32(32));
shiftv6 = _mm_sub_epi32(shiftv6, _mm_set1_epi32(32));
Expand Down Expand Up @@ -819,12 +819,12 @@ static inline void transpose_and_copy(uint8_t *out, int iN[32],


// A better approach for clang and gcc can be had with some manual
// restructuring to attempt to do the two loops in explcit blocks.
// restructuring to attempt to do the two loops in explicit blocks.
// With gcc -O3 or -O2 -ftree-vectorize this is quite fast, as is clang
// and zig but neither beat the version below (or, for zig, the basic
// code above).
//
// It's left here incase we ever want to move to tidier code and
// It's left here in case we ever want to move to tidier code and
// to understand what auto-vectorises and what doesn't.
/*
#define NZ 2
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/rANS_static4x16pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ unsigned char *rans_compress_O0_4x16(unsigned char *in, unsigned int in_size,
if (hist8(in, in_size, F) < 0)
return NULL;

// Normalise so frequences sum to power of 2
// Normalise so frequencies sum to power of 2
uint32_t fsum = in_size;
uint32_t max_val = round2(fsum);
if (max_val > TOTFREQ)
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/tokenise_name3.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
//
// - Consider token choice for isalnum instead of isalpha. Sometimes better.
//
// - Consider token synchronisation (eg on matching chr symbols?) incase of
// - Consider token synchronisation (eg on matching chr symbols?) in case of
// variable number. Eg consider foo:0999, foo:1000, foo:1001 (the leading
// zero adds an extra token).
//
Expand Down
2 changes: 1 addition & 1 deletion htscodecs/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ int hist1_4(unsigned char *in, unsigned int in_size,
// This is better on some low entropy data, but generally we prefer to do
// bit-packing and/or RLE to turn it into higher-entropy data first.
//
// Kept here for posterity incase we need it again, as it's quick tricky.
// Kept here for posterity in case we need it again, as it's quite tricky.
static inline
int hist1_4(unsigned char *in, unsigned int in_size,
uint32_t F0[256][256], uint32_t *T0) {
Expand Down
4 changes: 2 additions & 2 deletions javascript/rans.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function encode(src, order) {
//----------------------------------------------------------------------
// Order-0 decoder

// Decode a single table of order-0 frequences,
// Decode a single table of order-0 frequencies,
// filling out the F and C arrays.
function ReadFrequencies0(src, F, C) {
// Initialise; not in the specification - implicit?
Expand Down Expand Up @@ -335,7 +335,7 @@ function RansEncode0(src) {
//----------------------------------------------------------------------
// Order-1 decoder

// Decode a table of order-1 frequences,
// Decode a table of order-1 frequencies,
// filling out the F and C arrays.
function ReadFrequencies1(src, F, C) {
// Initialise; not in the specification - implicit?
Expand Down
4 changes: 2 additions & 2 deletions javascript/rans4x16.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ function ReadAlphabet(src) {
return A
}

// Decode a single table of order-0 frequences,
// Decode a single table of order-0 frequencies,
// filling out the F and C arrays.
function ReadFrequencies0(src, F, C) {
// Initialise; not in the specification - implicit?
Expand Down Expand Up @@ -783,7 +783,7 @@ function RansEncode0(src, N) {
//----------------------------------------------------------------------
// Order-1 decoder

// Decode a table of order-1 frequences,
// Decode a table of order-1 frequencies,
// filling out the F and C arrays.
function ReadFrequencies1(src, F, C, shift) {
// Initialise; not in the specification - implicit?
Expand Down
2 changes: 1 addition & 1 deletion tests/entropy.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/*
* This test aims to test all entropy codecs on an input file.
* This therefore validates the pthead_once memory allocations to ensure
* there are not unforseen initialisation interactions.
* there are not unforeseen initialisation interactions.
*
* We repeatedly compress and decompress a single input file,
* validating the result.
Expand Down
4 changes: 2 additions & 2 deletions tests/fqzcomp_qual_fuzzrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fqz_slice *fake_slice(size_t buf_len, int nrec) {

// Otherwise variable length records

// Reproducability of randomness
// Reproducibility of randomness
int seed = rand();
srand(0);

Expand Down Expand Up @@ -109,7 +109,7 @@ int LLVMFuzzerTestOneInput(uint8_t *in, size_t in_size) {
fqz_slice *s = fake_slice(in_size, mval[mode]);

// Semi random strat, but based on a few bits of input data
// for reproducability.
// for reproducibility.
// This lets the fuzzer explore the parameter space itself.
int strat = in_size ? in[0] & 3 : 0;
char *comp = fqz_compress(3, s, (char *)in, in_size, &c_size,
Expand Down
2 changes: 1 addition & 1 deletion tests/tokenise_name3_fuzzrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *in, size_t in_sz) {
uint8_t *cdat = tok3_encode_names((char *)in2, in_sz, level,
arith, &clen, NULL);
if (!cdat)
// skip this input from corpus as it's unparseable
// skip this input from corpus as it's unparsable
return -1;

uint32_t ulen;
Expand Down
Loading