Tegra Acceleration failed

Hi Nvidia:
Function int NvJPEGEncoder::encodeFromFd is used to Encodes a JPEG image from a file descriptor (FD) of hardware buffer memory.
Now, in my program when encode quality is set to a certain value(such as 90),this function run failed, give message “Tegra Acceleration failed” and my program quit, but this case not appeared before(yesterday even the same encode quality is set such as 90, and the p[rogram run success). TX2 powered off and restarted, when quality set to 90,my proggram still failed.
Why this case appeared? what case undered would the function give the “Tegra Acceleration failed” message?
Thanks! Expected your reply!

Notice: In API Manua, Function NvJPEGEncoder::encodeFromFd is
int NvJPEGEncoder::encodeFromFd( int fd,
J_COLOR_SPACE color_space,
unsigned char ** out_buf,
unsigned long & out_buf_size
but in sample it applicationed as
ctx->jpegenc->encodeFromFd(buffer->planes[0].fd, JCS_YCbCr, &out_buf,out_buf_size, ctx->quality)
difference : in Manue 4 parameters,application 5 parameters
in Manue parameter 4 is a unsigned long point,application is a unsigned long value

Hi feng,
Please share width and height of your input YUV. Are you on r28.2.1?

Hi DaneLLL:
Thanks for your reply!
It seams that I have found the reason. It is for that there is not enough space for out_buf. Thank you again!

Hi Nvidia,

I also found message “Tegra Acceleration failed” and process die.
This problem cause when used nvjpeg encoder from child process created by fork().
And no problem with same code but stop using fork() or call from parent process.

Is there any way to use from child process ?

Hi Nobutaka,
Your issuse looks different from this topic. Please make a new post and share a simple test sample to reproduce the issue.

Hi, I meet the same qustion, My TX2 version is
cat /etc/nv_tegra_release | head -n 1

R32 (release), REVISION: 1.0, GCID: 14531094, BOARD: t186ref, EABI: aarch64, DATE: Wed Mar 13 07:41:08 UTC 2019

the input width and heigth is not fixed, maybe 3990*2058 or larger。

Hi @641263629 ,
Suggest you upgrade to latest release r32.4.4 and try again.