Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avcodec/s302m: enable non-PCM decoding
Date: Thu, 15 Feb 2024 17:10:04 +0100
Message-ID: <170801340414.21676.5189683358387742257@lain.khirnov.net> (raw)
In-Reply-To: <0c3c8b9b-927e-470d-9272-67536279ba15@gyani.pro>

Quoting Gyan Doshi (2024-02-15 13:31:59)
> On 2024-02-15 04:17 pm, Anton Khirnov wrote:
> > Hi,
> > sorry for the delay, I've been busy fixing things for the release
> > Quoting Gyan Doshi via ffmpeg-devel (2024-01-29 05:00:33)
> >> On 2024-01-28 04:24 pm, Anton Khirnov wrote:
> >>>> a) it would mean essentially inlining this decoder in the demuxer.
> >>> Why is that a problem? This decoder seems like it shouldn't be a
> >>> decoder.
> >>>
> >>> I agree with Andreas that this seems like it's a demuxer pretending to
> >>> be a decoder.
> >> This module transforms the entire raw payload data to generate its
> >> output, even if the syntax is simple which
> >> essentially makes it a de-coder. The de-multiplexer aspect of multiple
> >> streams is an academic possibility allowed
> >> by the standard but not seen in any sample which makes me suspect it's
> >> used for carriage between broadcast
> >> facilities rather than something ever sent to an OTT provider, let alone
> >> an end user.
> > If it dynamically generates nested decoders, then it's not a proper
> > codec in our model. It should be either a part of the demuxer, or a
> > bitstream filter (possibly inserted automatically by the demuxer).
> 
> s302m is a hybrid creature and does not slot cleanly into any role. So 
> there is no theoretically proper place for this component - any choice 
> is a least-out-of-place accommodation.
> 
> But it is much more out of place inside a demuxer. Analyzing packet 
> payload and then manipulating that entire payload is much closer to a 
> decoding role than data chunk extraction for packetization.

I don't see why specifically this property should be the one
distinguishing demuxers from decoders, it sounds pretty arbitrary to me.
Many demuxers apply transformations of far higher complexity to the
bytestream before exporting it, e.g. in matroska the packet data may be
compressed, laced, etc.

> And the stream extracted from the container is meant to be SMPTE ST
> 302 not PCM* or Dolby-E/AC-3..etc,

"meant to be"? By whom?

The point of libavformat is to abstract away the differences between
containers as much as is reasonably feasible, and export the data in the
format most useful to the caller for decoding or other processing.

> which will both misrepresent what the container carries

Why should the caller care?

> and possibly discard S-ADM metadata, if present, in the packet.

Why could that not be exported as side data?

> A bsf in principle would work but in practice, can't as Andreas 
> clarified that bsfs can't set or alter codec_id after init. And 
> resetting the codec id requires packet inspection.

There are two possibilities then - either extend the BSF API to support
multiple output streams, or implement it inside libavformat as a
post-demuxer hook called in the same place as parsing.

> Nested decoders are used without issue in components like imm5 or ftr 
> (upto 64 nested decoders!) among others. There's no breaking of new 
> ground here.

Nested decoders are certainly not "without issue" - they are a constant
source of issues, since implementing nesting properly is very tricky. I
am fairly sure most nested decoders we have are subtly broken in various
ways.

> If you feel strongly about this, please refer this to the TC.

The TC is supposed to be invoked as a last resort.

