summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/bio.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2022-08-11 16:41:57 +0200
committerEven Rouault <even.rouault@spatialys.com>2022-08-11 16:41:57 +0200
commite9fc08a52acaf34bdcc0e04b7f716f0a3fb2b846 (patch)
tree92e48c1eb3caba89e03bcc73e1d2507efc4709ca /src/lib/openjp2/bio.h
parent59fb7ea736a10d3476e35f7bbefeb0a74b939607 (diff)
Micro-optimization: use directly opj_bio_putbit() instead of opj_bio_write() to emit single bit
Diffstat (limited to 'src/lib/openjp2/bio.h')
-rw-r--r--src/lib/openjp2/bio.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/openjp2/bio.h b/src/lib/openjp2/bio.h
index 448fdda2..d482f9ea 100644
--- a/src/lib/openjp2/bio.h
+++ b/src/lib/openjp2/bio.h
@@ -106,6 +106,14 @@ Write bits
@param n Number of bits to write
*/
void opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n);
+
+/**
+Write a bit
+@param bio BIO handle
+@param b Bit to write (0 or 1)
+*/
+void opj_bio_putbit(opj_bio_t *bio, OPJ_UINT32 b);
+
/**
Read bits
@param bio BIO handle