From patchwork Fri May 13 09:40:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 35756 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp209568pzb; Fri, 13 May 2022 02:41:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVFE3tkCcePmtb0p+xAMlGD7MDAofvP+w2Rx0PxAq15vbzqnKW1AQaHuv7XgF7TH6Qsyev X-Received: by 2002:a17:907:3f9b:b0:6f4:4407:a421 with SMTP id hr27-20020a1709073f9b00b006f44407a421mr3418157ejc.557.1652434878538; Fri, 13 May 2022 02:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652434878; cv=none; d=google.com; s=arc-20160816; b=whL0NCL35wA+pteVrpPmp1tcmsTULMVQBfxXj6o3y44VyBQPNP8cnZzxH5Kllq5WE5 m6NiEm3lAKx1piPvQHZOHQLAGeVgAanLzHSJFgH4fcINIizaw53ymw+DJw+MCZY/RgsZ 0/XRJwAHC/R8izm7AN0pLqt95qjmIsjKbMsEDgc+67vWe7Jr/rxNf9hkpSJIqPQq4T3j c+uxX4BEkUCaORokZjBhMOLJ3Eu+USSA2J7XY2qwpanqtSUcZs19Mv0QYTO36X7zry0O BKEhYJDa+kUscm5LifTsk+NiZFlEPhzet7/sxsegdOjFztAXm73MWgJmT8sPsPecwaOA bhvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:date:to:from:message-id :dkim-signature:delivered-to; bh=LGun/QhaiNB1mIIr4wyZhHqaNauZnsKlperiJZjNjzM=; b=sKgFmWMwBQiTCf4l0URLYmm8aZZbX7ZJ2kAIuZGysgWRPAzxt0kNVKs+u/6w+wHmrP 8rgjtNDSD9QXjcTw6r67zKI8vBva3e7iCCCiVPX1NaSgiCSh78PPzQXtS6BqfhbuesMp XVUX0AJXPzU8qhPS9dIoRZmuHf2KQ0/NgjLHi2VyDmAarGbww7fpAPPQQJg403ifqHcO PSgzT5WolMWokV/PVqw9xjmWnNF9JDP8dKmkSLxEr9ZywZAqM8aqPkrYvomAQKA++q/g Xj5rLn+Zp6avFfAYf5lAlhIr6GBxPEK5EAJwjhjkOWFOOb0egVGLptN0JQak6K+HxSot Z8Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b="V/mfxtfg"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hs17-20020a1709073e9100b006f3ce7e0968si1692421ejc.67.2022.05.13.02.41.18; Fri, 13 May 2022 02:41:18 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b="V/mfxtfg"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B1DBB68B47C; Fri, 13 May 2022 12:41:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out162-62-57-252.mail.qq.com (out162-62-57-252.mail.qq.com [162.62.57.252]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B743668B2F6 for ; Fri, 13 May 2022 12:40:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1652434854; bh=9hhnFQaOuI55wnm3CIvHs8xd4ilgyzExwXAiXs6OLhE=; h=From:To:Cc:Subject:Date; b=V/mfxtfgnKKBWlPHoQRbvKHvI13f+4ggsCghV6CkD/btx2bKBVwFzPY84JC91FtCE 6JVBcTF5nXh3oWw/2UYvaFF6LNU5ZsVACY9iSUaSAhZfGXgwlBKcMrS9ym4gArQs6Z kzmXFNcqPvyJ0JerwAZIVkQ22SQGXJeNy8YJSBkM= Received: from ZHILIZHAO-MB2.tencent.com ([113.118.107.45]) by newxmesmtplogicsvrsza7.qq.com (NewEsmtp) with SMTP id A34A9AFE; Fri, 13 May 2022 17:40:52 +0800 X-QQ-mid: xmsmtpt1652434852tm0ojo1s1 Message-ID: X-QQ-XMAILINFO: NPgAY+7cethfKojSVnPQXsOwF7dU48u7cptv58hamE56RMW61gWp3Ut2LTBZAl cp2linkBh4nP+QL9ZdoIYpSbFXObgTYAkuKRlUVuthB3ogaejCphIowJoF/jijVgj+lBn4PtvDTw MqybVBOfb/Qt7Yahn8D8Wjf3OowpMwCjYct8ymlj5vj8gEXKAs1/0M9ebN0oBc9aQC3vHfeLFtLe CPa5W6GxMVC7deERTOE8SmHoJxRpxzsGb8fI6rjwfd7Oz8Cu1I5RgaVXN92mZDAX2bm1IUrVD3d3 g4TDjBBVqjSeKtbnDa3ZYtOewvEgrXkyIrE2Ob5t/iruoi8m9/0reM7PSn8lF4m66Tihle1eJDzH Brw1J/hSu0hsax1p8Jdpq35vMGiT4qB9iTPpQjWGGZ+zitG8Q+32e1XsLI2WdSCe2+9ujlzzBBXA 91TTV3ZT5efSX5DfD2gKrI0HzE7pGaB8lrrGeLav95ucU2z/On7lMcsGXtDvkpr/xocgUKBUNLe0 Q18Hd3wJIFJcV7BpeWuE4aHw16iTxzbHvHqKcqwDl6Z4xbkQTxrMbQjEti0/3jTTNTYYfrR6q+yj xoEy/U8jqxzQ1avW6sEVFFn/CRcddbw0LgCGFUp/RvnuwDO5uQPc2J9cIG3P7OE10tEg+m+nHKNT c3hHC6kQcatUnafPeHwiPZAwEJKjhjx+cmNdbSt5nSDwiwMtaJKTVLv6DZe7hkOjJyhpz3nfNw6H s2s0dgCahV+A4AuHnRWY9j+GLkr1roiuE7d47ailLnlLsvtJOHWZv0bQgRKH7iawvoCAtYooTF1w rXCf6/FdeAA2X7sg0cg7ak8IewenvJC5mnKqnwiUMWVE4dlA4iE1ml435I9m+jOxGBuVGvcLbiju 4jglY4ysLHv8jnNQV1v3wMKoDi1Zg7oj2qV2PEnwwO/wXxvdTT39O7+BNHF6GlwAaaTN0OXLnr From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 May 2022 17:40:47 +0800 X-OQ-MSGID: <20220513094049.86179-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/avs3_parser: set has_b_frames properly 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 9Y9zXLPRlW4W has_b_frames should be output_reorder_delay field in AVS3 sequence header and larger than 1. The parser implementation doesn't parse that field. Decoder can set has_b_frames properly, so use FFMAX here to avoid resetting has_b_frames from output_reorder_delay to 1. --- libavcodec/avs3_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c index d04d96a03a..0d2e940d1e 100644 --- a/libavcodec/avs3_parser.c +++ b/libavcodec/avs3_parser.c @@ -114,7 +114,7 @@ static void parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf, // bitrate_high(12) skip_bits(&gb, 32); - avctx->has_b_frames = !get_bits(&gb, 1); + avctx->has_b_frames = FFMAX(avctx->has_b_frames, !get_bits(&gb, 1)); avctx->framerate.num = avctx->time_base.den = ff_avs3_frame_rate_tab[ratecode].num; avctx->framerate.den = avctx->time_base.num = ff_avs3_frame_rate_tab[ratecode].den; From patchwork Fri May 13 09:40:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 35755 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp209527pzb; Fri, 13 May 2022 02:41:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbfWcRNh/7j52X4FZF0hiuQGXniJeQ9zI8CVsy9NHayRNkK7+AZoK/o8kClnRFKLsevZhQ X-Received: by 2002:a17:906:a0ce:b0:6d1:cb30:3b3b with SMTP id bh14-20020a170906a0ce00b006d1cb303b3bmr3399766ejb.582.1652434868970; Fri, 13 May 2022 02:41:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652434868; cv=none; d=google.com; s=arc-20160816; b=MoyqKYgR6GV7ziupKq7Ir8zWlhfycBypOqWhNEneXvUEcXSeFZW7lg/zgsbfeDhpo8 01+wAbJiXF4wS3+a09oBdpCfdU9qI0x9mnI2zetWQxSUrSLyYAoHyGGKKreVKHXOXKa0 Tmu62iBchXjRBALbk8DoA7LCE8gWEUUt867P8P39AIROgN8TDVfiIFYB3TgOmHmGRV6m 9CfRHZo2mx6fHZ21BpLaP2IBpEvhKtpXOmmiKSIuT8BPPWLsTqf3M13+BtvawBS45b2x r/424PnoYsxM5iYm9I3JA9ym7PAzeHiOqZP9i00Un+5C0oGapssadv19fGUBLo7oLpke 0wvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to:date :to:from:message-id:dkim-signature:delivered-to; bh=XD0podjGCa2bpYP18FPWc62+kM6oteSr7P308lGr8Mc=; b=Mfc9cniaoMcyq8yYF9KrUz+F1aKa3aVOgHiqfQ+lAx65OgsgN9ZJf4Si2W0nTVTsPS 81zh8DAOM5LRN314cja8F8X/MJrsyd7lh+mNiGioPDpeZAxHyY4AzDCRlNyKDlsmGJ9P WAnorqt0pJMP65NLwNPBJlIt+tyf+OwBGE4YGdIaSfD7SQFDP+HpxNRXCKl7jc3z8ezu 0sTgPALCR//byOleXk+QeYqxV2+cHR5ow6fFyLyFMdQ7RBsr4x25Kmns2f8TjRxTwmz1 s9ns1hvStb4lyNfmpiHPnANU2Ragn+FVm4SejbuT+2aX8L8vQOtExS0YTNINKDG43rtj BIdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=RHqLl2SD; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b16-20020a056402351000b00425e87ced9esi1683931edd.512.2022.05.13.02.41.08; Fri, 13 May 2022 02:41:08 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=RHqLl2SD; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C524568B460; Fri, 13 May 2022 12:41:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out162-62-57-64.mail.qq.com (out162-62-57-64.mail.qq.com [162.62.57.64]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4B2D68A3DF for ; Fri, 13 May 2022 12:40:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1652434855; bh=5y0+LQYNFzALqun+hsKSqcDpNC0bQ/5m9q+au1Vc+zU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RHqLl2SDqGJK81jGgzwkw5gRNALoNHpvYvITxzsUTPAGXnVvZ+zoND6V9RpwPn/h+ S8ixcjSwJH/SuO4z+KiOD3sgFa17BdQuZB53MR0hMBkJrYrIJMHur0ZOiM0zdU1uWN cgGXAYK8h9pD1/7hIMuFQWQAvZZaMZQ8VvchnBZ4= Received: from ZHILIZHAO-MB2.tencent.com ([113.118.107.45]) by newxmesmtplogicsvrsza7.qq.com (NewEsmtp) with SMTP id A34A9AFE; Fri, 13 May 2022 17:40:52 +0800 X-QQ-mid: xmsmtpt1652434853t95df3h8a Message-ID: X-QQ-XMAILINFO: OdIVOfqOaVcryX5yGc79++j3ejHIHn3Jy4YudMmrjxSOy5OZhucq1vw1kDGC+S SpIBlUjiLhx2h/uIF5Hg064iig3lYmue0QPO4d9hHEUEZmHXNIOVfJ8S1F1JzJm030GqpPyfUSXs PSVU2wzvRezQxexIc+YZt1kFlDR/Qez7bT7lq7sSsG61aa/gXCfSAoo6p+rQwelpYCODNNBwbqL+ bkYXFbp4bFjSC0BfTuhF430aHn0e8lR8yNRpBL8RNIF+gRl+ArmbUhDc5rkS5xB6BP/2U1tkFCam CtJDbzTvLaetUHsM8wZ3nMA8ntiYvtR+ZL0oXnFveWNJa18h7cSopENt+ZbfpgXsNzRxHuXsXjG6 iMIAt0UhglC5e5AlmPM7ofvUX88gZt7qIgnlt1Tok/XsoyMlagC3/V/AHBko79DGhJm5g45B0wVB EuBf4gPz7YgA5Uphe/4Sy2nHrcZs9GXEMfm3MoffljGzE+FvjTNMJxKAd9M6gdR01pU6DY1dXrKs gK6IDFGHOJ5dXC6/5wlCvjTg7R8P28aTReD1w+0wXzEPEBH5H0kjb3YOaf9UCZWwYT2kPqvWZBt0 nVtFQB5C2WMWDJ7lRinHGqhedjpyG+VeFPrpAD0QQqo76ufiGuJifgx6m4wMJGsKi9Ay+bCQ+xLx TJLdCb5ZyOnvnoqRyi7T5YdNE5jNNLjFUeY0njZcZMz7ZSgUC5sZxK5Gm38lTXP69NnckH/Z/YaQ 39WvrW933rEsXHtGGJRYysn7W33jrP5Z9wPshLeiBbwun/aSO5YSV5dD8apMvjlgV/DyEUyXcgYj bBZUhZdmdMLdcHAOtHIE6O067kAboVALiWJjBXw7Xf29ZUlBRCk4T+5bcHKvE/pv7yppOEjFe3iv kjhfLh/9HDrUXz3J3Z5ylR06QdS1hDtJ3fsQk7PlT5JVZrpqw9zr5CMuPlUUu+BLSmL6Yu5ojC From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 May 2022 17:40:48 +0800 X-OQ-MSGID: <20220513094049.86179-2-quinkblack@foxmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220513094049.86179-1-quinkblack@foxmail.com> References: <20220513094049.86179-1-quinkblack@foxmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/libuavs3d: use output_reorder_delay as has_b_frames 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: aTyZexgdipJ7 has_b_frames is more than a bool, it's the size of the frame reordering buffer in the decoder. --- libavcodec/libuavs3d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libuavs3d.c b/libavcodec/libuavs3d.c index 23de4c8cd5..e911963a41 100644 --- a/libavcodec/libuavs3d.c +++ b/libavcodec/libuavs3d.c @@ -206,7 +206,7 @@ static int libuavs3d_decode_frame(AVCodecContext *avctx, AVFrame *frm, avctx->framerate.num = ff_avs3_frame_rate_tab[seqh->frame_rate_code].num; avctx->framerate.den = ff_avs3_frame_rate_tab[seqh->frame_rate_code].den; } - avctx->has_b_frames = !seqh->low_delay; + avctx->has_b_frames = seqh->output_reorder_delay; avctx->pix_fmt = seqh->bit_depth_internal == 8 ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUV420P10LE; ret = ff_set_dimensions(avctx, seqh->horizontal_size, seqh->vertical_size); if (ret < 0) From patchwork Fri May 13 09:40:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 35757 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp209601pzb; Fri, 13 May 2022 02:41:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNB+CvDnDAXdP7qeRvINtUVNFNtL57NSE9WgKb5xGndJDvQF/r2mpmmMZA00Q/DK3OUlpS X-Received: by 2002:a05:6402:90c:b0:415:d340:4ae2 with SMTP id g12-20020a056402090c00b00415d3404ae2mr39532029edz.331.1652434887581; Fri, 13 May 2022 02:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652434887; cv=none; d=google.com; s=arc-20160816; b=mlLZFq4R18kYzv7FWi0dvgcAavBaP5FLx7cwQq5mnAaP+6J1S5fhQdJ4iZdPBh61Bg Ni+fTOOtjfBIvsXdtpqX9ifndMplObiBaPCm7exodOl6QTU5INcLUZjT+FHOPtrIx7eO 74qpP2GIYpdEF0ExlSuEMkhqxtYPO/5Hl5oW2OvUL52bIBaPpHIWdFnj+uHD/qmI3UTA gCtf3TVt2zh2qiOsBq7YWqnxKPZoPNZDLBuE2wYNzzmNSy6VEmzV5wjoWRYiFjt7b7K5 AxmY72ZtE0fjbO+oiMDDmgsyIvurPO0GGRIv0vK/aVcqvWqfYi5g4Dg8Kgxqo7q8t5Ra 6t7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to:date :to:from:message-id:dkim-signature:delivered-to; bh=MWZPHDrO4ZIYJPsNAsY4VEWSXXY1RuBU6fnmw5Qz40E=; b=Lb5iLQAyNXVZuY5U+/5Vvb77Dt+/wLgHPRNR5LX43Hz9R3UDslowUoxD5zNFvBoEBX yFtcRQwbHvUGKwEDEVih5QzXrhDHN8RTuhOZbpsYzmLDT0jmy/0Y7lb9Vqc1VCT8zG37 9HviTIM2rNLySwrzKs4ufrBL0wxS9lzkUE0QxKjBgublIGAECAo7nioU76CDDURlDXCR i39x4fHwMOFWpg6dnI7LPNmzAW9DKD35kFjjS6DSmaBPxrJ30dNFHVo483mvaok1POq/ DMsHk0fmPbGi96uo2fVXXwfs4pstThHnOBUQrUwc+s1VN2c5MeeQaNeT3P9hVZKBSWGQ fOVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=JNV50hRY; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f22-20020a056402151600b0041d8586ad52si1367063edw.218.2022.05.13.02.41.27; Fri, 13 May 2022 02:41:27 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=JNV50hRY; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8FBF068B485; Fri, 13 May 2022 12:41:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out162-62-57-137.mail.qq.com (out162-62-57-137.mail.qq.com [162.62.57.137]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0D81968B344 for ; Fri, 13 May 2022 12:40:57 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1652434855; bh=OU3CNRTN4oYUmk7U0CqnewHln+AEKItij4D80WGclEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JNV50hRYKubTQjkPNMLr8jRf/aYqxCFV3gsrWQX4LA48W30X590nZJBcSd12hUoNu yQYFO04uyoyKKh11/ui4abNsJl5NGhtTGC8GZcDkW6r5ViUJzREID+r3K9kjLfHcO4 R4Juaz49QYg2UcKenxQiCfVRsnymrJViadRAwQRQ= Received: from ZHILIZHAO-MB2.tencent.com ([113.118.107.45]) by newxmesmtplogicsvrsza7.qq.com (NewEsmtp) with SMTP id A34A9AFE; Fri, 13 May 2022 17:40:52 +0800 X-QQ-mid: xmsmtpt1652434854tp2hwily6 Message-ID: X-QQ-XMAILINFO: MW5hkHoBpWXyuN+E5Qcb/29IZepFk/IBvN1mYC1bvbLvHRIISPHxuoi38O3Gld qPS5BeqAFPkIVT75/e29DTelMjAas7qPGqILv1RdLl0U8xVTKahG23DwNjXwiJ/UGovpzOwFUsXp a2yHaK/YhndpIY73mKJ1rGJaB8tEUFnwtSNuGegyRtVIzzb4TMFVqo9GaxSJa/GE7p3zsyxpRigc Fy+3Xgh+fF2Lq4fkV50A2q9wp3D+Vn/94XnhQEQJk0lvPHh8p5t4e/WnyoSv6aE2qoAwypuV3iOn jQ2S3jMiZPVzhBjZOyPSkrRpEcAbCjdTsgeX3llN+GWFgETmf8xipI6ICn7WY7P5Z45mVJCb0aOl hU/BV+0gaon3hmwz7IJQLgf0+QE/FIcmwVruvuJlmhE7n391uhG3qvOTRMtqX10lJK/GfxQ1X9Nw gVgKP+SQzxzuw46Nq9S+0sqEBlRisOsxCoW/oGCj9Rp6t8mR7kuh4i13kQjo0lQM5sLh2FYMILIE tgkGDaY+BlLkaOuUpzb2v6RlulTH6Pvw+nvtTg599s0ggmhrYdJpJiNY5zvjENMSj5fbmXRNlCh5 0lBdrHeLwYvsxU4+eIQ0TUBlcERbODNVlclVDYcGrHeCM5aC3+0/cxw8GEklc0htnk90RmIXVRsp UjC8sprA1ad4QXOIw+aNRbF3MH1dibFv+tGs6xseYQ5FqQq3COzg+tunDyQSSfjDeI5UR8AKQrZy jKiuWnRXljL8vkXHV33zILZyriYniN+qyBpeB3ndRuVs2jH3rue2HTWB5s7JR8tV7ALTrVcsUki7 8ZZhbcejLTl6tHwU5rGgMNsxqWgDo/RKwgaqH0/3rBE3fRvdVmoziISTm02fMJFx8JmiZG5SdZe2 doON8sVLSChdyHdTMKoKLXlESFkzprEgOSgc58CUZhSU3CAoGpTbGN6CLIcVQeSB81huAUtMJH0g SOVmOz7nKrKWDzjxv0cAKJM4EKllR2s58AwmdD2BTQxoIzjGo7aw== From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 13 May 2022 17:40:49 +0800 X-OQ-MSGID: <20220513094049.86179-3-quinkblack@foxmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220513094049.86179-1-quinkblack@foxmail.com> References: <20220513094049.86179-1-quinkblack@foxmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/libdavs2: export has_b_frames info 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3camUdI5jozP More precisely, we should use picture_reorder_delay, but it's unavailable yet. --- libavcodec/libdavs2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index a47027d300..bc31745a4f 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -78,6 +78,12 @@ static int davs2_dump_frames(AVCodecContext *avctx, davs2_picture_t *pic, int *g avctx->height = headerset->height; avctx->pix_fmt = headerset->output_bit_depth == 10 ? AV_PIX_FMT_YUV420P10 : AV_PIX_FMT_YUV420P; + /* It should be picture_reorder_delay, but libdavs2 doesn't export that + * info. + * Use FFMAX since has_b_frames could be set by AVS2 parser in theory, + * which doesn't do it yet. + */ + avctx->has_b_frames = FFMAX(avctx->has_b_frames, !headerset->low_delay); avctx->framerate = av_d2q(headerset->frame_rate,4096); *got_frame = 0;