AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO
bug: ffmpeg decoding of dnx36,prores, etc. not correct
- Dominant language
- C++
- Stars
- 2.4k
- Forks
- 698
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 47
Description
Extracting an image from DNxHD or ProRes and saving it as a TIFF, PNG, etc. is darker than expected. This matches ffmpeg's default behavior when a -vf is not explicitly set.
`% oiiotool --buildinfo
OIIO 3.1.8.0 | MacOS/ARM
Build compiler: Apple clang 17.0 | C++17/201703
HW features enabled at build: neon
No CUDA support (disabled / unavailable at build time)
Dependencies: BZip2 1.0.8, FFmpeg 8.0, fmt 12.1.0, Freetype 2.14.1, GIF 5.2.2, Imath 3.2.2, JXL 0.11.1, Libheif 1.20.2,
libjpeg-turbo 3.1.2, LibRaw 0.21.4, libuhdr NONE, OpenColorIO 2.5.0, OpenEXR 3.4.4, openjph 0.25.3, OpenVDB NONE, PNG 1.6.51,
pugixml 1.15, pybind11 3.0.1, Python3 3.14.0, Robinmap 1.4.0, TBB 2022.3.0, TIFF 4.7.1, WebP 1.6.0, ZLIB 1.3.1`
**To Reproduce**
WRONG OUTPUT:
`oiiotool --debug -v --info -i /tmp/imagery_dnxhd36.mov --subimage 1 -o /tmp/oiio_png_from_imagery_dnxhd36.png `
Which matches
`ffmpeg -v debug -i /tmp/imagery_dnxhd36.mov -vframes 1 -pix_fmt rgb24 -y /tmp/ffmpeg_implicit_png_from_imagery_dnxhd36.png`
CORRECT OUTPUT (with explicit color scaling operations):
`ffmpeg -v debug -i /tmp/imagery_dnxhd36.mov -vf "colorspace=all=bt709:range=pc:iall=bt709:irange=tv" -vframes 1 -pix_fmt rgb24 -y /tmp/ffmpeg_explicit_png_from_imagery_dnxhd36.png`
Attaching sample legal range DNxHD 36 (exported out of Resolve)
https://github.com/user-attachments/assets/81027a1a-6bcc-454b-b66a-6ff6ae0f26a2
Contributor guide
Research direction
Start by reproducing the mismatch with the provided oiiotool and ffmpeg commands, comparing the implicit output with ffmpeg's explicit colorspace conversion. Trace the FFmpeg decoding entry point used by oiiotool and determine where legal-range DNxHD or ProRes data is converted; done means the extracted PNG or TIFF matches the explicitly color-scaled reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100