-- 
Anton Khirnov
_______________________________________________
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:[~2024-02-15 16:10 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23  6:49 Gyan Doshi
2024-01-23  6:49 ` [FFmpeg-devel] [PATCH 2/2] fate: add tests for dolby_e decoding in s302m Gyan Doshi
2024-01-23  7:56 ` [FFmpeg-devel] [PATCH 1/2] avcodec/s302m: enable non-PCM decoding Kieran Kunhya
2024-01-23  8:32   ` Gyan Doshi
2024-01-23  9:05     ` Kieran Kunhya
2024-01-23 14:50       ` Devin Heitmueller
2024-01-23 14:53         ` Kieran Kunhya
2024-01-23 15:04           ` Devin Heitmueller
2024-01-23 10:28 ` Nicolas Gaullier
2024-01-23 11:18   ` Gyan Doshi
2024-01-25  4:59 ` Andreas Rheinhardt
2024-01-25  7:11   ` Gyan Doshi
2024-01-25 13:17     ` Andreas Rheinhardt
2024-01-26  4:23       ` Gyan Doshi
2024-01-26  6:42         ` Andreas Rheinhardt
2024-01-28 10:54         ` Anton Khirnov
2024-01-28 21:29           ` Kieran Kunhya
2024-01-29  4:00           ` Gyan Doshi via ffmpeg-devel
2024-01-29  9:27             ` Nicolas Gaullier
2024-01-29 10:17               ` Gyan Doshi
2024-01-29 10:18                 ` Kieran Kunhya
2024-02-15 10:47             ` Anton Khirnov
2024-02-15 12:31               ` Gyan Doshi
2024-02-15 16:10                 ` Anton Khirnov [this message]
2024-02-15 16:47                   ` Gyan Doshi
2024-02-15 20:26                     ` Kieran Kunhya
2024-02-16  4:12                       ` Gyan Doshi
2024-02-16  9:03                     ` Anton Khirnov
2024-02-17 11:46                       ` Gyan Doshi
2024-02-17 12:22                         ` Anton Khirnov
2024-02-17 12:37                           ` Gyan Doshi
2024-02-17 19:55                             ` Anton Khirnov
2024-02-18  0:43                               ` Michael Niedermayer
2024-02-18 18:20                                 ` Anton Khirnov
2024-02-18 22:34                                   ` Michael Niedermayer
2024-02-18 22:47                                     ` Vittorio Giovara
2024-02-19  8:45                                       ` Nicolas George
2024-02-19 14:15                                         ` Vittorio Giovara
2024-02-19 14:28                                           ` Nicolas George
2024-02-19 14:37                                             ` Vittorio Giovara
2024-02-19 14:41                                               ` Nicolas George
2024-02-18 22:48                                     ` Hendrik Leppkes
2024-02-19  1:17                                       ` Michael Niedermayer
2024-02-19  2:26                                         ` Vittorio Giovara
2024-02-19  2:07                                     ` Ronald S. Bultje
2024-02-19 21:37                                     ` Anton Khirnov
2024-02-19 21:54                                       ` Nicolas George
2024-02-20 21:39                                       ` Michael Niedermayer
2024-02-20 21:56                                         ` Kieran Kunhya
2024-02-20 22:07                                           ` Nicolas George
2024-02-18 18:50                                 ` Rémi Denis-Courmont
2024-02-18 18:55                                   ` Nicolas George
2024-02-18  4:06                               ` Gyan Doshi
2024-02-18 18:03                                 ` Anton Khirnov
2024-02-18 18:40                                   ` Nicolas George
2024-02-18 19:03                                     ` Rémi Denis-Courmont
2024-02-18 19:11                                       ` Nicolas George
2024-02-18 21:06                                     ` Vittorio Giovara
2024-02-18 21:25                                       ` Nicolas George
2024-02-18 21:55                                         ` Vittorio Giovara
2024-02-19  8:54                                           ` Nicolas George
2024-02-19 14:21                                             ` Vittorio Giovara
2024-02-19 14:30                                               ` Nicolas George
2024-02-19 14:33                                                 ` Vittorio Giovara
2024-02-19 14:34                                                   ` Nicolas George
2024-02-18 19:02                                   ` Gyan Doshi
2024-02-18 21:46                                     ` Vittorio Giovara
2024-02-19  5:10                                       ` Gyan Doshi
2024-02-19 14:30                                         ` Vittorio Giovara
2024-02-19 15:39                                           ` Gyan Doshi
2024-02-20  3:02                                             ` Vittorio Giovara
2024-02-17 12:31                         ` Rémi Denis-Courmont
2024-02-19  2:16                           ` epirat07
2024-02-16 13:55                 ` Andreas Rheinhardt
2024-02-17 11:44                   ` Gyan Doshi

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=170801340414.21676.5189683358387742257@lain.khirnov.net \
    --to=anton@khirnov.net \
    --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