[FFmpeg-devel] Re: [PATCH] diracdec: check that block length is large enough

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Wed May 6 15:39:02 CEST 2015


On 06.05.2015 01:49, Michael Niedermayer wrote:
> On Tue, May 05, 2015 at 10:39:50PM +0200, Andreas Cadhalpun wrote:
>> +    if (s->plane[0].xblen >> s->chroma_x_shift <= 0 || s->plane[0].yblen >> s->chroma_y_shift <= 0) {
>> +        av_log(s->avctx, AV_LOG_ERROR, "Block length too small\n");
>> +        return -1;
>> +    }
> 
> a broader check is possible
> the spec says "Frame height shall be an integer multiple of picture chroma height."
> in 10.5.1
> ive not found an equivalent for width but from rounding the chroma
> width down i doubt that the spec intends to allow non multiplies for
> the width

OK, new patch attached.

Best regards,
Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-diracdec-check-that-block-length-is-valid.patch
Type: text/x-diff
Size: 1820 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150506/ee5e3fae/attachment.bin>


More information about the ffmpeg-devel mailing list