#5923 closed enhancement (fixed)
add support for Kodak PhotoCD image format
Reported by: | ami_stuff | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | pcd |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
ftp://ftp.kodak.com/www/images/pcd/0795image01.pcd
some patches were posted here (currently unavailable):
https://ffmpeg.org/pipermail/ffmpeg-devel/2010-January/086658.html
https://ffmpeg.org/pipermail/ffmpeg-devel/2010-January/086778.html
C:\>ffmpeg -i C:\0795image01.pcd ffmpeg version N-81755-g267da70 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.0-1.fc14) configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch= x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min gw32-gcc' --enable-pthreads --enable-memalign-hack --enable-runtime-cpudetect -- enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -lw inmm -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapsh ots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/sna pshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 -- enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-li bvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-li bopencore-amrwb --enable-libmp3lame --enable-libfreetype --enable-libvpx --disab le-decoder=libvpx libavutil 55. 30.100 / 55. 30.100 libavcodec 57. 58.100 / 57. 58.100 libavformat 57. 50.100 / 57. 50.100 libavdevice 57. 0.102 / 57. 0.102 libavfilter 6. 63.100 / 6. 63.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 C:\0795image01.pcd: Invalid data found when processing input
Attachments (2)
Change History (9)
by , 8 years ago
Attachment: | photocd.diff added |
---|
by , 8 years ago
Photocd YCC->RGB colorspace conversion: Patch by Kenneth Vermeirsch, kavermei at gmail
comment:1 by , 8 years ago
Component: | undetermined → avcodec |
---|---|
Keywords: | pcd added |
Priority: | normal → wish |
Reproduced by developer: | set |
Status: | new → open |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:3 by , 6 years ago
The image linked above is now in http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket5923/
comment:4 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Patch applied by Paul in c8e38950e3aad0304ec861aa4985b866dceddc7c
comment:5 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This is incorrect, Paul. The colorspace used is not AVCOL_TRC_IEC61966_2_1, it is AVCOL_TRC_IEC61966_2_4 (or xvYCC). That is TransferCharacteristics 11 per H.273. That is what https://www5.in.tum.de/lehre/vorlesungen/graphik/info/csc/COL_34.htm says and that is what wikipedia says (albeit with a problem in 0.099 v. 0.99). https://en.wikipedia.org/wiki/Photo_CD Again, there is a perfect sample here: http://www.tedfelix.com/PhotoCD/REFIMAGE.PCD that should look like described in http://www.tedfelix.com/PhotoCD/pcd-102.pdf
I suppose without proper support for Superwhite YUV headroom, there is no way to present this correctly. And that also requires compatible YUV TV. There is a idea of HDR images, of course (those are also clarified in pcd-102 above).
Also, 64Base (4096 × 6144) is not implemented. It was implemented here in February 2020. https://sourceforge.net/projects/pcdtojpeg/files/pcdtojpeg/pcdtojpeg%201.0.14/ (source code inside).
It is very important to get this correctly because the very famous Kodak test images have highest quality in that format. https://www.math.purdue.edu/~lucier/PHOTO_CD/IMAGES/ (the same as https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket5923/demo/)
comment:6 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Please refrain from opening this ticket, if you have anything useful to provide, like 4k samples, than go ahead. Thanks.
comment:7 by , 4 years ago
Why? The spec is also here. xvYCC is used http://scarse.sourceforge.net/docs/kodak/pcd-045.pdf here some more values http://scarse.sourceforge.net/docs/kodak/pcd-042.pdf and others.
Also even if you do some convertions (though I cannot see it, sorry ;( ) I suppose ffprobe should report AVCOL_TRC_IEC61966_2_4 that is supported after all...
PhotoCD image decoder: Patch by Kenneth Vermeirsch