All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/5] media: rkvdec: Fix H.264 error resilience
@ 2022-06-10 12:52 Nicolas Dufresne
  2022-06-10 12:52   ` Nicolas Dufresne
                   ` (4 more replies)
  0 siblings, 5 replies; 39+ messages in thread
From: Nicolas Dufresne @ 2022-06-10 12:52 UTC (permalink / raw)
  To: linux-media; +Cc: Nicolas Dufresne, kernel

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


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2022-11-24 10:29 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 12:52 [PATCH v1 0/5] media: rkvdec: Fix H.264 error resilience Nicolas Dufresne
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

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.