From patchwork Sun Jan 7 21:30:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 45526 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp672768pzc; Sun, 7 Jan 2024 13:31:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmMxuTr6zJ6n9Po8kyE29j+74hjTukfyFHJxAKxnZvjGcQWmNPWHylQIIZNz4rLCW4MyGF X-Received: by 2002:a17:906:6d97:b0:a28:50dd:66cb with SMTP id h23-20020a1709066d9700b00a2850dd66cbmr1056614ejt.88.1704663078843; Sun, 07 Jan 2024 13:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704663078; cv=none; d=google.com; s=arc-20160816; b=V+8gQ3auIJcPZIKvXyDwIod6WQiDdehtKJuwt7eL8yK0cJs3Ct/9YUOD6IaZKLI/7D 7neLHdTrfJDm8Rao6CQMtJZa89QkTu1metCgfXgI6AxgKAgCV/NpVvkPgFIoydyjZANP MjFJQa+xamyhDR/ylH/Ba6UJN7b6fGlNGcO7nBY3tyJZOqVk208bBaxqfBuTnj95aIyE me9miWoWY+pRArCa4omeGd7FT+ecUpkuOY/IIFQyq7Dm2YJ/Isc3QGN8q8N++5XaBnX3 1NF0yi/kqt8AK3VWqHYeUzL7jBSoRvG1fvnASkmsYA6qb3g9SewSFUDdFf0mzbbZFiyp 39AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=jZRUAJQ2yKtidzlQCWWGoPgMu+xV6XY0La8K8zJhwZc=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ymv0ekimp/kH/iyGSFO8V1G5a/qcwi3scmJmixwUwvfyhWb9UQqUoINce30hgwc0ZT t/Mkp0I19c9DQw22vuxG5NReNEDb/qCxieFqzOMd7TtzzjllB4LMbZ1bIhKMcEF++iYU TJ1N83YqKvLjRwYkZMRY4wrixDbzSZxJdpCIv2XYn3s9+7IUtA9wy9WH9SuIwDX5Y9sU fAt2CMr6g37dL6p8rRAicX5Q5r6gPy9zNeiZt9TAig8QMzMJrCktSgHv19Q2CknlB0j0 HbTMRmC0FKmosvyXuy3V4vkLWfNOVGCcgPFASkncLAZ+SA7eX73zSXF6ffOVG4q21avm GCMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=XdqmHZZ+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i18-20020a170906a29200b00a235ce4851bsi2582685ejz.796.2024.01.07.13.31.17; Sun, 07 Jan 2024 13:31:18 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=XdqmHZZ+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B5A2F68CC11; Sun, 7 Jan 2024 23:31:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15DB868BA2E for ; Sun, 7 Jan 2024 23:31:07 +0200 (EET) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d4ab4e65aeso13556685ad.0 for ; Sun, 07 Jan 2024 13:31:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704663064; x=1705267864; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=GjQsMiVBP98QndhrPGpunfS7ucvkF0kGCBZzfyp71gA=; b=XdqmHZZ+TQgm/Z+viH4yfV8eG/4Yzp+ouHiTbHU4Y/BDytC6GjLfGHE2EzC21a590S DM05Js8rkm+YtLsQVsdf+7vkIVLfieqWGdLv4wWKbObk87QzMNqR/Deoi2qLb0jBdyC6 9/3g9bqvb0XRxvqJMSGYXaTayA9J6pjwEY2VaFc4o9oLKAO/WcjACC9Wgg9BEXndDn2l N/heemfBpNu4lPiA+yAqrkxolE5sG94npPzWjGtBBv604iTp5CrgXJveG54fyXCs1BqD M7A2kDUADc5+3BBNN4enM1ui2KakVoWCoeeLhsvtCrTsj/zyW3tjH9qSmw05JnXyn0jY GG7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704663064; x=1705267864; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GjQsMiVBP98QndhrPGpunfS7ucvkF0kGCBZzfyp71gA=; b=etFUJTStD+6zBbIcmW7WYRPvtYKooantLeL5I0Rpwa+do02apBt7Z0sK+fSM7tRIdl kjNJVTPkn7FrGDeEMacdH1ZGkkRMedUnXCillrxY7GLAT7dCbKOWwcRl1F6xochb3hNI xDcRydQ7BNnft/FxF+dIDJfecVfYviepVWvWdM/TJTSn6fOktjrRa3qtWN610eakm8hI XCNs8tS5Sr2oa3cuIyBbY/m4GN9UIQGVasDUQN6U7SpFUcxMBh9DzYm7ZchUXv1P1Pdl zQKaTKBm4uRvsEPDTRqXNEnxhzlmtTEXV8o8rGVF0NjqRFd3py2d0KaJ0ehVb9ZnF9FJ 0Zjg== X-Gm-Message-State: AOJu0YwIRQ9LFx3Ks/7cx3GERcdf5NMP9fnqzzpJiuAZxUpI6LCXEt8B 18RUPyyXVriL+Tk6/riA11mVC6wHbwM= X-Received: by 2002:a17:902:ecd2:b0:1cc:5671:8d9 with SMTP id a18-20020a170902ecd200b001cc567108d9mr7685705plh.27.1704663063858; Sun, 07 Jan 2024 13:31:03 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id a21-20020a1709027d9500b001d403969bf4sm4805939plm.309.2024.01.07.13.31.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 13:31:03 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Jan 2024 18:30:57 -0300 Message-ID: <20240107213100.16205-1-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] avformat/iamfenc: don't write empty packets 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: uEEMzKZwS27+ And return an error if they are not side data only packets. Signed-off-by: James Almer --- libavformat/iamfenc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavformat/iamfenc.c b/libavformat/iamfenc.c index 1de416b663..a02f84035a 100644 --- a/libavformat/iamfenc.c +++ b/libavformat/iamfenc.c @@ -278,6 +278,16 @@ static int iamf_write_packet(AVFormatContext *s, AVPacket *pkt) int dyn_size, type = st->id <= 17 ? st->id + IAMF_OBU_IA_AUDIO_FRAME_ID0 : IAMF_OBU_IA_AUDIO_FRAME; int ret; + if (!pkt->size) { + uint8_t *new_extradata = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, NULL); + + if (!new_extradata) + return AVERROR_INVALIDDATA; + + // TODO: update FLAC Streaminfo on seekable output + return 0; + } + if (s->nb_stream_groups && st->id == c->first_stream_id) { AVIAMFParamDefinition *mix = (AVIAMFParamDefinition *)av_packet_get_side_data(pkt, AV_PKT_DATA_IAMF_MIX_GAIN_PARAM, NULL); From patchwork Sun Jan 7 21:30:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 45527 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp672808pzc; Sun, 7 Jan 2024 13:31:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMyfIKaQc39EASYB5OinszbkRDdwCw5h7JTbMUOnHdIm1qV+roj1Ijjcd6DPghdVlLwpCI X-Received: by 2002:a17:906:7cd:b0:a27:8953:ea89 with SMTP id m13-20020a17090607cd00b00a278953ea89mr717969ejc.60.1704663087542; Sun, 07 Jan 2024 13:31:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704663087; cv=none; d=google.com; s=arc-20160816; b=cyaLheYbo6AFbMBaizTP1VpLqsnSR9JH0Q3PehUGsYV1u3+J9OdgQIGY/TJEk+NWZG O4p2pXg5hABsk9L1FDM7ajkEbLhcYhz+vbEFocQFFGOJv/xKDeFpp2WjdLg/FsoNxxFJ VH8wTmZHcf0/t6UnIDk/v3rT6YHWhVphR3CzmcRuUJUGRDyfNVadyazK5W8L7DZR1OTF uxKh+CUMZf9BMEwEesZNgW5JY1JfrXnC5H60yzusPgHe6sMYbtY/1idBkqztfgph2Q3c I7dZQP9EMo/EBAnOVlYUFrUpDjQSt/L7sJynbOoKWIe3OnIUtwd+OMLwPRRHIn5hU0z0 pwgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=al9ZxV2L4EZbZseT/54bcNc6Jf2Wz2EbbyHu0Em4A8c=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=a90Aj7tyRPGBDEIaCWIRyI0OUq5g3GwD0qun5kdzhDNkwZ3SpzMKtv/Z8BMfFus6rO +vcc1+u18VUCIZyAhBU9OfRYDY9+7RdNzc/UarmtrGvoC02jYekJhKyzODsQNgpsgxjt EjOMOXMvtkts2LUZcIbF8JvmcFJSEEQE6S2i+48W3dgasxNBlAeg/YgBAmgkYueGsJsI RxQ/aiAXI0KMo+561Joa+qcY91g2RefXjExc5pficdXnfFgrMu56Te5ujAKPddH8GE8G BMTx0tyCzLyN5nYRZMIuIRwf6BJ0PZ9o4Pf/kCbHSxju1vsIKPyUJcn6eRHaIa1B2DM6 7tmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=gzI6xhur; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r25-20020a170906365900b00a26ae3c6702si2570788ejb.248.2024.01.07.13.31.27; Sun, 07 Jan 2024 13:31:27 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=gzI6xhur; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E4FFE68CD64; Sun, 7 Jan 2024 23:31:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0BFB868CBD9 for ; Sun, 7 Jan 2024 23:31:08 +0200 (EET) Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7bade847536so76139639f.0 for ; Sun, 07 Jan 2024 13:31:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704663065; x=1705267865; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ixIIH03PxZKTBKDKtMmaH9N9oJ+gfP01Xmn5cRfOf0I=; b=gzI6xhurLiyira89qstzbFmCYwuNdBT8SkkHxnd6XaFkc1HisKac/rREjqLIu5IG85 +Aam5tW8/ZEhE9jNESO6Vd2JdD3d69iPwyzSn4d8U1SOsRtlYkkCIovcUa4I7PahsXSg 38Lv0PBxSGw6sm7Jl1ztfU7wJB/adD78zSt/1hqXGFE794mqAyIMPQs0GXK/F93TFr13 fSIHVhWYj0ADm22rlra/0Km7WzOaasCvrrVFpqCKPcumgWAc/DWK2Bm5MjZYbfUGbu5Q sqGBoWzMKJz82NJaq3cO3FJ64Y0Uia/9DT+5G1AgPw9CRQFVwlkBTNIjc1vjWYuIpY2a UPXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704663065; x=1705267865; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ixIIH03PxZKTBKDKtMmaH9N9oJ+gfP01Xmn5cRfOf0I=; b=tkYkl2WJowoE3CL7MjWdnHJg7vaT4IpC2YFLjUGKZSkc0/9hQnV6K+2VCyu4akP/tc j6DpF3vzwZ3yzc0DSsh9+b3RzV6ODQl1bAoIuFfajdzIAftKRYLXBvPvrBQal4mtczfB SEfvL/7+MppqDwlE5jGFpNxmCdEqahNK31iSp/lojHkCM9cunCfBu2GQZJeJkaYN1Wph op3exppI+X8JN4YCZ7RO87HdW6yw4cMadIKekXGTQKhb2p85l/sRS997nabqIf4t0FzD /CmJ122A3GSspPupdBxSwOG11/BFPSwkW3RX8YE8DDEf6SvdcNaAPLMAhW834RblFy4h jWaA== X-Gm-Message-State: AOJu0YwSMjam7MCv8ZexQOtrKmaMAXEkvUHMbVQXakSXny4QUB71XsNj 3pcSv/ih9qpGyl1SCvgh2e+PW4P3jTU= X-Received: by 2002:a05:6e02:2487:b0:35d:a0c8:5d85 with SMTP id bt7-20020a056e02248700b0035da0c85d85mr5959330ilb.5.1704663065340; Sun, 07 Jan 2024 13:31:05 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id a21-20020a1709027d9500b001d403969bf4sm4805939plm.309.2024.01.07.13.31.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 13:31:04 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Jan 2024 18:30:58 -0300 Message-ID: <20240107213100.16205-2-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240107213100.16205-1-jamrial@gmail.com> References: <20240107213100.16205-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] fftools/cmdutils: add OPT_TYPE_FILE 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: C8pswuD5/eQD Same as OPT_TYPE_STRING, except it takes a file argument whose contents are read as a string. Signed-off-by: James Almer --- fftools/cmdutils.c | 34 ++++++++++++++++++++++++++++++++++ fftools/cmdutils.h | 3 +++ fftools/ffmpeg.h | 1 - fftools/ffmpeg_opt.c | 32 +++----------------------------- 4 files changed, 40 insertions(+), 30 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 44228ea637..40623a9ace 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -37,6 +37,7 @@ #include "libswresample/swresample.h" #include "libavutil/avassert.h" #include "libavutil/avstring.h" +#include "libavutil/bprint.h" #include "libavutil/channel_layout.h" #include "libavutil/display.h" #include "libavutil/getenv_utf8.h" @@ -266,6 +267,13 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt, if (!str) return AVERROR(ENOMEM); *(char **)dst = str; + } else if (po->type == OPT_TYPE_FILE) { + char *str; + str = file_read(arg); + av_freep(dst); + if (!str) + return AVERROR(ENOMEM); + *(char **)dst = str; } else if (po->type == OPT_TYPE_BOOL || po->type == OPT_TYPE_INT) { ret = parse_number(opt, arg, OPT_TYPE_INT64, INT_MIN, INT_MAX, &num); if (ret < 0) @@ -1088,3 +1096,29 @@ double get_rotation(const int32_t *displaymatrix) return theta; } + +/* read file contents into a string */ +char *file_read(const char *filename) +{ + AVIOContext *pb = NULL; + int ret = avio_open(&pb, filename, AVIO_FLAG_READ); + AVBPrint bprint; + char *str; + + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error opening file %s.\n", filename); + return NULL; + } + + av_bprint_init(&bprint, 0, AV_BPRINT_SIZE_UNLIMITED); + ret = avio_read_to_bprint(pb, &bprint, SIZE_MAX); + avio_closep(&pb); + if (ret < 0) { + av_bprint_finalize(&bprint, NULL); + return NULL; + } + ret = av_bprint_finalize(&bprint, &str); + if (ret < 0) + return NULL; + return str; +} diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index 53227abb47..016ee325b9 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -81,6 +81,7 @@ enum OptionType { OPT_TYPE_FUNC, OPT_TYPE_BOOL, OPT_TYPE_STRING, + OPT_TYPE_FILE, OPT_TYPE_INT, OPT_TYPE_INT64, OPT_TYPE_FLOAT, @@ -470,4 +471,6 @@ void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems); double get_rotation(const int32_t *displaymatrix); +char *file_read(const char *filename); + #endif /* FFTOOLS_CMDUTILS_H */ diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 6137ac991e..cdde3c2c03 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -652,7 +652,6 @@ void remove_avoptions(AVDictionary **a, AVDictionary *b); int check_avoptions(AVDictionary *m); int assert_file_overwrite(const char *filename); -char *file_read(const char *filename); AVDictionary *strip_specifiers(const AVDictionary *dict); int find_codec(void *logctx, const char *name, enum AVMediaType type, int encoder, const AVCodec **codec); diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index c189cf373b..7ae1b55cf0 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -43,7 +43,6 @@ #include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/avutil.h" -#include "libavutil/bprint.h" #include "libavutil/channel_layout.h" #include "libavutil/display.h" #include "libavutil/intreadwrite.h" @@ -108,12 +107,13 @@ static void uninit_options(OptionsContext *o) SpecifierOptList *so = dst; for (int i = 0; i < so->nb_opt; i++) { av_freep(&so->opt[i].specifier); - if (po->type == OPT_TYPE_STRING) + if (po->type == OPT_TYPE_STRING || po->type == OPT_TYPE_FILE) av_freep(&so->opt[i].u.str); } av_freep(&so->opt); so->nb_opt = 0; - } else if (po->flags & OPT_FLAG_OFFSET && po->type == OPT_TYPE_STRING) + } else if (po->flags & OPT_FLAG_OFFSET && ( po->type == OPT_TYPE_STRING + || po->type == OPT_TYPE_FILE)) av_freep(dst); po++; } @@ -759,32 +759,6 @@ int assert_file_overwrite(const char *filename) return 0; } -/* read file contents into a string */ -char *file_read(const char *filename) -{ - AVIOContext *pb = NULL; - int ret = avio_open(&pb, filename, AVIO_FLAG_READ); - AVBPrint bprint; - char *str; - - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error opening file %s.\n", filename); - return NULL; - } - - av_bprint_init(&bprint, 0, AV_BPRINT_SIZE_UNLIMITED); - ret = avio_read_to_bprint(pb, &bprint, SIZE_MAX); - avio_closep(&pb); - if (ret < 0) { - av_bprint_finalize(&bprint, NULL); - return NULL; - } - ret = av_bprint_finalize(&bprint, &str); - if (ret < 0) - return NULL; - return str; -} - /* arg format is "output-stream-index:streamid-value". */ static int opt_streamid(void *optctx, const char *opt, const char *arg) { From patchwork Sun Jan 7 21:30:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 45528 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp672843pzc; Sun, 7 Jan 2024 13:31:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmTrMFQRYE6lK9JUgpN07YxrW71v7CFuhZiRPqrksjYTNwYqVu61UmNu/4MhsV1AAnDc2s X-Received: by 2002:a17:906:298d:b0:a26:5d51:871 with SMTP id x13-20020a170906298d00b00a265d510871mr2317919eje.3.1704663094739; Sun, 07 Jan 2024 13:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704663094; cv=none; d=google.com; s=arc-20160816; b=dDOuEfEFq+sXACmjE2cYMN4ROrSUfcERvpbEtr2hO/mq0OhcNYhM1Bh4aOhVRhsykP lgl6pNI1jEPB7j/ZbvjRt18j64FuSKESVAht2dgtnoPWVzuMdyabepq/E9i9ChFHP5i0 wDpJWGdrwpI7EPHD2S/dIUw4OOjqK9M/xeqLfzfXQtPEAiNQpCHUstJXz0M3VIqEKWRN 92HbhpFzfZdxiykfNjtsy9hmPbLUwrGAhq6A8fJUahxit/8CsUiUDZuBez4u2nvpxAo6 BoBnV7O/UW5Cgwd10JQ7YKv4ozf3Un9vZpC68pKlr7mbeVIhrKIyZQ1stHS3fv1rA4B8 vJVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=bKLDfy0voYS6TRaNE0CZvr1miqTC/XCjvO2vnIPlhtg=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=qHrapMXVd4tZ2TvFjDHo4jk33ZPMh7jPhkqM7w04NGvxrVg0BoHvQzbbwApDvJd0mA TyMazRYJ0EalesXvY2+V8tbUf+QKTIuc024IHnNE6z2N7mGBhOADSEb3KLJqP2tWlTum swdZfn4dM1I1MM1mQKzJCKNpZEa8H2XOOFWVHNF0e2Hb+JgZfvB0KA2uYcDxyuPtv4lL Of+H5YUsQ6etTWsqcRDbWy8/h0c+tm8O0ICYVMVcUVbyjn5fEabXmkMTqBvBNW2UBkjU 0SgqAaNGQjmGuUw/NGuPpqjyWLkkky2qMFV2Wjzs42mTC4B81BeZK3Wp8yL2TUep8Dz8 M/zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=JBt5Uqm2; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gi16-20020a1709070c9000b00a2a2ad86b09si1123324ejc.157.2024.01.07.13.31.34; Sun, 07 Jan 2024 13:31:34 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=JBt5Uqm2; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 15DD468CD84; Sun, 7 Jan 2024 23:31:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1528268CC4B for ; Sun, 7 Jan 2024 23:31:09 +0200 (EET) Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-3606f507efeso8219385ab.3 for ; Sun, 07 Jan 2024 13:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704663066; x=1705267866; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=n2/nWwmWyOBbBLUJm4Rk7FiXTtkfdIQhVPEehUz43zA=; b=JBt5Uqm2Ea7+otBsKUBnV5Ctt/vqZeVZkDjwOVEldCIaAvTlTPxFcnKdlg35+lEJlU qlZzK2wnULnerTi8KJxY7AqP+o4preBR8JUF/uhQifCK76LSRbFcqs3LzFHOZxrNPfKJ xo1OWm36ejMEG9xiFhsJoA1oF2/vmLFxuM6OX+SxJKL4Jm0tqpk3DSm0NWxe/0YL98xw EnNRbLT7YFgj7MTlGVdgLuMulHsu5cwBYtfBDAcYF51wo05tLAU8ze/lRT9IooecPfxQ vlNcrOhWzQGYwtA2NHCuo5oClo++D+B2A5MSToJbTal9xaRtz1wCuwdZ55qLuwcrUyYR WT4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704663066; x=1705267866; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n2/nWwmWyOBbBLUJm4Rk7FiXTtkfdIQhVPEehUz43zA=; b=G9Lf0q4FmLok0szV6wAHprJYdzRObukGhpfVNarSo42W7o2HziuXhUzVw21H4rAMHl /nVd0XJRqLAeu1ZsTHH8DkgsTid0JBW+Q4q3PEniL1hUYBV3n02v0QIvAkkv3urxIH9K 8bYuP92NS8NSgLsJY5P6BxJY8d1XNuzukPTh7Shn9/R8VUGuEKq93x3aimdaE/QXLbpN sxPA78V3d0E0o9tytOTcU/DO+kCbOOyOjCEUmq6RG3kGdiDR+QsFAb/mUuegx9vDgroz wH2jrf2+NTUEVHq6HONoCFy4q7RWOHX3PFZmWHU+NcD4vMGRwKAaTmDfkjxIaEO1DYlZ nnJQ== X-Gm-Message-State: AOJu0YzBfwZYobXpc/B0PNGrXQ4WH7M4lDiPYQ5l98WTkzd4WaAPAUrX FufS6+IWBIgzejxfDmKh/yBlM175OHY= X-Received: by 2002:a05:6e02:174c:b0:35f:f394:f79a with SMTP id y12-20020a056e02174c00b0035ff394f79amr5679021ill.36.1704663066673; Sun, 07 Jan 2024 13:31:06 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id a21-20020a1709027d9500b001d403969bf4sm4805939plm.309.2024.01.07.13.31.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 13:31:06 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Jan 2024 18:30:59 -0300 Message-ID: <20240107213100.16205-3-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240107213100.16205-1-jamrial@gmail.com> References: <20240107213100.16205-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_opt: add a stream_group_script option 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lOHNATVTI2V9 Similar to filter_complex_script. Should make setting stream groups easier. Signed-off-by: James Almer --- fftools/ffmpeg_mux_init.c | 2 +- fftools/ffmpeg_opt.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 80109df0ae..1b42ac9a1d 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -2301,7 +2301,7 @@ static int of_add_groups(Muxer *mux, const OptionsContext *o) char *str, *ptr = NULL; int ret = 0; - str = av_strdup(o->stream_groups.opt[i].u.str); + str = av_strireplace(o->stream_groups.opt[i].u.str, "\n", ""); if (!str) return ret; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 7ae1b55cf0..7347fcbd31 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1508,6 +1508,9 @@ const OptionDef options[] = { { "stream_group", OPT_TYPE_STRING, OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(stream_groups) }, "add stream group with specified streams and group type-specific arguments", "id=number:st=number..." }, + { "stream_group_script", OPT_TYPE_FILE, OPT_SPEC | OPT_OUTPUT, + { .off = OFFSET(stream_groups) }, + "read stream group with specified streams and group type-specific arguments from a file", "filename" }, { "dframes", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_PERFILE | OPT_EXPERT | OPT_OUTPUT | OPT_HAS_CANON, { .func_arg = opt_data_frames }, "set the number of data frames to output", "number", From patchwork Sun Jan 7 21:31:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 45529 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp672879pzc; Sun, 7 Jan 2024 13:31:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEIFe9oAPvMRIpeWKcFnma/OaKME16g3aU+hlzHXtlJcVGpfiot7dkk25ZKTFVg9wgkeqr X-Received: by 2002:aa7:d294:0:b0:557:f97:4ec with SMTP id w20-20020aa7d294000000b005570f9704ecmr1805162edq.79.1704663102826; Sun, 07 Jan 2024 13:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704663102; cv=none; d=google.com; s=arc-20160816; b=0tHvXjX7lqzFRS5XneQmfRKGFEXkIDVml1lA4JlRKtyi6ok+YPHsjxRADTZfx86F4z 4j59qcMkIyEGEYxtYTZOJfZy2RzEbX67n/mFA0M6r/uWXPpw0wxQLir46NLcgFKZWGxs D+p/eRzVqJblJuiae+JySBb5lwUHQCHSwIXI6leS4Jdp9wVtaPf8eOY1gpm8hu4O2N/x bE2EdE0jWsLuP/AtLLOZfq8jcCUHuLTTeMtWVZ/OOFZMubnQUlsOkB5sYwKoKBtSAe8e INzcsMqW3pQpwHrRE4Y0zfhXdVM7/4opAxlWGFm/dX+wUw7q2e+WQWOT4TXBAqJo4jlj 4zzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=ScocJ5X5/zsPbkeHFTgJgrEFBoNrxlKDF9z7lnKOT8Y=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=CAdNPZpidsMK60obc6KioysQ97ve1EdkgpBEeXTonKAltg9THzwBw4hSVmR8ZJuhT+ nix9ddtANVasGlQ7b6b70JDQ6PJdZ4JhEJdND7RvC4m5iAEMCZ5jNjoqMcPPqNbi9ui3 7m+F7tJTpRi1S2VxhfgzzDfPKXBvUYlPGE0cfL6xjHIjT9zKcocf4G11jh2+Ik3Wic9N xfFjHJNNDgp2biBZaxE4ZpscCKZIaHSPY4+7VzJvbSP5at5xmy0szw9IECCmdKtbyGrT c+rrzxY4YuBQsmBpscxlQ0VSaSgnkD+uMELEqzVexP2Bun5C8pq4b6Mz5IYj1geCLaHH sSrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=gTEgdixU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t9-20020a056402524900b005548fe62e67si2733262edd.315.2024.01.07.13.31.42; Sun, 07 Jan 2024 13:31:42 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=gTEgdixU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3246268CDF7; Sun, 7 Jan 2024 23:31:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B250268CCB5 for ; Sun, 7 Jan 2024 23:31:10 +0200 (EET) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-28c0536806fso1104068a91.0 for ; Sun, 07 Jan 2024 13:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704663068; x=1705267868; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=E5NnT9k1xN7oSLH/QN+GekEXcjgJzkuKMmiWwjsMGZk=; b=gTEgdixU6w8A51qcoexNA1O/k4/UtHkYOymqGpKoLxk2lj6DbjFh24FUt7KctMspiL vCdW1Q7bRX8Cl+i/MOzWj3nnqeSk1ZRWpGM3F3HayFYO74FAgBvBPGWZhY9wVJ819b3e hkWuvMPWIDjN6lJdLVABNCbYgouaDv3qqu6+sm/BoTdTIa6yJURQ5khHRj8EwTB8a6rf uoieb4KOX/mLgP1L5a/X4/U02V/QLO24Mwn0lS9VgEUT4TaKRuTKOxMNOOoaft3hXhb4 Wumr4n63rALIbUFM4du85e4cKwCxkiRSCvlO50GywEvtwZj+ofRA4IUJNVfFd88tGWpp r0bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704663068; x=1705267868; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E5NnT9k1xN7oSLH/QN+GekEXcjgJzkuKMmiWwjsMGZk=; b=g+IJ4rO7W+TGgJWhJomswqRpTiidD3kL0hj41XmTrR9Ke3xQa6LU7gufG11qsiRAYf Fa35KpWqwG/PsjexMfZn14BIM0g5qPNjiTmG3mAQrKz2ghBwAwSjpkxWTP4WVsjxUXU/ bYho3doUzWdwF3oYibPUeYDCiTwk41xg8STg+o5SkMdXFE5yZnDDi4q5E5wRTK9yko+S /NSiwvHZ0Ap/j3c5UvYlBWPwOFm9r765k7f0lETtOpKXXSa2Tn0CZlHXZ8r5hwEWrxtY LPrYywnI/5Z6MajKpWa9HLC0fiqgpt6qvVVH6mpiYFY+IOpFmA9zgo/lmK2fNGR3eSgd /seQ== X-Gm-Message-State: AOJu0YzreDvp8gimCmkqWJtJjEARe31VqDIzFRyyWUXto9c9eAxOWI9o VYojw+QLcod7zVYRLbvZBD6YLGnKiUs= X-Received: by 2002:a17:902:a383:b0:1d4:c98d:4032 with SMTP id x3-20020a170902a38300b001d4c98d4032mr2306249pla.23.1704663067969; Sun, 07 Jan 2024 13:31:07 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id a21-20020a1709027d9500b001d403969bf4sm4805939plm.309.2024.01.07.13.31.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 13:31:07 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Jan 2024 18:31:00 -0300 Message-ID: <20240107213100.16205-4-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240107213100.16205-1-jamrial@gmail.com> References: <20240107213100.16205-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/4] fate: add raw IAMF tests 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8qZtBdzB4x9c Covers muxing from raw pcm audio input into FLAC, using several scalable layouts, and demuxing the result. Signed-off-by: James Almer --- tests/Makefile | 7 +- tests/fate/iamf.mak | 31 ++++++ tests/filtergraphs/iamf_5_1 | 4 + tests/filtergraphs/iamf_5_1_2 | 5 + tests/filtergraphs/iamf_5_1_4 | 6 ++ tests/filtergraphs/iamf_7_1_4 | 7 ++ tests/ref/fate/iamf-5_1_4 | 98 ++++++++++++++++++ tests/ref/fate/iamf-7_1_4 | 114 +++++++++++++++++++++ tests/ref/fate/iamf-stereo | 18 ++++ tests/streamgroups/audio_element-5_1_4 | 7 ++ tests/streamgroups/audio_element-7_1_4 | 6 ++ tests/streamgroups/audio_element-stereo | 3 + tests/streamgroups/mix_presentation-5_1_4 | 2 + tests/streamgroups/mix_presentation-7_1_4 | 2 + tests/streamgroups/mix_presentation-stereo | 3 + 15 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 tests/fate/iamf.mak create mode 100644 tests/filtergraphs/iamf_5_1 create mode 100644 tests/filtergraphs/iamf_5_1_2 create mode 100644 tests/filtergraphs/iamf_5_1_4 create mode 100644 tests/filtergraphs/iamf_7_1_4 create mode 100644 tests/ref/fate/iamf-5_1_4 create mode 100644 tests/ref/fate/iamf-7_1_4 create mode 100644 tests/ref/fate/iamf-stereo create mode 100644 tests/streamgroups/audio_element-5_1_4 create mode 100644 tests/streamgroups/audio_element-7_1_4 create mode 100644 tests/streamgroups/audio_element-stereo create mode 100644 tests/streamgroups/mix_presentation-5_1_4 create mode 100644 tests/streamgroups/mix_presentation-7_1_4 create mode 100644 tests/streamgroups/mix_presentation-stereo diff --git a/tests/Makefile b/tests/Makefile index e89ce7f8e6..e76163acf3 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -23,7 +23,7 @@ FFMPEG=ffmpeg$(PROGSSUF)$(EXESUF) $(AREF): CMP= APITESTSDIR := tests/api -FATE_OUTDIRS = tests/data tests/data/fate tests/data/filtergraphs tests/data/maps tests/data/lavf tests/data/lavf-fate tests/data/pixfmt tests/vsynth1 $(APITESTSDIR) +FATE_OUTDIRS = tests/data tests/data/fate tests/data/filtergraphs tests/data/maps tests/data/streamgroups tests/data/lavf tests/data/lavf-fate tests/data/pixfmt tests/vsynth1 $(APITESTSDIR) OUTDIRS += $(FATE_OUTDIRS) $(VREF): tests/videogen$(HOSTEXESUF) | tests/vsynth1 @@ -70,6 +70,10 @@ tests/data/maps/%: TAG = COPY tests/data/maps/%: $(SRC_PATH)/tests/maps/% | tests/data/maps $(M)cp $< $@ +tests/data/streamgroups/%: TAG = COPY +tests/data/streamgroups/%: $(SRC_PATH)/tests/streamgroups/% | tests/data/streamgroups + $(M)cp $< $@ + RUNNING_FATE := $(filter check fate%,$(filter-out fate-rsync,$(MAKECMDGOALS))) # Check sanity of dependencies when running FATE tests. @@ -199,6 +203,7 @@ include $(SRC_PATH)/tests/fate/hap.mak include $(SRC_PATH)/tests/fate/hevc.mak include $(SRC_PATH)/tests/fate/hlsenc.mak include $(SRC_PATH)/tests/fate/hw.mak +include $(SRC_PATH)/tests/fate/iamf.mak include $(SRC_PATH)/tests/fate/id3v2.mak include $(SRC_PATH)/tests/fate/image.mak include $(SRC_PATH)/tests/fate/imf.mak diff --git a/tests/fate/iamf.mak b/tests/fate/iamf.mak new file mode 100644 index 0000000000..a1ba5916ba --- /dev/null +++ b/tests/fate/iamf.mak @@ -0,0 +1,31 @@ +FATE_IAMF += fate-iamf-stereo +fate-iamf-stereo: tests/data/asynth-44100-2.wav tests/data/streamgroups/audio_element-stereo tests/data/streamgroups/mix_presentation-stereo +fate-iamf-stereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-iamf-stereo: CMD = transcode wav $(SRC) iamf " \ + -stream_group_script $(TARGET_PATH)/tests/data/streamgroups/audio_element-stereo \ + -stream_group_script $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-stereo \ + -streamid 0:0 -c:a flac -t 1" "-c:a copy -map 0" + +FATE_IAMF += fate-iamf-5_1_4 +fate-iamf-5_1_4: tests/data/asynth-44100-10.wav tests/data/filtergraphs/iamf_5_1_4 tests/data/streamgroups/audio_element-5_1_4 tests/data/streamgroups/mix_presentation-5_1_4 +fate-iamf-5_1_4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-10.wav +fate-iamf-5_1_4: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters \ + -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/iamf_5_1_4 \ + -stream_group_script $(TARGET_PATH)/tests/data/streamgroups/audio_element-5_1_4 \ + -stream_group_script $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-5_1_4 \ + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" + +FATE_IAMF += fate-iamf-7_1_4 +fate-iamf-7_1_4: tests/data/asynth-44100-12.wav tests/data/filtergraphs/iamf_7_1_4 tests/data/streamgroups/audio_element-7_1_4 tests/data/streamgroups/mix_presentation-7_1_4 +fate-iamf-7_1_4: SRC = $(TARGET_PATH)/tests/data/asynth-44100-12.wav +fate-iamf-7_1_4: CMD = transcode wav $(SRC) iamf "-auto_conversion_filters \ + -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/iamf_7_1_4 \ + -stream_group_script $(TARGET_PATH)/tests/data/streamgroups/audio_element-7_1_4 \ + -stream_group_script $(TARGET_PATH)/tests/data/streamgroups/mix_presentation-7_1_4 \ + -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -streamid 4:4 -streamid 5:5 -streamid 6:6 -map [FRONT] -map [BACK] -map [CENTER] -map [LFE] -map [SIDE] -map [TOP_FRONT] -map [TOP_BACK] -c:a flac -t 1" "-c:a copy -map 0" + +FATE_IAMF-$(call TRANSCODE, FLAC, IAMF, WAV_DEMUXER PCM_S16LE_DECODER) += $(FATE_IAMF) + +FATE_FFMPEG += $(FATE_IAMF-yes) + +fate-iamf: $(FATE_IAMF-yes) diff --git a/tests/filtergraphs/iamf_5_1 b/tests/filtergraphs/iamf_5_1 new file mode 100644 index 0000000000..b1eedda4a0 --- /dev/null +++ b/tests/filtergraphs/iamf_5_1 @@ -0,0 +1,4 @@ +[0:a]channelmap=0|1:stereo[FRONT]; +[0:a]channelmap=4|5:stereo[BACK]; +[0:a]channelmap=2:mono[CENTER]; +[0:a]channelmap=3:mono[LFE]; diff --git a/tests/filtergraphs/iamf_5_1_2 b/tests/filtergraphs/iamf_5_1_2 new file mode 100644 index 0000000000..c18510f4b4 --- /dev/null +++ b/tests/filtergraphs/iamf_5_1_2 @@ -0,0 +1,5 @@ +[0:a]channelmap=0|1:stereo[FRONT]; +[0:a]channelmap=4|5:stereo[BACK]; +[0:a]channelmap=2:mono[CENTER]; +[0:a]channelmap=3:mono[LFE]; +[0:a]channelmap=6|7:stereo[TOP_FRONT]; diff --git a/tests/filtergraphs/iamf_5_1_4 b/tests/filtergraphs/iamf_5_1_4 new file mode 100644 index 0000000000..80dcc1f580 --- /dev/null +++ b/tests/filtergraphs/iamf_5_1_4 @@ -0,0 +1,6 @@ +[0:a]channelmap=0|1:stereo[FRONT]; +[0:a]channelmap=4|5:stereo[BACK]; +[0:a]channelmap=2:mono[CENTER]; +[0:a]channelmap=3:mono[LFE]; +[0:a]channelmap=6|7:stereo[TOP_FRONT]; +[0:a]channelmap=8|9:stereo[TOP_BACK]; diff --git a/tests/filtergraphs/iamf_7_1_4 b/tests/filtergraphs/iamf_7_1_4 new file mode 100644 index 0000000000..4a2c5a834c --- /dev/null +++ b/tests/filtergraphs/iamf_7_1_4 @@ -0,0 +1,7 @@ +[0:a]channelmap=0|1:stereo[FRONT]; +[0:a]channelmap=4|5:stereo[BACK]; +[0:a]channelmap=2:mono[CENTER]; +[0:a]channelmap=3:mono[LFE]; +[0:a]channelmap=6|7:stereo[SIDE]; +[0:a]channelmap=8|9:stereo[TOP_FRONT]; +[0:a]channelmap=10|11:stereo[TOP_BACK]; diff --git a/tests/ref/fate/iamf-5_1_4 b/tests/ref/fate/iamf-5_1_4 new file mode 100644 index 0000000000..e6eb356ff0 --- /dev/null +++ b/tests/ref/fate/iamf-5_1_4 @@ -0,0 +1,98 @@ +c447cbbc8943cfb751fdf1145a094250 *tests/data/fate/iamf-5_1_4.iamf +85603 tests/data/fate/iamf-5_1_4.iamf +#extradata 0: 34, 0x40a802c6 +#extradata 1: 34, 0x40a802c6 +#extradata 2: 34, 0x407c02c4 +#extradata 3: 34, 0x407c02c4 +#extradata 4: 34, 0x40a802c6 +#extradata 5: 34, 0x40a802c6 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: flac +#sample_rate 0: 44100 +#channel_layout_name 0: stereo +#tb 1: 1/44100 +#media_type 1: audio +#codec_id 1: flac +#sample_rate 1: 44100 +#channel_layout_name 1: stereo +#tb 2: 1/44100 +#media_type 2: audio +#codec_id 2: flac +#sample_rate 2: 44100 +#channel_layout_name 2: mono +#tb 3: 1/44100 +#media_type 3: audio +#codec_id 3: flac +#sample_rate 3: 44100 +#channel_layout_name 3: mono +#tb 4: 1/44100 +#media_type 4: audio +#codec_id 4: flac +#sample_rate 4: 44100 +#channel_layout_name 4: stereo +#tb 5: 1/44100 +#media_type 5: audio +#codec_id 5: flac +#sample_rate 5: 44100 +#channel_layout_name 5: stereo +0, 0, 0, 4608, 1399, 0x6e89566e +1, 0, 0, 4608, 1399, 0x6e89566e +2, 0, 0, 4608, 1396, 0x0dcb5677 +3, 0, 0, 4608, 1396, 0x0dcb5677 +4, 0, 0, 4608, 1399, 0x6e89566e +5, 0, 0, 4608, 1399, 0x6e89566e +0, 4608, 4608, 4608, 1442, 0x6c3c5b13 +1, 4608, 4608, 4608, 1442, 0x6c3c5b13 +2, 4608, 4608, 4608, 1439, 0xc46b5ac5 +3, 4608, 4608, 4608, 1439, 0xc46b5ac5 +4, 4608, 4608, 4608, 1442, 0x6c3c5b13 +5, 4608, 4608, 4608, 1442, 0x6c3c5b13 +0, 9216, 9216, 4608, 1380, 0xc497571b +1, 9216, 9216, 4608, 1380, 0xc497571b +2, 9216, 9216, 4608, 1377, 0x5b2a55fe +3, 9216, 9216, 4608, 1377, 0x5b2a55fe +4, 9216, 9216, 4608, 1380, 0xc497571b +5, 9216, 9216, 4608, 1380, 0xc497571b +0, 13824, 13824, 4608, 1383, 0x48e9510f +1, 13824, 13824, 4608, 1383, 0x48e9510f +2, 13824, 13824, 4608, 1380, 0x045550d3 +3, 13824, 13824, 4608, 1380, 0x045550d3 +4, 13824, 13824, 4608, 1383, 0x48e9510f +5, 13824, 13824, 4608, 1383, 0x48e9510f +0, 18432, 18432, 4608, 1572, 0x9a514719 +1, 18432, 18432, 4608, 1572, 0x9a514719 +2, 18432, 18432, 4608, 1568, 0xa2bc45f4 +3, 18432, 18432, 4608, 1568, 0xa2bc45f4 +4, 18432, 18432, 4608, 1572, 0x9a514719 +5, 18432, 18432, 4608, 1572, 0x9a514719 +0, 23040, 23040, 4608, 1391, 0x74ac5014 +1, 23040, 23040, 4608, 1391, 0x74ac5014 +2, 23040, 23040, 4608, 1388, 0x96c85007 +3, 23040, 23040, 4608, 1388, 0x96c85007 +4, 23040, 23040, 4608, 1391, 0x74ac5014 +5, 23040, 23040, 4608, 1391, 0x74ac5014 +0, 27648, 27648, 4608, 1422, 0x2f9d47c5 +1, 27648, 27648, 4608, 1422, 0x2f9d47c5 +2, 27648, 27648, 4608, 1419, 0x4d4d466a +3, 27648, 27648, 4608, 1419, 0x4d4d466a +4, 27648, 27648, 4608, 1422, 0x2f9d47c5 +5, 27648, 27648, 4608, 1422, 0x2f9d47c5 +0, 32256, 32256, 4608, 1768, 0x2a044b99 +1, 32256, 32256, 4608, 1768, 0x2a044b99 +2, 32256, 32256, 4608, 1765, 0xacb84b24 +3, 32256, 32256, 4608, 1765, 0xacb84b24 +4, 32256, 32256, 4608, 1768, 0x2a044b99 +5, 32256, 32256, 4608, 1768, 0x2a044b99 +0, 36864, 36864, 4608, 1534, 0xb0b35a3f +1, 36864, 36864, 4608, 1534, 0xb0b35a3f +2, 36864, 36864, 4608, 1531, 0x996458aa +3, 36864, 36864, 4608, 1531, 0x996458aa +4, 36864, 36864, 4608, 1534, 0xb0b35a3f +5, 36864, 36864, 4608, 1534, 0xb0b35a3f +0, 41472, 41472, 4608, 926, 0xc26a5eae +1, 41472, 41472, 4608, 926, 0xc26a5eae +2, 41472, 41472, 4608, 923, 0xa7225edf +3, 41472, 41472, 4608, 923, 0xa7225edf +4, 41472, 41472, 4608, 926, 0xc26a5eae +5, 41472, 41472, 4608, 926, 0xc26a5eae diff --git a/tests/ref/fate/iamf-7_1_4 b/tests/ref/fate/iamf-7_1_4 new file mode 100644 index 0000000000..c176f4a1cd --- /dev/null +++ b/tests/ref/fate/iamf-7_1_4 @@ -0,0 +1,114 @@ +157c3185684e12cc8385ee7c3ef2fb4c *tests/data/fate/iamf-7_1_4.iamf +99851 tests/data/fate/iamf-7_1_4.iamf +#extradata 0: 34, 0x40a802c6 +#extradata 1: 34, 0x40a802c6 +#extradata 2: 34, 0x407c02c4 +#extradata 3: 34, 0x407c02c4 +#extradata 4: 34, 0x40a802c6 +#extradata 5: 34, 0x40a802c6 +#extradata 6: 34, 0x40a802c6 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: flac +#sample_rate 0: 44100 +#channel_layout_name 0: stereo +#tb 1: 1/44100 +#media_type 1: audio +#codec_id 1: flac +#sample_rate 1: 44100 +#channel_layout_name 1: stereo +#tb 2: 1/44100 +#media_type 2: audio +#codec_id 2: flac +#sample_rate 2: 44100 +#channel_layout_name 2: mono +#tb 3: 1/44100 +#media_type 3: audio +#codec_id 3: flac +#sample_rate 3: 44100 +#channel_layout_name 3: mono +#tb 4: 1/44100 +#media_type 4: audio +#codec_id 4: flac +#sample_rate 4: 44100 +#channel_layout_name 4: stereo +#tb 5: 1/44100 +#media_type 5: audio +#codec_id 5: flac +#sample_rate 5: 44100 +#channel_layout_name 5: stereo +#tb 6: 1/44100 +#media_type 6: audio +#codec_id 6: flac +#sample_rate 6: 44100 +#channel_layout_name 6: stereo +0, 0, 0, 4608, 1399, 0x6e89566e +1, 0, 0, 4608, 1399, 0x6e89566e +2, 0, 0, 4608, 1396, 0x0dcb5677 +3, 0, 0, 4608, 1396, 0x0dcb5677 +4, 0, 0, 4608, 1399, 0x6e89566e +5, 0, 0, 4608, 1399, 0x6e89566e +6, 0, 0, 4608, 1399, 0x6e89566e +0, 4608, 4608, 4608, 1442, 0x6c3c5b13 +1, 4608, 4608, 4608, 1442, 0x6c3c5b13 +2, 4608, 4608, 4608, 1439, 0xc46b5ac5 +3, 4608, 4608, 4608, 1439, 0xc46b5ac5 +4, 4608, 4608, 4608, 1442, 0x6c3c5b13 +5, 4608, 4608, 4608, 1442, 0x6c3c5b13 +6, 4608, 4608, 4608, 1442, 0x6c3c5b13 +0, 9216, 9216, 4608, 1380, 0xc497571b +1, 9216, 9216, 4608, 1380, 0xc497571b +2, 9216, 9216, 4608, 1377, 0x5b2a55fe +3, 9216, 9216, 4608, 1377, 0x5b2a55fe +4, 9216, 9216, 4608, 1380, 0xc497571b +5, 9216, 9216, 4608, 1380, 0xc497571b +6, 9216, 9216, 4608, 1380, 0xc497571b +0, 13824, 13824, 4608, 1383, 0x48e9510f +1, 13824, 13824, 4608, 1383, 0x48e9510f +2, 13824, 13824, 4608, 1380, 0x045550d3 +3, 13824, 13824, 4608, 1380, 0x045550d3 +4, 13824, 13824, 4608, 1383, 0x48e9510f +5, 13824, 13824, 4608, 1383, 0x48e9510f +6, 13824, 13824, 4608, 1383, 0x48e9510f +0, 18432, 18432, 4608, 1572, 0x9a514719 +1, 18432, 18432, 4608, 1572, 0x9a514719 +2, 18432, 18432, 4608, 1568, 0xa2bc45f4 +3, 18432, 18432, 4608, 1568, 0xa2bc45f4 +4, 18432, 18432, 4608, 1572, 0x9a514719 +5, 18432, 18432, 4608, 1572, 0x9a514719 +6, 18432, 18432, 4608, 1572, 0x9a514719 +0, 23040, 23040, 4608, 1391, 0x74ac5014 +1, 23040, 23040, 4608, 1391, 0x74ac5014 +2, 23040, 23040, 4608, 1388, 0x96c85007 +3, 23040, 23040, 4608, 1388, 0x96c85007 +4, 23040, 23040, 4608, 1391, 0x74ac5014 +5, 23040, 23040, 4608, 1391, 0x74ac5014 +6, 23040, 23040, 4608, 1391, 0x74ac5014 +0, 27648, 27648, 4608, 1422, 0x2f9d47c5 +1, 27648, 27648, 4608, 1422, 0x2f9d47c5 +2, 27648, 27648, 4608, 1419, 0x4d4d466a +3, 27648, 27648, 4608, 1419, 0x4d4d466a +4, 27648, 27648, 4608, 1422, 0x2f9d47c5 +5, 27648, 27648, 4608, 1422, 0x2f9d47c5 +6, 27648, 27648, 4608, 1422, 0x2f9d47c5 +0, 32256, 32256, 4608, 1768, 0x2a044b99 +1, 32256, 32256, 4608, 1768, 0x2a044b99 +2, 32256, 32256, 4608, 1765, 0xacb84b24 +3, 32256, 32256, 4608, 1765, 0xacb84b24 +4, 32256, 32256, 4608, 1768, 0x2a044b99 +5, 32256, 32256, 4608, 1768, 0x2a044b99 +6, 32256, 32256, 4608, 1768, 0x2a044b99 +0, 36864, 36864, 4608, 1534, 0xb0b35a3f +1, 36864, 36864, 4608, 1534, 0xb0b35a3f +2, 36864, 36864, 4608, 1531, 0x996458aa +3, 36864, 36864, 4608, 1531, 0x996458aa +4, 36864, 36864, 4608, 1534, 0xb0b35a3f +5, 36864, 36864, 4608, 1534, 0xb0b35a3f +6, 36864, 36864, 4608, 1534, 0xb0b35a3f +0, 41472, 41472, 4608, 926, 0xc26a5eae +1, 41472, 41472, 4608, 926, 0xc26a5eae +2, 41472, 41472, 4608, 923, 0xa7225edf +3, 41472, 41472, 4608, 923, 0xa7225edf +4, 41472, 41472, 4608, 926, 0xc26a5eae +5, 41472, 41472, 4608, 926, 0xc26a5eae +6, 41472, 41472, 4608, 926, 0xc26a5eae diff --git a/tests/ref/fate/iamf-stereo b/tests/ref/fate/iamf-stereo new file mode 100644 index 0000000000..65d6b506d4 --- /dev/null +++ b/tests/ref/fate/iamf-stereo @@ -0,0 +1,18 @@ +ace731a4fbc302e24498d6b64daa16e7 *tests/data/fate/iamf-stereo.iamf +14426 tests/data/fate/iamf-stereo.iamf +#extradata 0: 34, 0x40a802c6 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: flac +#sample_rate 0: 44100 +#channel_layout_name 0: stereo +0, 0, 0, 4608, 1399, 0x6e89566e +0, 4608, 4608, 4608, 1442, 0x6c3c5b13 +0, 9216, 9216, 4608, 1380, 0xc497571b +0, 13824, 13824, 4608, 1383, 0x48e9510f +0, 18432, 18432, 4608, 1572, 0x9a514719 +0, 23040, 23040, 4608, 1391, 0x74ac5014 +0, 27648, 27648, 4608, 1422, 0x2f9d47c5 +0, 32256, 32256, 4608, 1768, 0x2a044b99 +0, 36864, 36864, 4608, 1534, 0xb0b35a3f +0, 41472, 41472, 4608, 926, 0xc26a5eae diff --git a/tests/streamgroups/audio_element-5_1_4 b/tests/streamgroups/audio_element-5_1_4 new file mode 100644 index 0000000000..f537d1dc5d --- /dev/null +++ b/tests/streamgroups/audio_element-5_1_4 @@ -0,0 +1,7 @@ +type=iamf_audio_element:id=1:st=0:st=1:st=2:st=3:st=4:st=5:default_w=10, +demixing=dmixp_mode=1:parameter_id=998, +recon_gain=parameter_id=101, +layer=ch_layout=stereo, +layer=ch_layout=5.1, +layer=ch_layout=5.1.2, +layer=ch_layout=5.1.4, diff --git a/tests/streamgroups/audio_element-7_1_4 b/tests/streamgroups/audio_element-7_1_4 new file mode 100644 index 0000000000..67acd1ebfc --- /dev/null +++ b/tests/streamgroups/audio_element-7_1_4 @@ -0,0 +1,6 @@ +type=iamf_audio_element:id=1:st=0:st=1:st=2:st=3:st=4:st=5:st=6:default_w=10, +demixing=dmixp_mode=1:parameter_id=998,recon_gain=parameter_id=101, +layer=ch_layout=stereo, +layer=ch_layout=3.1.2, +layer=ch_layout=7.1.2, +layer=ch_layout=7.1.4, diff --git a/tests/streamgroups/audio_element-stereo b/tests/streamgroups/audio_element-stereo new file mode 100644 index 0000000000..b10d73adc5 --- /dev/null +++ b/tests/streamgroups/audio_element-stereo @@ -0,0 +1,3 @@ +type=iamf_audio_element:id=1:st=0:default_w=10,demixing=dmixp_mode=1:parameter_id=998, +recon_gain=parameter_id=101, +layer=ch_layout=stereo, diff --git a/tests/streamgroups/mix_presentation-5_1_4 b/tests/streamgroups/mix_presentation-5_1_4 new file mode 100644 index 0000000000..36fcd20124 --- /dev/null +++ b/tests/streamgroups/mix_presentation-5_1_4 @@ -0,0 +1,2 @@ +type=iamf_mix_presentation:id=2:stg=0:annotations=en-us=Mix_Presentation, +submix=parameter_id=100:parameter_rate=48000:default_mix_gain=1.0|element=stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix|layout=sound_system=stereo:integrated_loudness=1.0|layout=sound_system=5.1|layout=sound_system=5.1.2|layout=sound_system=5.1.4, diff --git a/tests/streamgroups/mix_presentation-7_1_4 b/tests/streamgroups/mix_presentation-7_1_4 new file mode 100644 index 0000000000..eee67b28e8 --- /dev/null +++ b/tests/streamgroups/mix_presentation-7_1_4 @@ -0,0 +1,2 @@ +type=iamf_mix_presentation:id=2:stg=0:annotations=en-us=Mix_Presentation, +submix=parameter_id=100:parameter_rate=48000:default_mix_gain=1.0|element=stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix|layout=sound_system=stereo:integrated_loudness=1.0|layout=sound_system=3.1.2|layout=sound_system=7.1.2|layout=sound_system=7.1.4, diff --git a/tests/streamgroups/mix_presentation-stereo b/tests/streamgroups/mix_presentation-stereo new file mode 100644 index 0000000000..0ade6352ff --- /dev/null +++ b/tests/streamgroups/mix_presentation-stereo @@ -0,0 +1,3 @@ +type=iamf_mix_presentation:id=2:stg=0:annotations=en-us=Mix_Presentation, +submix=parameter_id=100:parameter_rate=48000:default_mix_gain=1.0|element=stg=0:parameter_id=100:headphones_rendering_mode=stereo:annotations=en-us=Scalable_Submix|layout=sound_system=stereo:integrated_loudness=1.0, +submix=parameter_id=100|element=stg=0:parameter_id=100:headphones_rendering_mode=binaural:default_mix_gain=1.0:annotations=en-us=Binaural_submix|layout=layout_type=binaural,