添加PaddleOcrAll.BytesPerPixel,像素内存分别支持3通道BGR、4通道BGRA - #7
Closed
shonescript wants to merge 3 commits into
Closed
shonescript wants to merge 3 commits into
shonescript wants to merge 3 commits into
Conversation
…与"输入像素字节"相关的硬编码进行替换,验证测试通过。 优化WinForms RunPipline,改用直接访问内存,提升性能。
sdcb
requested changes
Sep 11, 2026
sdcb
left a comment
Owner
There was a problem hiding this comment.
总是让SimdPaddleOCR原生就支持bpp=3/4,以及rgb/bgr/rgba/bgra的切换,是合理的,但实现架构需要调整一下
| Vector256<double> wx0 = Avx2.Permute4x64(wx, 0x00), wx1 = Avx2.Permute4x64(wx, 0x55); | ||
| Vector256<double> wx2 = Avx2.Permute4x64(wx, 0xAA), wx3 = Avx2.Permute4x64(wx, 0xFF); | ||
| byte* row = source + (yBase - 1) * stride + (xBase - 1) * 3; | ||
| byte* row = source + (yBase - 1) * stride + (xBase - 1) * PaddleOcrAll.BytesPerPixel; |
Owner
There was a problem hiding this comment.
Kernel层不应该引用业务逻辑层的PaddleOcrAll.BytesPerPixel
Owner
|
谢谢这份 PR,BGR / BGRA 这个需求是对的。main 上已经用另一套方式落地了,比全局 你这边的做法是
现在 main 上的公开契约是每趟
WinForms 示例也已经 如果你那边还有这套覆盖不到的布局(比如灰度、预乘 alpha),开 issue 即可。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改内容
修改说明
验证结果