jetson-ffmpeg icon indicating copy to clipboard operation
jetson-ffmpeg copied to clipboard

Decoding AV_PIX_FMT_YUVJ420P produces incorrect colors in image

Open prophetzopu opened this issue 4 years ago • 2 comments

Hello,

I am using jetson-ffmpeg with ffmpeg 4.2.1 on a Jetson AGX Xavier running JetPack 4.3. My inputs are RTSP and RTMP streams in AV_PIX_FMT_YUVJ420P format. The decoder claims to be decoding to AV_PIX_FMT_YUV420P format with color_range AVCOL_RANGE_JPEG (full range 0-255).

It looks like high and low ranges are being clipped. Here are histogram dumps of what I am seeing:

Raw image histogram raw histogram

Software decode histogram (histogram obtained after dumping image to JPEG) preview software decode histogram

Hardware decode histogram (histogram obtained after dumping image to JPEG) preview hardware decode histogram

Thoughts/suggestions?

This project has been great so far. Thank you for your time!

prophetzopu avatar Jan 22 '21 20:01 prophetzopu

How to support yuvj420 decoding?thank you!

mhm0902 avatar Aug 19 '21 06:08 mhm0902

How to support yuvj420 decoding?thank you!

https://github.com/jocover/jetson-ffmpeg/issues/83 https://github.com/jocover/jetson-ffmpeg/issues/80

When I apply the advice in issue 83, I can use yuvj420p, but transcoding to mp4 containers hangs ffmpeg. When I apply the advice in issue 80, I can transcode to mp4 ffmpeg, but yuvj420p doen't work.

I'm sure there's a combo of commits that makes it all work.

grantthomas avatar Aug 19 '21 14:08 grantthomas