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 058C543188 for ; Mon, 22 Aug 2022 20:46:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 510E268B971; Mon, 22 Aug 2022 23:46:10 +0300 (EEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072013.outbound.protection.outlook.com [40.92.72.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5D44068B85A for ; Mon, 22 Aug 2022 23:46:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k11EJm08ppXxsG6uygfhUa9UMNFQo7RRgJniG61LDrioEUZ03wvjb7g0LzWH/yF/TFFJMtAuO2uHC+N18PPnDCEqkh4+zq+eDwfflaZrBNF08UaPmZ1Rm3LSPMsT2gXJrSVH8y+D8khdgyIS6dLYSfCc4Fooxe+fL8nYV6OWy3pXhkHSOx57rePcN1duQfRib0Hkc+Sq/hqAP6jghq5IKiJqY2aDZbtVsuVCJYlhBsYU7vrFoYcu3+X6sg3ND84e543XtRGvlMZnzMRSv8ORTPtc9zaR02YSuhP3w1w3jeqeIMZLFy/DNd+JFhpf2maHG00Pjo0JfV6dTgfCIVHCpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QrZZt6YHOT2iHL+PKiFX/m83zuh4uEpOR9BPa12begU=; b=TrihR2089UQvXAZA5zhlHH0h6U+YwZTQ+E23ZFLfjiMJk0MrSjAzcYWQlewwLxmm365C9u1MQtBD6J8VAz//nRCMcyMiyRnZrdDh2U4HdZUsPnTfaZTUjfrE20W3n7JQLdktKJSJHie5yV0lxhyrSHMq/WwCjiPoPcBHzZp28sC46NGhVDducQvrMvahZszqGYpe1bQJYUn0t7gVIF133haVho2JCqYo0dAqke6dSTB+5C8xtUgg4OcgugiAYUCH9hv11VgtyUkVesDqsY3gUJ6EGjNgsn/KI9qhGFhRrmptAQAXptQosHO84DfymX3smmboJ9Vk+S+5jhZ8yRIkJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QrZZt6YHOT2iHL+PKiFX/m83zuh4uEpOR9BPa12begU=; b=PPT3ZOuStLAvzwsAt78ZSIbA2xnxTgmh3nomLujrRN6hM8nRXjCHJVWaNoYNej2pVrGSrDEs/T6YlQgmWY6fzp11ciQSKiS4Wf/VY7luyxcnZT0TDBsCieFpvHr0Skx2kp00Xs4RmwBh/5MSDRbCiqzJFeb4sAzLO05F4EHLaDIRomDdZ45Vg0PS4TCyjyfjvnGJAiFq/uW/JnCWHpY5Bxe3ffibVE1cASovtgLRVRLYViage9Gr0TuFNgNP+TVgqkpkLeTyqSN0GDFUYQUlRUfgzjFEuFV76bF9cV8vavWeASfniOnqneh6yCols/mB2GoSbWQ3LH0agP4hXEUlOw== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by PA4PR01MB9330.eurprd01.prod.exchangelabs.com (2603:10a6:102:2ae::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Mon, 22 Aug 2022 20:46:00 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46%11]) with mapi id 15.20.5546.022; Mon, 22 Aug 2022 20:46:00 +0000 Message-ID: Date: Mon, 22 Aug 2022 22:45:58 +0200 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Andreas Rheinhardt In-Reply-To: X-TMN: [iHOYuxgVGHA+M0+WlgECU8+wl2bligWF] X-ClientProxiedBy: ZRAP278CA0008.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::18) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <2edd87a9-1be0-6c36-831f-d5cdda7588af@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d26104cb-1c81-4f86-0932-08da847f520e X-MS-TrafficTypeDiagnostic: PA4PR01MB9330:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gO+IYqceDuK8SxVar1kuXUzC8uy1PUfFV7XUqjZy2AByFU67saUkyyBFOMJ2NqlWT7IhR1Ma1NbEBozT2Z8DcnpLAqNhzjNe6mywIOMTPgK0HyNZ9P07GrusYvpwuj9nXN2U6iCZyDj/LiEXdeTaUcHCImhG0AD5wcaunSrkI5IyiiKBAD/2jxPLwcwNETMSZYyv/2nsk3CKCEqVDvO8NZjL30r4KlE8p1YFwVK7Ogkbjk3/7PBIt16v4mJfUYckky2QIDW3gQCrKnILBpPBRAUJH+PxcUqIqeKJ6C2BaV0S0bVPRFB96diHJciNKTZp3ooJ9MJz036aYnamXqzhouI2up+n7AgNSauv5oD7/hEkNsVrSjC2n/G48t2EEzvdPDDSLaAglWZfG8x9Bsm4bc8YAvy93OiO/RxNGLkRsxuVoNHrmN8HewnTdxofAy158CEnEeh9VGdHvjCyvbjqazCpGoe4gwqv609c8mpzCwISiIAdkex1n/WW1uraCbMIo7/JqgdnqSJ+N7QrEoYrF6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cxY0N6Wk1mK3lBS1Uxb01aVitBZ3hJ?= =?utf-8?B?ckdnbTlISTc3dlgrMzBXc0V2TUh3ZHdJT21FdGtyRjlXOGRCRWRzL1JFVzgv?= =?utf-8?B?MnBlSXlPaHpUb2pLRWtwUFhWNTJxdzJwK2lQQ21QMEpFY2dJemFpaDdxRDc0?= =?utf-8?Q?DuAreen9L2lF5j/yic=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d26104cb-1c81-4f86-0932-08da847f520e X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2022 20:46:00.2617 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR01MB9330 Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/pngdec: Fix APNG_DISPOSE_OP_BACKGROUND 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: Andreas Rheinhardt: > APNG works with a single reference frame and an output frame. > According to the spec, decoding APNG works by decoding > the current IDAT/fdAT chunks (which decodes to a rectangular > subregion of the whole image region), followed by either > overwriting the region of the output frame with the newly > decoded data or by blending the newly decoded data with > the data from the reference frame onto the current subregion > of the output frame. The remainder of the output frame > is just copied from the reference frame. > Then the reference frame might be left untouched > (APNG_DISPOSE_OP_PREVIOUS), it might be replaced by the output > frame (APNG_DISPOSE_OP_NONE) or the rectangular subregion > corresponding to the just decoded frame has to be reset > to black (APNG_DISPOSE_OP_BACKGROUND). > > The latter case is not handled correctly by our decoder: > It only performs resetting the rectangle in the reference frame > when decoding the next frame; and since commit > b593abda6c642cb0c3959752dd235c2faf66837f it does not reset > the reference frame permanently, but only temporarily (i.e. > it only affects decoding the frame after the frame with > APNG_DISPOSE_OP_BACKGROUND). This is a problem if the > frame after the APNG_DISPOSE_OP_BACKGROUND frame uses > APNG_DISPOSE_OP_PREVIOUS, because then the frame after > the APNG_DISPOSE_OP_PREVIOUS frame has an incorrect reference > frame. (If it is not followed by an APNG_DISPOSE_OP_PREVIOUS > frame, the decoder only keeps a reference to the output frame, > which is ok.) > > This commit fixes this by being much closer to the spec > than the earlier code: Resetting the background is no longer > postponed until the next frame; instead it is applied to > the reference frame. > > Fixes ticket #9602. > > (For multithreaded decoding it was actually already broken > since commit 5663301560d77486c7f7c03c1aa5f542fab23c24.) > > Signed-off-by: Andreas Rheinhardt > --- > Btw: If we had a function that only references a frame's data > (and leaves the dst frame's side data completely untouched), > we could apply the side data directly to the output frame, > making 8d74baccff59192d395735036cd40a131a140391 unnecessary. > > I also wonder whether the handle_p_frame stuff should be moved > out of decode_frame_common() and in the codec-specific code. > > libavcodec/pngdec.c | 98 ++++++++++++++++++++++----------------------- > 1 file changed, 48 insertions(+), 50 deletions(-) > > diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c > index 3b888199d4..8a197d038d 100644 > --- a/libavcodec/pngdec.c > +++ b/libavcodec/pngdec.c > @@ -78,11 +78,8 @@ typedef struct PNGDecContext { > enum PNGImageState pic_state; > int width, height; > int cur_w, cur_h; > - int last_w, last_h; > int x_offset, y_offset; > - int last_x_offset, last_y_offset; > uint8_t dispose_op, blend_op; > - uint8_t last_dispose_op; > int bit_depth; > int color_type; > int compression_type; > @@ -94,8 +91,6 @@ typedef struct PNGDecContext { > int has_trns; > uint8_t transparent_color_be[6]; > > - uint8_t *background_buf; > - unsigned background_buf_allocated; > uint32_t palette[256]; > uint8_t *crow_buf; > uint8_t *last_row; > @@ -725,9 +720,30 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, > } > > ff_thread_release_ext_buffer(avctx, &s->picture); > - if ((ret = ff_thread_get_ext_buffer(avctx, &s->picture, > - AV_GET_BUFFER_FLAG_REF)) < 0) > - return ret; > + if (s->dispose_op == APNG_DISPOSE_OP_PREVIOUS) { > + /* We only need a buffer for the current picture. */ > + ret = ff_thread_get_buffer(avctx, p, 0); > + if (ret < 0) > + return ret; > + } else if (s->dispose_op == APNG_DISPOSE_OP_BACKGROUND) { > + /* We need a buffer for the current picture as well as > + * a buffer for the reference to retain. */ > + ret = ff_thread_get_ext_buffer(avctx, &s->picture, > + AV_GET_BUFFER_FLAG_REF); > + if (ret < 0) > + return ret; > + ret = ff_thread_get_buffer(avctx, p, 0); > + if (ret < 0) > + return ret; > + } else { > + /* The picture output this time and the reference to retain coincide. */ > + if ((ret = ff_thread_get_ext_buffer(avctx, &s->picture, > + AV_GET_BUFFER_FLAG_REF)) < 0) > + return ret; > + ret = av_frame_ref(p, s->picture.f); > + if (ret < 0) > + return ret; > + } > > p->pict_type = AV_PICTURE_TYPE_I; > p->key_frame = 1; > @@ -985,12 +1001,6 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s, > return AVERROR_INVALIDDATA; > } > > - s->last_w = s->cur_w; > - s->last_h = s->cur_h; > - s->last_x_offset = s->x_offset; > - s->last_y_offset = s->y_offset; > - s->last_dispose_op = s->dispose_op; > - > sequence_number = bytestream2_get_be32(gb); > cur_w = bytestream2_get_be32(gb); > cur_h = bytestream2_get_be32(gb); > @@ -1086,23 +1096,6 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, > > ff_thread_await_progress(&s->last_picture, INT_MAX, 0); > > - // need to reset a rectangle to background: > - if (s->last_dispose_op == APNG_DISPOSE_OP_BACKGROUND) { > - av_fast_malloc(&s->background_buf, &s->background_buf_allocated, > - src_stride * p->height); > - if (!s->background_buf) > - return AVERROR(ENOMEM); > - > - memcpy(s->background_buf, src, src_stride * p->height); > - > - for (y = s->last_y_offset; y < s->last_y_offset + s->last_h; y++) { > - memset(s->background_buf + src_stride * y + > - bpp * s->last_x_offset, 0, bpp * s->last_w); > - } > - > - src = s->background_buf; > - } > - > // copy unchanged rectangles from the last frame > for (y = 0; y < s->y_offset; y++) > memcpy(dst + y * dst_stride, src + y * src_stride, p->width * bpp); > @@ -1171,6 +1164,22 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, > return 0; > } > > +static void apng_reset_background(PNGDecContext *s, const AVFrame *p) > +{ > + // need to reset a rectangle to black > + av_unused int ret = av_frame_copy(s->picture.f, p); > + const int bpp = s->color_type == PNG_COLOR_TYPE_PALETTE ? 4 : s->bpp; > + const ptrdiff_t dst_stride = s->picture.f->linesize[0]; > + uint8_t *dst = s->picture.f->data[0] + s->y_offset * dst_stride + bpp * s->x_offset; > + > + av_assert1(ret >= 0); > + > + for (size_t y = 0; y < s->cur_h; y++) { > + memset(dst, 0, bpp * s->cur_w); > + dst += dst_stride; > + } > +} > + > static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, > AVFrame *p, const AVPacket *avpkt) > { > @@ -1434,6 +1443,9 @@ exit_loop: > goto fail; > } > } > + if (CONFIG_APNG_DECODER && s->dispose_op == APNG_DISPOSE_OP_BACKGROUND) > + apng_reset_background(s, p); > + > ff_thread_report_progress(&s->picture, INT_MAX, 0); > > return 0; > @@ -1456,15 +1468,10 @@ static void clear_frame_metadata(PNGDecContext *s) > av_dict_free(&s->frame_metadata); > } > > -static int output_frame(PNGDecContext *s, AVFrame *f, > - const AVFrame *src) > +static int output_frame(PNGDecContext *s, AVFrame *f) > { > int ret; > > - ret = av_frame_ref(f, src); > - if (ret < 0) > - return ret; > - > if (s->iccp_data) { > AVFrameSideData *sd = av_frame_new_side_data(f, AV_FRAME_DATA_ICC_PROFILE, s->iccp_data_len); > if (!sd) { > @@ -1515,13 +1522,12 @@ fail: > } > > #if CONFIG_PNG_DECODER > -static int decode_frame_png(AVCodecContext *avctx, AVFrame *dst_frame, > +static int decode_frame_png(AVCodecContext *avctx, AVFrame *p, > int *got_frame, AVPacket *avpkt) > { > PNGDecContext *const s = avctx->priv_data; > const uint8_t *buf = avpkt->data; > int buf_size = avpkt->size; > - AVFrame *p = s->picture.f; > int64_t sig; > int ret; > > @@ -1555,7 +1561,7 @@ static int decode_frame_png(AVCodecContext *avctx, AVFrame *dst_frame, > goto the_end; > } > > - ret = output_frame(s, dst_frame, s->picture.f); > + ret = output_frame(s, p); > if (ret < 0) > goto the_end; > > @@ -1574,12 +1580,11 @@ the_end: > #endif > > #if CONFIG_APNG_DECODER > -static int decode_frame_apng(AVCodecContext *avctx, AVFrame *dst_frame, > +static int decode_frame_apng(AVCodecContext *avctx, AVFrame *p, > int *got_frame, AVPacket *avpkt) > { > PNGDecContext *const s = avctx->priv_data; > int ret; > - AVFrame *p = s->picture.f; > > clear_frame_metadata(s); > > @@ -1608,7 +1613,7 @@ static int decode_frame_apng(AVCodecContext *avctx, AVFrame *dst_frame, > if (!(s->pic_state & (PNG_ALLIMAGE|PNG_IDAT))) > return AVERROR_INVALIDDATA; > > - ret = output_frame(s, dst_frame, s->picture.f); > + ret = output_frame(s, p); > if (ret < 0) > return ret; > > @@ -1646,15 +1651,9 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) > pdst->compression_type = psrc->compression_type; > pdst->interlace_type = psrc->interlace_type; > pdst->filter_type = psrc->filter_type; > - pdst->cur_w = psrc->cur_w; > - pdst->cur_h = psrc->cur_h; > - pdst->x_offset = psrc->x_offset; > - pdst->y_offset = psrc->y_offset; > pdst->has_trns = psrc->has_trns; > memcpy(pdst->transparent_color_be, psrc->transparent_color_be, sizeof(pdst->transparent_color_be)); > > - pdst->dispose_op = psrc->dispose_op; > - > memcpy(pdst->palette, psrc->palette, sizeof(pdst->palette)); > > pdst->hdr_state |= psrc->hdr_state; > @@ -1705,7 +1704,6 @@ static av_cold int png_dec_end(AVCodecContext *avctx) > s->last_row_size = 0; > av_freep(&s->tmp_row); > s->tmp_row_size = 0; > - av_freep(&s->background_buf); > > av_freep(&s->iccp_data); > av_dict_free(&s->frame_metadata); Will apply this patchset tomorrow unless there are objections. - 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".