From: Anton Khirnov <anton@khirnov.net> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 4/5] avutil/channel_layout: add av_channel_layout_retype() Date: Sat, 03 Feb 2024 11:38:43 +0100 Message-ID: <170695672373.8914.9293325106328127368@lain.khirnov.net> (raw) In-Reply-To: <3677f954-85ec-4098-a6da-5f3c5dd40873@gmail.com> Quoting James Almer (2024-02-02 13:56:31) > I wrote a function like this some time ago, but i lost the patch by > accident during a migration. > > The way i approached it was making the return codes reflect if the > conversion was lossless or not, as in, custom -> native is lossless only > if channels have no custom names (and possible only if the ids are > within UINT64_MAX and in order). > Anything to Unspec is always lossy, etc. Unless the source is custom with every channel unknown. > Custom -> Ambi: Possible only if it contains ambi channels. Lossless. > Custom -> Native: Possible only if has no ambi channels and all ids < 64 > and in order. Lossy if it has custom names, otherwise lossless. > Ambi -> Custom: Lossless. > Ambi -> Native: Not possible. > Native -> Custom: Lossless. > Native -> Ambi: Not possible. > Any -> Unspec: Possible but lossy. > > So 0 for lossless, 1 for lossy, ENOSYS for not possible. That sounds good to me. Might also have a flags argument that forces lossless, and for future extensions. -- 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".
next prev parent reply other threads:[~2024-02-03 10:38 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-29 23:27 [FFmpeg-devel] [PATCH 1/5] avformat/mov_chan: do not assume channels are in native order Marton Balint 2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 2/5] avformat/mov_chan: never override number of channels based on chan atom Marton Balint 2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 3/5] avutil/channel_layout: add av_channel_layout_from_custom() Marton Balint 2024-02-01 8:56 ` Anton Khirnov 2024-02-01 20:01 ` Marton Balint 2024-02-02 4:42 ` Anton Khirnov 2024-01-29 23:27 ` [FFmpeg-devel] [PATCH 4/5] avutil/channel_layout: add av_channel_layout_retype() Marton Balint 2024-01-31 23:01 ` [FFmpeg-devel] [PATCH v2 " Marton Balint 2024-02-01 9:02 ` Anton Khirnov 2024-02-01 20:36 ` Marton Balint 2024-02-03 16:19 ` Anton Khirnov 2024-02-02 12:56 ` [FFmpeg-devel] [PATCH " James Almer 2024-02-03 10:38 ` Anton Khirnov [this message] 2024-02-03 13:24 ` James Almer 2024-02-04 19:28 ` [FFmpeg-devel] [PATCH v2 3/5] avutil/channel_layout: add av_channel_layout_custom_init() Marton Balint 2024-02-04 19:28 ` [FFmpeg-devel] [PATCH v2 4/5] avutil/channel_layout: add av_channel_layout_retype() Marton Balint 2024-02-09 15:10 ` Anton Khirnov 2024-02-11 22:38 ` Marton Balint 2024-02-11 22:51 ` James Almer 2024-02-11 23:03 ` Marton Balint 2024-02-04 19:28 ` [FFmpeg-devel] [PATCH v2 5/5] avformat/mov_chan: add support for reading custom channel layouts when layout_tag == 0 Marton Balint 2024-02-08 20:16 ` [FFmpeg-devel] [PATCH v3 " Marton Balint 2024-01-29 23:27 ` [FFmpeg-devel] [PATCH " Marton Balint 2024-02-08 19:25 ` [FFmpeg-devel] [PATCH 1/5] avformat/mov_chan: do not assume channels are in native order Marton Balint
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=170695672373.8914.9293325106328127368@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