[FFmpeg-devel] libavcodec : add psd image file decoder

Martin Vignali martin.vignali at gmail.com
Sat Jul 9 20:37:16 EEST 2016


Thanks for your comments

@James Almer : MKTAG, is maybe more comprehensive, than the 32i value.
Modify locally

@Carl Eugen Hoyos :


> > +    { AV_CODEC_ID_EXR,       MKTAG('p', 's', 'd', ' ') }, /* Psd */
>
> What produces such files?
>

I think i do a mistake here. Remove locally


> psd_probe()
>
> Please also test for version (and color mode) and increase
> the probe score / if easily possible, don't detect things
> that are immediately rejected by the decoder.
>
> And don't remove the empty line from Changelog...
>
>
i will modify the probe function.

@Paul B Mahol :
Correct locally


@Rostislav Pehlivanov :


> This has the potential to turn into the shittiest thing in libavcodec. PSD
> is a notoriously horrible format and I believe code needed to read and
> render it belongs outside of libavcodec. Not to mention that close to 90%
> of the features it has are unsupported by the framework, be it vectors, the
> colorspaces, layers, etc. The decoder's also pretty raw and only supports
> uncompressed images, with every other mode currently unsupported, giving
> the deceptive idea it's a simple decoder for a simple format. A decoder
> which can open a very small part of all psd files floating around isn't a
> very useful one.
> There is simply no simple way to expose all the quirks of the format in a
> nice way to libavcodec, given that this decoder can be potentially as
> complex and bad as photoshop. Please make this a separate library or a
> program, you don't even need any framework features since it's a simple
> bytestream.
>
> In case you need the testament of someone who's done the work already take
> a read at this:
> https://github.com/gco/xee/blob/master/XeePhotoshopLoader.m#L108-L136
> _______________________________________________
>
>
You're right, this is a very complex file format, with lot of features.
But i disagree, with the idea, that this decoder have no interest. The
"useful question", highly depend of the point of view.
I write this decoder, because i sometime need to convert PSD image sequence
to video, or need to get a quick preview of a PSD file, without open
Photoshop.

This decoder for now, decode file created using "Maximize Compatibity"
option of Adobe Photoshop software (this option is recommand by Adobe for
compatibilty with other software).

I plan to add RLE decoding, in a future patch (After effects for example
use it for PSD sequence).

So i think a decoder, without all the feature of the file format, can be
useful.


Martin


More information about the ffmpeg-devel mailing list