[FFmpeg-devel] [PATCH] avcodec: add QOI decoder and demuxer and parser and encoder and muxer

Paul B Mahol onemda at gmail.com
Fri Jun 3 19:34:16 EEST 2022


On Fri, Jun 3, 2022 at 6:21 PM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:

> Paul B Mahol:
> > On Fri, Jun 3, 2022 at 6:17 PM Andreas Rheinhardt <
> > andreas.rheinhardt at outlook.com> wrote:
> >
> >> Paul B Mahol:
> >>>
> >>> +
> >>> +    packet_size = avctx->width * avctx->height * 16LL;
> >>> +    if ((ret = ff_alloc_packet(avctx, pkt, packet_size)) < 0)
> >>> +        return ret;
> >>> +
> >>
> >> Where does 16 come from? Looking at the code, the factor should be
> >> channels + 1 per pixel (and 14 + 8 byte for header + footer). Or am I
> >> missing something?
> >>
> >
> > Worst case compression.
> >
>
> Details please. My estimate was actually for the worst case.
>

Changed to:

packet_size = avctx->width * avctx->height * (channels + 1LL) + 14LL + 8LL;


>
> - Andreas
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list