Hi all,
If we move parser or part of DPB management mechanism into kernel we will face a issue as follows:
One customer requires dpb management do a flush when stream occurs in order to keep output frame clean.
While another one requires output frame with error to keep output frame smooth.
And when only one field has a error one customer wants to do a simple field copy to recover.
These are some operation related to strategy rather then mechanism.
I think it is not a good idea to bring such kind of flexible process to kernel driver.
So here is the ultimate challenge that how to reasonably move the parser and flexible process
which is encapsuled in firmware to a userspace - kernel stateless driver model.
陈恒明/Herman Chen
算法工程师/Algorithm Engineer
+86-591-83991906-8900
福州瑞芯微电子股份有限公司
From: Randy LiDate: 2017-01-17 11:04CC: dri-devel@xxxxxxxxxxxxxxxxxxxxx; Hans Verkuil; pawel; ayaka@xxxxxxxxxxx; nicolas.dufresne@xxxxxxxxxxxxxxx; florent.revest; hugues.fruchet; herman.chen@xxxxxxxxxxxxxxSubject: Request API: stateless VPU: the buffer mechanism and DPB managementHello all:I have recently finish the learning of the H.264 codec and ready towrite the driver. Although I have not get deep in syntax of H.264 but Ithink I just need to reuse and extended the VA-API H264 Parser fromgstreamer. The whole plan in userspace is just injecting a parsingoperation and set those v4l2 control in kernel before enqueue a bufferinto OUTPUT, which would keep the most compatible with those statefulvideo IP(those with a firmware).But in order to do that, I can't avoid the management of DPB. Idecided to moving the DPB management job from userspace in kernel. Alsothe video IP(On2 on rk3288 and the transition video IP on those futureSoC than rk3288, rkv don't have this problem) would a special way tomanage the DPB, which requests the same reference frame is storing inthe same reference index in the runtime(actually it is its Motion Vectordata appended in decoded YUV data would not be moved). I would suggestto keep those job in kernel, the userspace just to need update the list0and list1 of DPB. DPB is self managed in kernel the userspace don't needto even dequeue the buffer from CAPTURE until the re-order is done.The kernel driver would also re-order the CAPTURE buffer into displayorder, and blocking the operation on CAPTURE until a buffer is ready toplace in the very display order. If I don't do that, I have to get thebuffer once it is decoded, and marking its result with the poc, I couldonly begin the processing of the next frame only after those thing aredone. Which would effect the performance badly. That is what chromebookdid(I hear that from the other staff, I didn't get invoke in chromiumproject yet). So I would suggest that doing the re-order job in kernel,and inform the the userspace the buffers are ready when the new Iframe(key frame) is pushed into the video IP.Although moving those job into kernel would increase the loading, butI think it is worth to do that, but I don't know whether all thosethought are correct and high performance(It is more important than APIcompatible especially for those 4K video). And I want to know more ideasabout this topic.I would begin the writing the new driver after the coming culture newyear vacation(I would go to the Europe), I wish we can decide the finalmechanism before I begin this job.--Randy LiThe third produce department
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel