From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id CF7DF48122 for ; Fri, 9 Feb 2024 15:11:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 641FE68D014; Fri, 9 Feb 2024 17:11:02 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC58D68CF84 for ; Fri, 9 Feb 2024 17:10:56 +0200 (EET) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=ez7Z2HcV; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 81FEA240DA9; Fri, 9 Feb 2024 16:10:56 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id EfLB85dgsCmQ; Fri, 9 Feb 2024 16:10:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1707491455; bh=3NxO9Rm2+kRkmiJpLdi372AJIE7ys9PRceQPT6O2Y0A=; h=Subject:From:To:Cc:In-Reply-To:References:Date:From; b=ez7Z2HcVat3cx1sy6subE+47yW9ezG1W99XUUM7ToCFMC8eNpA404yv+mYipvry7E Uu+IbIuTU8s954kT+HC+5GA0CqZyj8DW4LjtBrtsuklpOXhRWJk46s4uLke3nyLGft h7zKtZ06avJH8yqm8QxYK/hQBVetF6tUxcwVWiU4JWj5Clbm1XU5kwO4eIwSE+sbP0 x2RpA4LZxb6uALpx1VHol3/4EXr5916JClsSMxv0+48sfGZ2mMvTtVRxGRYTMzeSos PlBQZpk+Uv+NolKDEkoqBCHH4QMgCnGwuOIPHmgB4E+EnrJYEyAWD6DvPacwbKJq7A wloPywMcrcM+A== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id EFB12240177; Fri, 9 Feb 2024 16:10:55 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id DBDC21601B9; Fri, 9 Feb 2024 16:10:55 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240204192812.28129-2-cus@passwd.hu> References: <666763e4-561f-498c-85b0-e5b3c183436f@gmail.com> <20240204192812.28129-1-cus@passwd.hu> <20240204192812.28129-2-cus@passwd.hu> Mail-Followup-To: FFmpeg development discussions and patches , Marton Balint Date: Fri, 09 Feb 2024 16:10:55 +0100 Message-ID: <170749145587.8914.1907905647574802862@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2 4/5] avutil/channel_layout: add av_channel_layout_retype() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Marton Balint Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Marton Balint (2024-02-04 20:28:11) > +/** > + * Change the AVChannelOrder of a channel layout. > + * > + * Change of AVChannelOrder can be either lossless or lossy. In case of a > + * lossless conversion all the channel designations and the associated channel > + * names (if any) are kept. On a lossy conversion the channel names and channel > + * designations might be lost depending on the capabilities of the desired > + * AVChannelOrder. Note that some conversions are simply not possible in which > + * case this function returns AVERROR(ENOSYS). > + * > + * The following conversions are supported: > + * > + * Any -> Custom : Always possible, always lossless. > + * Any -> Unspecified: Always possible, lossless if channel designations > + * are all unknown and channel names are not used, lossy otherwise. > + * Custom -> Ambisonic : Possible if it contains ambisonic channels with > + * optional non-diegetic channels in the end. Lossy if the channels have > + * custom names, lossless otherwise. > + * Custom -> Native : Possible if it contains native channels in native > + * order. Lossy if the channels have custom names, lossless otherwise. > + * > + * On error this function keeps the original channel layout untouched. > + * > + * @param channel_layout channel layout which will be changed > + * @param order the desired channel layout order > + * @param flags a combination of AV_CHANNEL_LAYOUT_RETYPE_FLAG_* constants > + * @return 0 if the conversion was successful and lossless or if the channel > + * layout was already in the desired order > + * 1 if the conversion was successful but lossy You could say 'positive number' instead of 1, which leaves us wiggle room to use other numbers in the future in a backwards compatible way. Looks ok otherwise. -- 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".