Encoding error
I encountered an issue when combining the SDR base image with the YUV image. The error I received was "Encountered error during encodeJPEGR call, error code -20002." Interestingly, when I re-exported from Photoshop at a lower quality, everything worked smoothly.
I'm unsure if the problem is related to file size or chroma sampling rates like 4:2:0, or if there's another factor I'm not aware of. I've attached all four images for your reference.
File details:
- Source (quality set to maximum -12): trin_rain_acr_3d_gainmap.jpg (3D gain map from Adobe Camera RAW 16.2)
- YUV Conversion using FFMpeg: trin_rain_converted_using_ffmpeg.yuv
- High-Quality SDR base (output from FFmpeg): trin_rain_base_sdr_high_quality.jpeg
- Low-Quality (set to 5) re-export from Ps: trin_rain_base_sdr_low_quality.jpg
Combining images 2 and 3 failed, but combining 2 and 4 was successful.
The command used to run libultrahdr was: ./ultrahdr_app -m 0 -p trin_rain_converted_using_ffmpeg.yuv -i trin_rain_base_sdr_high_quality.jpeg -w 1080 -h 1350
FFmpeg version used: 6.1.1
Here is the link to the images: images link
@suhailphotos Thank you for raising this issue. I have looked at the shared images. The problem is trin_rain_base_sdr_high_quality.jpeg internal color format is yuv444. Currently library is handling jpeg inputs with subsampling format yuv420 only. Hence during the decode, library is throwing the error you pointed. Supporting other sampling formats (422, 444, ...) does not require much changes. We will update the library to handle the same.
Hi @ram-mohan @suhailphotos,
I believe this issue was fixed by one of our recent update. Could you check if we can close this issue?
Thank you!
@DichenZhang1 Some more changes are needed. We are decoding the file but the data is 444. GenerateGainMap has to make use of this correctly. Currently I am working on this.
@ram-mohan OK thanks for the update!