Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/7] lavu: add ecinfo sidedata
Date: Wed, 26 Jul 2023 00:00:32 +0200
Message-ID: <20230725220032.GU7802@pb2> (raw)
In-Reply-To: <m21qgwdvt0.fsf@itanimul.li>


[-- Attachment #1.1: Type: text/plain, Size: 2590 bytes --]

On Tue, Jul 25, 2023 at 02:05:43PM +0200, J. Dekker wrote:
> 
> Hi Devin,
> 
> Devin Heitmueller <devin.heitmueller@ltnglobal.com> writes:
> > On Fri, Jul 21, 2023 at 9:38 AM J. Dekker <jdek@itanimul.li> wrote:
> >
> > I appreciate the value of stats so I can tell that the stream had
> > errors, but how is this side data "helpful to a renderer attempting to
> > filter or conceal video decoding errors and artifacts" if there is no
> > information relating to the region of the picture where the errors are
> > present?  Is the assumption that an application will simply have some
> > threshold at which it decides to duplicate the previous frame rather
> > than showing the current one?
> 
> Yes, this is primarily the usecase here initially. As some point a
> renderer would rather duplicate previous frame than rely on
> reconstruction. This could be done within EC itself but letting the
> decoder make this choice rather than exporting the information to a
> renderer and doing it there seems incorrect to me.

Error concealment is not merely a choice of copying or not

Some areas may be damaged, surrounding areas may be undamaged
an example could be a row of macroblocks / a slice
To perform error concealment properly you need to know the motion
vectors of the surrounding slices and their macroblock types
for example if all the surrounding macroblocks have a motion vector
pointing left by 7 pixels the lost slice likely needs to be
using the same.
This requires also knowledge of the reference frames the decoder used
and ability to apply similar motion compensation to know what "-7" means
If there are different motion vecstors used in surrounding macroblocks
it becomes even more complex

Also with some decoders you can loose the texture of a slice but have
undamaged motion vectors. Or you may have intra slices with DC undamaged
but AC lost for every macroblock

And if its all intra blocks, some inpainting based on spatial surroundings
may be better than using the previosu frames.
This is all implemented in our error concealment code.

Trying to do this outside is a mistake. Not only is it hard due to the
deep connection to decoder state it is also something every user of
libavcodec needs. The code belongs in a place every libavcodec user
has access to and can reuse it from.

Thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

  reply	other threads:[~2023-07-25 22:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 13:37 J. Dekker
2023-07-21 13:37 ` [FFmpeg-devel] [PATCH 2/7] lavc: add AV_CODEC_EXPORT_DATA_ERROR J. Dekker
2023-07-21 13:37 ` [FFmpeg-devel] [PATCH 3/7] lavc/error_resilience: fill ecinfo J. Dekker
2023-07-21 13:37 ` [FFmpeg-devel] [PATCH 4/7] lavc: set decode_error_flags when ec active J. Dekker
2023-07-21 13:37 ` [FFmpeg-devel] [PATCH 5/7] lavc/h264: export ecinfo J. Dekker
2023-07-21 13:37 ` [FFmpeg-devel] [PATCH 6/7] tools/ffprobe: add ecinfo frame side data J. Dekker
2023-07-21 13:47   ` [FFmpeg-devel] [PATCH 6/7 v1.1] " J. Dekker
2023-07-21 13:37 ` [FFmpeg-devel] [PATCH 7/7] fate: add ecinfo sidedata test J. Dekker
2023-07-21 14:44 ` [FFmpeg-devel] [PATCH 1/7] lavu: add ecinfo sidedata Devin Heitmueller
2023-07-25 12:05   ` J. Dekker
2023-07-25 22:00     ` Michael Niedermayer [this message]
2023-07-21 23:49 ` Michael Niedermayer
     [not found] ` <20230721133746.33335-1-jdek@itanimul.li-N_sf260--B-9>
2023-07-22  0:12   ` Lynne

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=20230725220032.GU7802@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.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

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git