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 CAACE475B3 for ; Tue, 12 Mar 2024 09:09:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 850ED68D13A; Tue, 12 Mar 2024 11:09:42 +0200 (EET) Received: from sender-op-o18.zoho.eu (sender-op-o18.zoho.eu [136.143.169.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF9D368CC87 for ; Tue, 12 Mar 2024 11:09:35 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; t=1710234573; cv=none; d=zohomail.eu; s=zohoarc; b=FC5p8+XzEt3wxIsm37qgxPWx4SKPKTLC2YP7tzjVsEgCLlHmeOB/n5wSxKUWpzSVVX1MfACjvUfzwGY54KT39mrGegAZbB69IQoNfGnAhLm1vQZ9dbXymP60ZGT8Kn3bqr1JEkD51/A9It+9dxDcE4yQn7vXWd8T1DewpBrZuJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1710234573; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=pUdK03vpnqq6CCB9nt2mio98nCi5rKThi/hCOCEg0C0=; b=d84aUDCIwRMF1axaz9JgbTa8c5lklrhMXXOcCx7rSrGcxyuIJTG3uTTd0geXKsnIBmCd93Rjn7MV3lnmkHCBinFfm7LLLG4Hdgyy8xM3T9COVNDIOfgMNwOISEQxc0QYh/uJNo00RlMEfOZoOq2h5vnY1L6MgasLSCPRrgNCVPM= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=frankplowman.com; spf=pass smtp.mailfrom=post@frankplowman.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1710234573; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=pUdK03vpnqq6CCB9nt2mio98nCi5rKThi/hCOCEg0C0=; b=UIKh1T+GUZGOFtuXKcdj8Bx56ZnYDWZkB8B8aZa4XGVLhwBnBeSU61kYDZ0/Vg0h UxlVbnh57+vK5Vde/cYSg7X3FVJIzAB/ugATLzuHaCbQRlNp1IbqRtC2moCpFl+egem 177qhRE/cgMwPA2dv4eLxcH6hUwpkLS1+kLBfcag= Received: from [10.0.0.6] (frankplowman.com [51.89.148.29]) by mx.zoho.eu with SMTPS id 1710234572470283.86689684192356; Tue, 12 Mar 2024 10:09:32 +0100 (CET) Message-ID: Date: Tue, 12 Mar 2024 09:09:31 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-GB To: ffmpeg-devel@ffmpeg.org References: <20240311185331.84556-1-post@frankplowman.com> <20240312004919.GV6420@pb2> <15ff0462-6e6b-40bc-a691-3dc3389b20d5@gmail.com> <3d233448d9d0c35b7764f061e00667bdb5f5d232.camel@intel.com> From: Frank Plowman In-Reply-To: <3d233448d9d0c35b7764f061e00667bdb5f5d232.camel@intel.com> X-ZohoMailClient: External Subject: Re: [FFmpeg-devel] [PATCH] lavc/vvc: AVERROR_PATCHWELCOME for subpictures 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 12/03/2024 03:33, Wang, Fei W wrote: > On Mon, 2024-03-11 at 21:57 -0300, James Almer wrote: >> On 3/11/2024 9:49 PM, Michael Niedermayer wrote: >>> On Mon, Mar 11, 2024 at 06:53:31PM +0000, Frank Plowman wrote: >>>> VVC's subpictures feature is not yet implemented in the native >>>> decoder. >>>> Throw an AVERROR_PATCHWELCOME when trying to decode a bitstream >>>> using >>>> the feature. Fixes crashes when trying to decode bitstreams >>>> which >>>> use the feature. >>>> >>>> Signed-off-by: Frank Plowman >>>> --- >>>> libavcodec/vvc/vvc_ps.c | 15 +++++++++++++++ >>>> 1 file changed, 15 insertions(+) >>> >>> This breaks fate-vvc-conformance-SUBPIC_A_3 >>> >>> make fate-vvc-conformance-SUBPIC_A_3 >>> TEST vvc-conformance-SUBPIC_A_3 >>> --- ./tests/ref/fate/vvc-conformance-SUBPIC_A_3 2024-03-05 >>> 02:37:36.235300141 +0100 >>> +++ tests/data/fate/vvc-conformance-SUBPIC_A_3 2024-03-12 >>> 01:47:27.301593567 +0100 >>> @@ -1,9 +0,0 @@ >>> -#tb 0: 1/25 >>> -#media_type 0: video >>> -#codec_id 0: rawvideo >>> -#dimensions 0: 1920x1080 >>> -#sar 0: 0/1 >>> -0, 0, 0, 1, 6220800, 0xa419cfb6 >>> -0, 1, 1, 1, 6220800, 0xa419cfb6 >>> -0, 2, 2, 1, 6220800, 0xa419cfb6 >>> -0, 3, 3, 1, 6220800, 0xa419cfb6 >>> Test vvc-conformance-SUBPIC_A_3 failed. Look at >>> tests/data/fate/vvc-conformance-SUBPIC_A_3.err for details. >>> tests/Makefile:318: recipe for target 'fate-vvc-conformance- >>> SUBPIC_A_3' failed >>> make: *** [fate-vvc-conformance-SUBPIC_A_3] Error 69 >>> >>> thx >> >> The sample appears to decode fine and doesn't crash, although all >> four >> frames are exactly the same (I don't know is that's intended). > > The result is correct. Assume native decode can handle subpic, at least > a part of the feature. > >> Maybe the crashes can be fixed in some other form? And abort only if >> FF_COMPLIANCE_STRICT is requested. > > Previous I made a patch to fix the crash in setup ps, but still get > error in decoding slice, it's better to return AVERROR_PATCHWELCOME > only in case of pps_single_slice_per_subpic_flag. > > https://github.com/intel-media-ci/ffmpeg/pull/723 > > Thanks > Fei Hi, Thanks all for your reviews. Yes, the feature is most problematic if pps_single_slice_per_subpic_flag is 1. This is because there is some unimplemented logic in the parameter set parser in this case which leads to some out-of-bounds accesses. Subpictures will also fail to decode bitexact if sps_independent_subpics is 1, although in practice the distortion this introduces is fairly subtle. I think we are able to decode other subpicture bitstreams bitexact. SUBPIC_A_HUAWEI_3 falls into this last category. I posted a patch, like yours Fei, which errors only the most problematic pps_single_slice_per_subpic_flag bitstreams some time ago: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240201140055.63805-1-post@frankplowman.com/ and the feedback I received there was to make this patch. I have also implemented the logic needed for pps_single_slice_per_subpic_flag here: https://github.com/ffvvc/FFmpeg/pull/191. I would be happy to make a v2 of the pps_single_slice_per_subpic_flag patch which moves where the error is being returned, or to put the GitHub PR on the ML if people would rather one of those two alternatives. Thanks again, -- Frank _______________________________________________ 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".