Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGA improcess()时,输入图像是宽高[640, 464], 目标图像宽高[128,128], 将原图像中的某个区域如[142,44,33,63] 裁剪缩放成[128,128]大小的目标图像,老是报错RGA_BLIT fail:Invalid argument. 该如何解决? #94

Open
FreshmanMa opened this issue Nov 15, 2024 · 1 comment

Comments

@FreshmanMa
Copy link

RGA improcess()时,输入图像是宽高[640, 464], 目标图像宽高[128,128], 将原图像中的某个区域如[142,44,33,63] 裁剪缩放成[128,128]大小的目标图像,老是报错RGA_BLIT fail:Invalid argument. 该如何解决?

rga1.8.1
f-blend-siez-rotation-col-log-mmu[0,0,0,0,0,0,1]
This output the user parameters when rga call blit fail

rect[142,44,33,63,640,464,512,0]

rect[0,0,128,128,128,128,512,0]
im2d_rga_imp rga_task_submit(1952): acquir_fence[-1], release_fence_pte[0x0], usage[0x0]

@FreshmanMa
Copy link
Author

又进行了尝试:
图片大小1920x1082现在。
希望通过improcess 进剪裁,给出下面条件
(1)
STATUS = improcess(src, crop_size, pat, crop_rect, dst_resize_rect, pat_rect, 0);
其中
src 宽高[1920, 1080],
crop_size宽高[128,128],
pat={},
crop_rect = {261, 388, 600, 380},
dst_resize_rect ={0, 0, 128, 128}
pat_rect = {0,0,0,0}
这样可以通过剪裁src然后reszie得到我想要的crop_size图像
但条件2就不行

(2)条件2improcess报错
STATUS = improcess(src, crop_size, { }, crop_rect, dst_resize_rect, { }, 0);
其中
src 宽高[1920, 1080],
crop_size宽高[192,201],
pat={},
crop_rect = {0,0,1608,1072},
dst_resize_rect ={0, 0, 192, 201}
pat_rect = {0,0,0,0}

但条件2就不行。 这样improcess就报错
RGA_BLIT fail:Invalid argument
Fatal error:Failed to call RockChip Rga interface, query log to find the cause of failure.

我应该怎样解决呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant