Message ID | 20221223193807.914935-1-nicolas.dufresne@collabora.com (mailing list archive) |
---|---|
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1p8nsL-003yAu-Re; Fri, 23 Dec 2022 19:38:43 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbiLWTic (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Fri, 23 Dec 2022 14:38:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231228AbiLWTia (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 23 Dec 2022 14:38:30 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75AE91DA76 for <linux-media@vger.kernel.org>; Fri, 23 Dec 2022 11:38:29 -0800 (PST) Received: from whitebuilder.lan (192-222-136-102.qc.cable.ebox.net [192.222.136.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nicolas) by madras.collabora.co.uk (Postfix) with ESMTPSA id 639836602CDF; Fri, 23 Dec 2022 19:38:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671824307; bh=ReMnwqnWdZXeSRi4RVXJsleHBbiR/n5EHZB1WdNlCXc=; h=From:To:Cc:Subject:Date:From; b=YIlWWsOSqcejxGjdVcM0lvhYGo0bYZWIIPckOJS9vRMSti17dHLTfEUIgACNX+00M Vjr9pVyWA+Cv/ywyMRtE6YWQg5atCWh3w5GRRr81SnsJGbvWe+LUrFO6FKqdZIor+4 H8HG36OicnHFIurKxsdREnXJEpGI0ap7WS+cYu6Dwo3Oiccfytg4lxZ38NN4d+b2jZ SRiQ/9lxkc9MLVNWKzEtKwZ9hv3g6/1uiOR3WRQJGz6QRSLnHpZLFlP0g3K9/TzTHo jhC66WWdAzH/jfkvAFh3PDsxaniQnB003RV8adzrLTjzz8jOpD3omFLOCZhaIGma8l KvOyfR7zs6d3g== From: Nicolas Dufresne <nicolas.dufresne@collabora.com> To: linux-media@vger.kernel.org Cc: kernel@collabora.com, Nicolas Dufresne <nicolas.dufresne@collabora.com> Subject: [PATCH v1 0/4] media: rkvdec: Fix H.264 error resilience Date: Fri, 23 Dec 2022 14:38:02 -0500 Message-Id: <20221223193807.914935-1-nicolas.dufresne@collabora.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1 autolearn=ham autolearn_force=no |
Series |
media: rkvdec: Fix H.264 error resilience
|
|
Message
Nicolas Dufresne
Dec. 23, 2022, 7:38 p.m. UTC
This patch serie changes the decoding mode from "exit on error" to "keep decoding". Using this mode and re-enabling error detection allow getting error resilience without loosing the ability to report errors to userland. This have showed great results, but might be a little more risky since this is not the mode that the reference code uses and the documentation is very brief. With this in place, userspace can chose to skip or display corrupted frames depending on its application requirement. Previsouly, applicaiton would have had no choice but to present the corrupted frames. Changes since V1: - Removed merged patch - Changed usage of pr_debug into v4l2_dbg - Fix typos in commit messages and comments Nicolas Dufresne (5): media: rkvdec: Disable H.264 error detection media: rkvdec: Add an ops to check for decode errors media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro media: rkvdec: Re-enable H.264 error detection rkvdec: Improve error handling drivers/staging/media/rkvdec/rkvdec-h264.c | 23 +++++++++++++-- drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +- drivers/staging/media/rkvdec/rkvdec.c | 34 ++++++++++++++++++---- drivers/staging/media/rkvdec/rkvdec.h | 2 ++ 4 files changed, 51 insertions(+), 10 deletions(-)
Comments
fyi, this cover letter was v2. Le vendredi 23 décembre 2022 à 14:38 -0500, Nicolas Dufresne a écrit : > This patch serie changes the decoding mode from "exit on error" > to "keep decoding". Using this mode and re-enabling error detection > allow getting error resilience without loosing the ability to report > errors to userland. This have showed great results, but might be a > little more risky since this is not the mode that the reference code > uses and the documentation is very brief. With this in place, > userspace can chose to skip or display corrupted frames depending > on its application requirement. Previsouly, applicaiton would have > had no choice but to present the corrupted frames. > > Changes since V1: > - Removed merged patch > - Changed usage of pr_debug into v4l2_dbg > - Fix typos in commit messages and comments > > Nicolas Dufresne (5): > media: rkvdec: Disable H.264 error detection > media: rkvdec: Add an ops to check for decode errors > media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro > media: rkvdec: Re-enable H.264 error detection > rkvdec: Improve error handling > > drivers/staging/media/rkvdec/rkvdec-h264.c | 23 +++++++++++++-- > drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +- > drivers/staging/media/rkvdec/rkvdec.c | 34 ++++++++++++++++++---- > drivers/staging/media/rkvdec/rkvdec.h | 2 ++ > 4 files changed, 51 insertions(+), 10 deletions(-) >
On Sat, Dec 24, 2022 at 3:38 AM Nicolas Dufresne <nicolas.dufresne@collabora.com> wrote: > > This patch serie changes the decoding mode from "exit on error" > to "keep decoding". Using this mode and re-enabling error detection > allow getting error resilience without loosing the ability to report > errors to userland. This have showed great results, but might be a > little more risky since this is not the mode that the reference code > uses and the documentation is very brief. With this in place, > userspace can chose to skip or display corrupted frames depending > on its application requirement. Previsouly, applicaiton would have > had no choice but to present the corrupted frames. > > Changes since V1: > - Removed merged patch > - Changed usage of pr_debug into v4l2_dbg > - Fix typos in commit messages and comments > > Nicolas Dufresne (5): > media: rkvdec: Disable H.264 error detection > media: rkvdec: Add an ops to check for decode errors > media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro > media: rkvdec: Re-enable H.264 error detection > rkvdec: Improve error handling Apart from the minor comments in patch 3, the series is Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Do we need to add the check_error_info op for VP9? > drivers/staging/media/rkvdec/rkvdec-h264.c | 23 +++++++++++++-- > drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +- > drivers/staging/media/rkvdec/rkvdec.c | 34 ++++++++++++++++++---- > drivers/staging/media/rkvdec/rkvdec.h | 2 ++ > 4 files changed, 51 insertions(+), 10 deletions(-) > > -- > 2.38.1 >
Le lundi 26 décembre 2022 à 12:20 +0800, Chen-Yu Tsai a écrit : > On Sat, Dec 24, 2022 at 3:38 AM Nicolas Dufresne > <nicolas.dufresne@collabora.com> wrote: > > > > This patch serie changes the decoding mode from "exit on error" > > to "keep decoding". Using this mode and re-enabling error detection > > allow getting error resilience without loosing the ability to report > > errors to userland. This have showed great results, but might be a > > little more risky since this is not the mode that the reference code > > uses and the documentation is very brief. With this in place, > > userspace can chose to skip or display corrupted frames depending > > on its application requirement. Previsouly, applicaiton would have > > had no choice but to present the corrupted frames. > > > > Changes since V1: > > - Removed merged patch > > - Changed usage of pr_debug into v4l2_dbg > > - Fix typos in commit messages and comments > > > > Nicolas Dufresne (5): > > media: rkvdec: Disable H.264 error detection > > media: rkvdec: Add an ops to check for decode errors > > media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro > > media: rkvdec: Re-enable H.264 error detection > > rkvdec: Improve error handling > > Apart from the minor comments in patch 3, the series is > > Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> > > Do we need to add the check_error_info op for VP9? In general, I try to avoid changes I cannot test. If you happen to have VP9 with errors let me know. Looking quickly at the TRM, some part seems shared between H.264 and VP9 indeed. Though, the TRM discourage from enabling the "keep decoding on error" mode we use here. > > > drivers/staging/media/rkvdec/rkvdec-h264.c | 23 +++++++++++++-- > > drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +- > > drivers/staging/media/rkvdec/rkvdec.c | 34 ++++++++++++++++++---- > > drivers/staging/media/rkvdec/rkvdec.h | 2 ++ > > 4 files changed, 51 insertions(+), 10 deletions(-) > > > > -- > > 2.38.1 > >