I have a jepg encode thread, I use encodeFromFd to encode the queue of fds, fds have different pixel, and how can I avoid hitting the error num-extra-surfaces=18?
And the second problem is the encodeFromFd is so slow when I use it at the first time. How can I avoid to create and delete jpeg encoder because I need to crop the picture and encode.
Hi,
You should only need one NvBufSurface for calling encodeFromFd(), as demonstrated in 05_jpeg_encode. Shall not hit the constraint of hardware decoder.
I know, But the NvBufSureace fds queue have different resolution, similarly 1280x720,1920x1080,2560x1440 and so on.
As you said, I have to create a static jpeg NvBufSurface(1920*1080), and transform(scale) the other NvBufSurface to the static jpeg NvBufSurface?
That will make the source picture to be larger or smaller.
Is there a better option?
Thanks!