Add avifImageExtractExifOrientationToIrotImir()
Move avifGetExifTiffHeaderOffset() from write.c to exif.c.
Add tests in avifmetadatatest.
Add avifenc change to CHANGELOG.md.
diff --git a/src/utils.c b/src/utils.c
index 2e5cb7c..697cb0e 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -29,6 +29,12 @@
return (uint16_t)((data[1] << 0) | (data[0] << 8));
}
+uint16_t avifCTOHS(uint16_t s)
+{
+ const uint8_t * data = (const uint8_t *)&s;
+ return (uint16_t)((data[0] << 0) | (data[1] << 8));
+}
+
uint32_t avifHTONL(uint32_t l)
{
uint32_t result;
@@ -46,6 +52,12 @@
return ((uint32_t)data[3] << 0) | ((uint32_t)data[2] << 8) | ((uint32_t)data[1] << 16) | ((uint32_t)data[0] << 24);
}
+uint32_t avifCTOHL(uint32_t l)
+{
+ const uint8_t * data = (const uint8_t *)&l;
+ return ((uint32_t)data[0] << 0) | ((uint32_t)data[1] << 8) | ((uint32_t)data[2] << 16) | ((uint32_t)data[3] << 24);
+}
+
uint64_t avifHTON64(uint64_t l)
{
uint64_t result;