#10595: photocd file fails to decode
------------------------------------+-----------------------------------
Reporter: ami_stuff | Owner: (none)
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: photocd | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by Balling):
>MPV displays correct colors
No. You need PQ to correctly show the colors, as the content is **HDR and
WCG** (both outside 100 nits and BT.709 primaries).
https://github.com/FFmpeg/FFmpeg/blob/8eb094adb2ac3b6ea1d2cdd0fdfc7b69b2084db9/libavcodec/photocd.c#L430
Change that to AVCOL_TRC_IEC61966_2_4. **Part 4, not 1.** Then implement
correct quantisation: linear RGB values are from -0.20 to 2.00, while
nonlinear RGB' are from -0.43357 to 1.402278, where reference white
(perfect, non-fluorescent, white-reflecting diffuser in the original
scene) is 1.0, just like in BT.709. That is done by a different MATRIX
THAT IS NOT just avctx->colorspace = AVCOL_SPC_BT709; and
avctx->color_range = AVCOL_RANGE_JPEG.
There is also a matrix from and to sRGB in Windows XP source code that
leaked. Again, I told you all that 3 years ago. Open your eyes:
https://trac.ffmpeg.org/ticket/5923#comment:7
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10595#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".