Jpegparse/nvv4l2 failed to decode image

DeepStream 4.0.2, TRT 6.0

I tried with GitHub - cding-nv/deepstream-openpose.
It works well with the jpg pictures in the repository.
But when I tried with my own jpg picture, it failed.

Using winsys: x11
Opening in BLOCKING MODE
Running…
NvMMLiteBlockCreate : Block : BlockType = 256
nvbufsurface: Invalid buffer size=0
nvbufsurface: Error in allocating buffer
Returned, stopping playback
ERROR from element nvv4l2-decoder: Failed to allocate required memory.
Error details: /dvs/git/dirty/git-master_linux/3rdparty/gst/gst-v4l2/gst-v4l2/gstv4l2videodec.c(1506): gst_v4l2_video_dec_handle_frame (): /GstPipeline:dstest-image-decode-pipeline/GstBin:source-bin-00/nvv4l2decoder:nvv4l2-decoder:
Buffer pool activation failed
[JPEG Decode] NvMMLiteJPEGDecBlockPrivateClose done
[JPEG Decode] NvMMLiteJPEGDecBlockClose done
Deleting pipeline

Hi,
The JPEG files have to be
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)

Please check the sample JPEG:

deepstream-openpose/openpose_app$ exiftool COCO_val2014_000000000564.jpg
ExifTool Version Number         : 10.10
File Name                       : COCO_val2014_000000000564.jpg
Directory                       : .
File Size                       : 147 kB
File Modification Date/Time     : 2020:05:15 08:51:53+08:00
File Access Date/Time           : 2020:05:15 08:52:05+08:00
File Inode Change Date/Time     : 2020:05:15 08:51:53+08:00
File Permissions                : rwxrwxr-x
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : inches
X Resolution                    : 300
Y Resolution                    : 300
Exif Byte Order                 : Big-endian (Motorola, MM)
Orientation                     : Horizontal (normal)
Image Width                     : 640
Image Height                    : 640
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 640x640
Megapixels                      : 0.410

Hello, DaneLL, many thanks for your reply. One more question, how coud I convert a normal jpg picture in this format " Y Cb Cr Sub Sampling"?

Hi,
You can use gstreamer:

$ gst-launch-1.0 filesrc location=IMAG0561.jpg ! jpegdec ! videoconvert ! video/x-raw,format=I420 ! jpegenc ! filesink location=a.jpg

can u pls show ur result picture, my result pictute is too small,