From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer
Date: Sun, 20 Apr 2025 15:59:51 -0300
Message-ID: <817caa19-fc0e-45ea-bc5e-85069e21221b@gmail.com> (raw)
In-Reply-To: <6d771a9d-f9d7-497b-b721-ca0106e0ca1f@jkqxz.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 2865 bytes --]
On 4/20/2025 1:57 PM, Mark Thompson wrote:
> On 20/04/2025 17:20, James Almer wrote:
>> On 4/20/2025 1:07 PM, Derek Buitenhuis wrote:
>>> On 4/19/2025 8:07 PM, Mark Thompson wrote:
>>>> +typedef struct APVHeaderInfo {
>>>> + uint8_t pbu_type;
>>>> + uint16_t group_id;
>>>> +
>>>> + uint8_t profile_idc;
>>>> + uint8_t level_idc;
>>>> + uint8_t band_idc;
>>>> +
>>>> + uint32_t frame_width;
>>>> + uint32_t frame_height;
>>>> +
>>>> + uint8_t chroma_format_idc;
>>>> + uint8_t bit_depth_minus8;
>>>> +
>>>> + enum AVPixelFormat pixel_format;
>>>> +} APVHeaderInfo;
>>>
>>> Possibly this should put in the codec private data, and used
>>> in the decoder directly, since APV in ISOBMFF requires a global
>>> APVDecoderConfigurationRecord to be used - i.e. align with that.
>>> Mostly because I imagine that is how most APV is produced on
>>> phones.
>>>
>>> (Also, just excited to see APV!)
>> Assuming we define extradata for this codec, given there's no "raw" version of it like there's for h26*, we might want to enforce it to always be a APVDecoderConfigurationRecord, even if exported from the raw demuxer.
>> Having extradata will also let us know the value of things like bit_depth during init(), so things like DSP function pointers can be set with that knowledge in mind.
>
> For whole-frame cases the APVDecoderConfigurationRecord is irrelevant to the decoder as all the information is in the bitstream. It's not clear to me how the tile-subsample works, but I assume the normal bitstream is still present.
>
> Since it is not required by the decoder, mandating extradata there seems needlessly annoying for API users - even if they just want decode they have to do something else to make the extradata.
>
> (On the other hand, it seems fine to have an extradata there that the decoder ignores but the demuxer and encoder produce for an ISOBMFF muxer if that is the preferred model.)
>
> Thanks,
>
> - Mark
If a configuration record is already present in codecpar->extradata,
then muxing could be possible without setting delay_moov.
The mp4 muxer could generate the APVDecoderConfigurationRecord just fine
too with information present in the first packet, in theory, unless the
required number_of_configuration_entry amount of entries (each for a
different value of pbu_type) can't be made without more than one packet.
It's not too clear for me after a quick look, and there appears to be
non-primary frames the decoder you wrote doesn't support yet.
Encoders and demuxers are the two types of modules that would ideally
export extradata, and decoders and muxers are two that would use it if
present, but not depend on it.
The extract_extradata bsf can also generate it instead of having the raw
demuxer do it.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 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".
next prev parent reply other threads:[~2025-04-20 19:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-19 19:06 [FFmpeg-devel] [PATCH 0/6] APV support Mark Thompson
2025-04-19 19:06 ` [FFmpeg-devel] [PATCH 1/6] lavc: APV codec ID and descriptor Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer Mark Thompson
2025-04-20 16:07 ` Derek Buitenhuis
2025-04-20 16:20 ` James Almer
2025-04-20 16:57 ` Mark Thompson
2025-04-20 18:59 ` James Almer [this message]
2025-04-21 0:54 ` Michael Niedermayer
2025-04-21 14:59 ` Mark Thompson
2025-04-21 15:22 ` Andreas Rheinhardt
2025-04-21 21:30 ` Michael Niedermayer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 3/6] lavc/cbs: APV support Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 4/6] lavc: APV decoder Mark Thompson
2025-04-21 14:09 ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 5/6] lavc/apv: AVX2 transquant for x86-64 Mark Thompson
2025-04-19 20:34 ` Mark Thompson
2025-04-19 21:16 ` James Almer
2025-04-20 1:48 ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 6/6] lavc: APV metadata bitstream filter Mark Thompson
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=817caa19-fc0e-45ea-bc5e-85069e21221b@gmail.com \
--to=jamrial@gmail.com \
--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