I am using IL to encode BGR888 frames to JPEG using image_encode.
The code is here:
https://raw.githubusercontent.com/hopki ... _bench.cpp
I have tested 1280x720 and 640x480 images with no issues. However, when I replace with 1920x1080 images, I get Seg. Fault.
I have traced the issue to the second-last buffer filling (67th filling, filling starting from 6082560, 92160 bytes in size), where there are total 68 times needed to fill the buffer, with the last one only fills half of the buffer. After calling OMX_EmptyThisBuffer for the 67th filling, the application has still run a while in the main loop (so calling OMX_EmptyThisBuffer does NOT trigger Seg. Fault immediately), then Seg. Fault.
Running GDB didn't show much of the information, it just saying the program fails in memcmp().
Note that the output JPEG image is decodable, the upper part is correct, only with the lower part be blank (or undecodable).
Any idea what's going wrong?