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

Martin Vignali martin.vignali at gmail.com
Thu Nov 24 22:35:42 EET 2016


Hello

New patchs in attach

I changed the dimensions check, the check is now :
----------------------------------------
if ((s->height > 30000) && (s->avctx->strict_std_compliance >
FF_COMPLIANCE_EXPERIMENTAL)) {
        av_log(s->avctx, AV_LOG_ERROR,
               "Height > 30000 is experimental, add "
               "'-strict %d' if you want to try to decode the picture.\n",
               FF_COMPLIANCE_EXPERIMENTAL);
        return AVERROR_EXPERIMENTAL;
    }

    s->width = bytestream2_get_be32(&s->gb);
    if ((s->width > 30000) && (s->avctx->strict_std_compliance >
FF_COMPLIANCE_EXPERIMENTAL)) {
        av_log(s->avctx, AV_LOG_ERROR,
               "Width > 30000 is experimental, add "
               "'-strict %d' if you want to try to decode the picture.\n",
               FF_COMPLIANCE_EXPERIMENTAL);
        return AVERROR_EXPERIMENTAL;
    }
----------------------------------------

and change the line_size variable (in PSD Context) to uint_64 (because now,
width can be > 30000 if -strict set to experimental)

I will send a patch for fate test in another discussion.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libavcodec-add-decoder-for-Photoshop-PSD-image-files.patch
Type: text/x-diff
Size: 19195 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161124/1e4d383e/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-libavformat-add-Photoshop-PSD-demuxer.patch
Type: text/x-diff
Size: 3703 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161124/1e4d383e/attachment-0001.patch>


More information about the ffmpeg-devel mailing list