JeffyCN / FFmpeg

FFmpeg with rkmpp hwdec - (deprecated due to license issue, check gstreamer instead or https://github.com/nyanmisaka/ffmpeg-rockchip)
https://ffmpeg.org
Other
60 stars 18 forks source link

FFmpeg on rk3588 #6

Closed avafinger closed 2 years ago

avafinger commented 2 years ago

Hi Jeffy,

I am having issues with RGA on rk3588, can you see what is wrong? When calling RgaBlit:

RGA blit failed Doing slow software conversion

rga_api version 1.8.1_[0]
 RgaBlit(1465) RGA_BLIT fail: Invalid argument
 RgaBlit(1466) RGA_BLIT fail: Invalid argument
fd-vir-phy-hnd-format[34, (nil), (nil), 0, 0]
rect[0, 0, 1920, 1080, 1920, 1088, 2560, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[0, 0x7f96505010, (nil), 0, 0]
rect[0, 0, 1920, 1080, 1920, 1080, 2816, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail

Kernel message:

[ 8805.964464] rga2 fdb80000.rga: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 487 (slots)
[ 8805.964476] rga_dma_buf: Failed to map src attachment
[ 8805.964499] rga_mm: rga_mm_map_dma_buffer core[4] map dma buffer error!
[ 8805.964505] rga_mm: rga_mm_map_buffer map dma_buf error!
[ 8805.964510] rga_mm: job buffer map failed!
[ 8805.964514] rga_mm: src channel map job buffer failed!
[ 8805.964517] rga_job: rga_job_run: failed to map buffer
[ 8805.964533] rga_job: some error on rga_job_run before hw start, rga_job_next(340)
[ 8805.964540] rga_job: some error on job, rga_job_commit(667)
[ 8805.964548] rga_job: failed to commit job!
[ 8805.964552] rga_job: rga request commit failed!
[ 8805.964557] rga: rga_request_commit failed

Is there any easy way to check if my compiled rga is really working?

JeffyCN commented 2 years ago

3588's rga is broken in many ways. i would not suggest to use it

avafinger commented 2 years ago

Hi @JeffyCN, Can you share some additional info?

I can see RgaBlit works when src and dst are dma buf. Is there a way to get fd from the virtAddr? Can you share a sample and your thoughts? I don't feel comfortable with gstreamer and it is hard to debug and embed into an application, to say the least. Where can i follow the librga tracking issue? i have the same mpp issue as you closed the last two issues but i haven't seen any active development to fix these issues.

BTW, your master branch is missing caps_internal in AVCodec and cannot be built.

JeffyCN commented 2 years ago

don't know much about rga, and have no plan to look into it. please contact the maintainer for more details. or check the commit history for related authors

JeffyCN commented 2 years ago

if you have issues with mpp, please fire issues there, since i mostly working on gstreamer related stuffs. the ffmpeg is no longer maintained due to listense issues.

avafinger commented 2 years ago

Can you please, point me to Rockchip kernel 5.10.yy where it is actively been worked on? Thank you for your work on ffmpeg.

JeffyCN commented 2 years ago

for 5.10, i've been warned too, the kernel team disallow me to leak newest sources, that would somehow affect the saling.

they told me that the customers need to buy 356x/3588 sdk for that code.

avafinger commented 2 years ago

Thanks for the info.

Anyway, please, review if is what you intended:

if (s->codec->caps_internal & FF_CODEC_CAP_CONTIGUOUS_BUFFERS) {

.p.caps_internal = FF_CODEC_CAP_CONTIGUOUS_BUFFERS, \

and i think codec_internal.h is missing. caps_internal is not in AVCodec but is in FFCodec.

JeffyCN commented 1 year ago

done