Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Intel and ARM supported

## Install

```go get github.com/adrium/goheif```
```go get github.com/xoba/goheif```

- Code Sample
```
Expand Down
1 change: 1 addition & 0 deletions blurb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Go library and CLI for decoding HEIC to JPEG
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
module github.com/adrium/goheif
module github.com/xoba/goheif

go 1.25

require github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
4 changes: 2 additions & 2 deletions goheif.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"io"
"io/ioutil"

"github.com/adrium/goheif/heif"
"github.com/adrium/goheif/libde265"
"github.com/xoba/goheif/heif"
"github.com/xoba/goheif/libde265"
)

// SafeEncoding uses more memory but seems to make
Expand Down
2 changes: 1 addition & 1 deletion heic2jpg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"log"
"os"

"github.com/adrium/goheif"
"github.com/xoba/goheif"
)

// Skip Writer for exif writing
Expand Down
2 changes: 1 addition & 1 deletion heif/heif.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"io"
"log"

"github.com/adrium/goheif/heif/bmff"
"github.com/xoba/goheif/heif/bmff"
)

// File represents a HEIF file.
Expand Down
39 changes: 21 additions & 18 deletions libde265/libde265/x86/sse-motion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include <smmintrin.h>
#endif

// Define unsigned short value to avoid conversion warnings
#define USHORT_MAX (unsigned short)0xFFFF

#include "sse-motion.h"
#include "libde265/util.h"

Expand Down Expand Up @@ -3527,9 +3530,9 @@ void ff_hevc_put_hevc_qpel_h_1_v_1_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -3710,9 +3713,9 @@ void ff_hevc_put_hevc_qpel_h_1_v_2_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -3887,9 +3890,9 @@ void ff_hevc_put_hevc_qpel_h_1_v_3_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4058,9 +4061,9 @@ void ff_hevc_put_hevc_qpel_h_2_v_1_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4241,9 +4244,9 @@ void ff_hevc_put_hevc_qpel_h_2_v_2_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4419,9 +4422,9 @@ void ff_hevc_put_hevc_qpel_h_2_v_3_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4592,9 +4595,9 @@ void ff_hevc_put_hevc_qpel_h_3_v_1_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4778,9 +4781,9 @@ void ff_hevc_put_hevc_qpel_h_3_v_2_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down Expand Up @@ -4958,9 +4961,9 @@ void ff_hevc_put_hevc_qpel_h_3_v_3_sse(int16_t *dst, ptrdiff_t dststride,
r0 = _mm_srli_epi32(r0, 6);

r1 = _mm_and_si128(r1,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_and_si128(r0,
_mm_set_epi16(0, 65535, 0, 65535, 0, 65535, 0, 65535));
_mm_set_epi16(0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX, 0, USHORT_MAX));
r0 = _mm_hadd_epi16(r0, r1);
_mm_store_si128((__m128i *) &dst[x], r0);

Expand Down