From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D9E1A42CD8 for ; Fri, 3 Jun 2022 16:31:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BFAAB68B744; Fri, 3 Jun 2022 19:31:28 +0300 (EEST) Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D2F5568B70A for ; Fri, 3 Jun 2022 19:31:21 +0300 (EEST) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-2ff7b90e635so87768117b3.5 for ; Fri, 03 Jun 2022 09:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=H14fy1PpQMnKVy5fxqNbTjFZpA5FxEntciZbo8lbbw8=; b=jzB8HtwnzteH5UMjY6nZBmlf33DSooFoKPiqG0YqbxyQDvSq2lTF4p5IhzZT+/B+aA F74RVszpU32mgbCcWknauHPcQ+3Fw0Qo/EFwZc3QybFQVb3WJRom7VCSmUe7XNUD8f+O ZfU0QIcv34Vwco299CyjamPd4zxh8Mj+/cKuvksURbzEX+5LDls4dd5aENgfil1csFxW 6KKSyuVEoM/10c5a0y9PsHFRNDm1uVUm1iDAbadncoWgJXsYQRwQV1TQ95N9kAS0jq6A WnIFoGqW18vA3MNwhf4nI+IOt2KKM7YNi8a1l5iSEU5Ad8c3FxZRY+FzbYu/Yhs7cfPd opiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=H14fy1PpQMnKVy5fxqNbTjFZpA5FxEntciZbo8lbbw8=; b=7mIpgh1hDN0RzIKCxTcBjI63ZyUP+kMvOGL7msGk9SthXUU/9fj6vV93Gmk5ifh2QI tHvj3tc4oT99FNyFDWkaQ0+XdgjHfb2arzkYFs0tobwS2hU2gc1jrNzgKb619RMwXJ61 tpTx8xm/mHBzl+fPZHgWGz5EicFX6Zoawc/sqHbYH1Rkb5tfCeHN+Mfuo1ia4tLratVF S+zOVz49nbzxzCcYaa2TQyRNvVZ3qmohG1ckz+yfg/n6drG0KKZLyumRhH6VqTKVKOBx 76t9fgrDdZcv1PRNs9vNeBq3ZT9vBRgWUnrIgfEwFVKZtARpw7tRb50Fj73UnsAipzRb 3JIw== X-Gm-Message-State: AOAM5327PNvolQthz7ZkxPbRhpzkzGR8IW2Q31mir8qtQ+zRueh/0Bic zpvCX4FJCWNe2cpV5Ir7ONLN/pCM4AQ8bDlZvUcyZin63OMi7A== X-Google-Smtp-Source: ABdhPJxA4vXvz/BtU8DSnfvJXRmSYFZPwYqNxgFBumxRx5rIwXrbuqpF6qqnmAaEhNv5pu7XNtnHfTN84T9rs/5kMj4= X-Received: by 2002:a81:5d42:0:b0:2ff:152d:2a2e with SMTP id r63-20020a815d42000000b002ff152d2a2emr12115440ywb.302.1654273880510; Fri, 03 Jun 2022 09:31:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul B Mahol Date: Fri, 3 Jun 2022 18:34:16 +0200 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avcodec: add QOI decoder and demuxer and parser and encoder and muxer X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, Jun 3, 2022 at 6:21 PM Andreas Rheinhardt < andreas.rheinhardt@outlook.com> wrote: > Paul B Mahol: > > On Fri, Jun 3, 2022 at 6:17 PM Andreas Rheinhardt < > > andreas.rheinhardt@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@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".