Comments (4)
This is the stack trace of where the (first) error occurs:
log.Panicf({0x4b72eb?, 0x17?}, {0xc00011abc0?, 0x493d4b?, 0xc0006c4000?})
/home/michael/sdk/go1.18/src/log/log.go:392 +0x67
github.com/stapelberg/scan2drive/internal/stdjpeg.(*decoder).readByteStuffedByte(0xc0006c4000?)
/home/michael/go/src/github.com/stapelberg/scan2drive/internal/stdjpeg/reader.go:219 +0xf8
github.com/stapelberg/scan2drive/internal/stdjpeg.(*decoder).ensureNBits(0xc0006c4000, 0x8)
/home/michael/go/src/github.com/stapelberg/scan2drive/internal/stdjpeg/huffman.go:50 +0x2b
github.com/stapelberg/scan2drive/internal/stdjpeg.(*decoder).decodeHuffman(0xc0006c4000, 0xc0006c6060)
/home/michael/go/src/github.com/stapelberg/scan2drive/internal/stdjpeg/huffman.go:184 +0x45
github.com/stapelberg/scan2drive/internal/stdjpeg.(*decoder).processSOS(0xc0006c4000, 0xa)
/home/michael/go/src/github.com/stapelberg/scan2drive/internal/stdjpeg/scan.go:254 +0xd7d
github.com/stapelberg/scan2drive/internal/stdjpeg.(*decoder).decode(0xc0006c4000, {0x4d57e0?, 0xc0001201b0?}, 0x0)
/home/michael/go/src/github.com/stapelberg/scan2drive/internal/stdjpeg/reader.go:632 +0x19b
github.com/stapelberg/scan2drive/internal/stdjpeg.Decode(...)
/home/michael/go/src/github.com/stapelberg/scan2drive/internal/stdjpeg/reader.go:781
main.incompat()
/home/michael/go/src/github.com/stapelberg/scan2drive/_incompat/incompat.go:18 +0xf2
main.main()
/home/michael/go/src/github.com/stapelberg/scan2drive/_incompat/incompat.go:28 +0x19
exit status 2
Compilation exited abnormally with code 1 at Sat Apr 16 14:21:40
from scan2drive.
When encoding a 4960x16 image file of all-red pixels, the entropy-coded segment differs in an additional 2 bytes:
--- scan2drive/internal/neonjpeg 2022-04-16 16:31:38.979975747 +0200
+++ image/jpeg 2022-04-16 16:31:38.983309143 +0200
@@ -39,5 +39,5 @@
00000260 e8 a2 8a f9 93 f7 10 a2 8a 28 00 a2 8a 28 00 a2 |.........(...(..|
00000270 8a 28 00 a2 8a 28 00 a2 8a 28 00 a2 8a 28 00 a2 |.(...(...(...(..|
*
-00000730 8a 28 00 a2 8a 28 00 a2 8a ff d9 |.(...(.....|
-0000073b
+00000730 8a 28 00 a2 8a 28 00 a2 8a 28 03 ff d9 |.(...(...(...|
+0000073d
from scan2drive.
While the above fixes fix some of the issues, there are still others that are harder to diagnose.
Perhaps linking against turbojpeg using cgo is preferable after all (behind a build tag), even if it means that building the optimized version becomes significantly harder (you’ll need aarch64-linux-gnu-gcc installed, and an arm64 version of libturbojpeg.a).
from scan2drive.
Preliminary results on a Raspberry Pi 4:
- 1.88s using neonjpeg
- 1.36s using turbojpeg, encoding 1 scanline at a time
- 1.24s using turbojpeg, encoding 16 scanlines at a time
Unfortunately, neither https://github.com/pixiv/go-libjpeg nor https://github.com/bmharper/turbo support a streaming API, so we’ll need a custom fork (temporarily at least).
from scan2drive.
Related Issues (20)
- race condition: setup mode redirect might run into transient HTTP 404
- main.go:846: undefined: s HOT 2
- add zoom function to scan thumbnails
- fix UI-driven scanning/renaming HOT 5
- Add upspin server availing scans HOT 1
- create thumbnails asynchronously for button-triggered scans HOT 1
- Which scanners does it support? HOT 2
- eSCL (“AirScan”) support HOT 1
- Consider supporting other authentication providers and sinks
- scan2drive.zekjur.net https listener is currently hardcoded in the source HOT 1
- scan2drive doesn't append DNSSD Domain to scanner service for Avahi-style name resolution HOT 1
- Update Google Drive Libraries HOT 5
- Listen address/oauth redirect trouble HOT 3
- Support airscan-only operation on MacOS? HOT 3
- investigate using machine learning for OCR
- gokr-packer exiting with status 2 after `*grpc.ClientConn has no field or method State` HOT 1
- Investigate using ARM NEON instructions to speed up image processing HOT 6
- Unify internal/g3 with image/jpeg/writer.go
- Unable to read client secret file: open /perm/client_secret_... HOT 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scan2drive.