From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: linux-media@vger.kernel.org
Cc: Nicolas Dufresne <nicolas.dufresne@collabora.com>, kernel@collabora.com
Subject: [PATCH v1 0/5] media: rkvdec: Fix H.264 error resilience
Date: Fri, 10 Jun 2022 08:52:10 -0400 [thread overview]
Message-ID: <20220610125215.240539-1-nicolas.dufresne@collabora.com> (raw)
Cc: kernel@collabora.com,
linux-media@vger.kernel.org
We found that when RKVDEC H.264 decoder encounter a stream error
(corruption, or error in the bitstream) the decoder keeps reporting
errors in the following (good) frames unless there is some pause
before starting a new decoder operation. As a side effect, the
decoder is not resilient to errors and this leads to a much worst
experience then needed.
First patch of this series implement a conservative fix for this,
which consist of simply disabling error detection. This method is
very resilient to errors, but will completely hide any decoding
errors. This mode have been running for years in ChromeOS
downstream driver, thus we believe this is that safe approach
and the one to backport into stable.
The other patches 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.
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
media: rkvdec: Improve error handling
drivers/staging/media/rkvdec/rkvdec-h264.c | 19 ++++++++++++-
drivers/staging/media/rkvdec/rkvdec-regs.h | 2 +-
drivers/staging/media/rkvdec/rkvdec.c | 32 ++++++++++++++++++----
drivers/staging/media/rkvdec/rkvdec.h | 2 ++
4 files changed, 47 insertions(+), 8 deletions(-)
--
2.36.1
next reply other threads:[~2022-06-10 12:52 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 12:52 Nicolas Dufresne [this message]
2022-06-10 12:52 ` [PATCH v1 1/5] media: rkvdec: Disable H.264 error detection Nicolas Dufresne
2022-06-10 12:52 ` Nicolas Dufresne
2022-06-10 13:26 ` Dmitry Osipenko
2022-06-10 13:26 ` Dmitry Osipenko
2022-06-10 16:39 ` Brian Norris
2022-06-10 16:39 ` Brian Norris
2022-06-27 17:44 ` Ezequiel Garcia
2022-06-27 17:44 ` Ezequiel Garcia
2022-06-10 12:52 ` [PATCH v1 2/5] media: rkvdec: Add an ops to check for decode errors Nicolas Dufresne
2022-06-10 12:52 ` Nicolas Dufresne
2022-06-14 14:44 ` Hans Verkuil
2022-06-14 14:44 ` Hans Verkuil
2022-06-14 16:14 ` Nicolas Dufresne
2022-06-14 16:14 ` Nicolas Dufresne
2022-11-24 10:28 ` Hans Verkuil
2022-11-24 10:28 ` Hans Verkuil
2022-06-10 12:52 ` [PATCH v1 3/5] media: rkvdec: Fix RKVDEC_ERR_PKT_NUM macro Nicolas Dufresne
2022-06-10 12:52 ` Nicolas Dufresne
2022-06-10 12:52 ` [PATCH v1 4/5] media: rkvdec: Re-enable H.264 error detection Nicolas Dufresne
2022-06-10 12:52 ` Nicolas Dufresne
2022-06-10 13:20 ` Dan Carpenter
2022-06-10 13:20 ` Dan Carpenter
2022-06-10 13:48 ` Dmitry Osipenko
2022-06-10 13:48 ` Dmitry Osipenko
2022-06-10 16:23 ` Nicolas Dufresne
2022-06-10 16:23 ` Nicolas Dufresne
2022-06-10 15:01 ` Ezequiel Garcia
2022-06-10 15:01 ` Ezequiel Garcia
2022-06-10 16:38 ` Nicolas Dufresne
2022-06-10 16:38 ` Nicolas Dufresne
2022-06-11 12:08 ` Alex Bee
2022-06-11 12:08 ` Alex Bee
2022-06-13 13:09 ` Nicolas Dufresne
2022-06-13 13:09 ` Nicolas Dufresne
2022-06-10 12:52 ` [PATCH v1 5/5] media: rkvdec: Improve error handling Nicolas Dufresne
2022-06-10 12:52 ` Nicolas Dufresne
2022-06-10 19:14 ` Sebastian Fricke
2022-06-10 19:14 ` Sebastian Fricke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220610125215.240539-1-nicolas.dufresne@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.