[FFmpeg-devel] libavcodec : add psd image file decoder
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun Nov 20 18:35:47 EET 2016
2016-11-18 18:27 GMT+01:00 Martin Vignali <martin.vignali at gmail.com>:
>> Did you see AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP16
>> and AV_PIX_FMT_GBRAP16?
>>
>
> New patch in attach use AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
> AV_PIX_FMT_GBRP16BE
> and AV_PIX_FMT_GBRAP16BE for RGB mode
> I doesn't find a planar, for YA, so there is now two way to store data
> one for YA, and one for Gray and GBR.
Sorry, I don't understand this sentence...
>> And the more I think of it, the more likely it seems that (GBR) 9, 10, 12
>> and 14
>> could also be of use.
>>
> Don't think GBR 9, 10, 12, 14, can be use now for psd file.
Then why do you return AVERROR_PATCHWELCOME for the non-8,
non-16 case?
> + if (s->channel_depth == 8) {
> + avctx->pix_fmt = AV_PIX_FMT_GBRP;
> + } else if (s->channel_depth == 16) {
> + avctx->pix_fmt = AV_PIX_FMT_GBRP16BE;
> + } else {
> + avpriv_report_missing_feature(avctx, "channel depth %d unsupported for rgb", s->channel_depth);
> + return AVERROR_PATCHWELCOME;
> + }
> + color_mode = bytestream2_get_be16(&s->gb);
> + switch (color_mode) {
Why is this not "s->color_mode = bytestream2_get_be16(&s->gb);" instead?
> + compression = bytestream2_get_be16(&s->gb);
> + switch (compression) {
Same here: Why not "s->compression = bytestream2_get_be16(&s->gb);"?
>From the demuxer patch:
> + if (p->buf_size < 26)
> + return 0;
Padding alone is 32, so this check is not necessary.
Carl Eugen
More information about the ffmpeg-devel
mailing list