From patchwork Sat Jan 20 12:22:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 45672 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a402:b0:199:de12:6fa6 with SMTP id z2csp414813pzk; Sat, 20 Jan 2024 04:22:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqfUg5F0fGimNcIKjXAynkIEqXuBfH0iE+acDNC5BmtzzVRqsY3pFg/pF3nfRnirGrfJXZ X-Received: by 2002:a05:600c:3b12:b0:40e:88ac:9edf with SMTP id m18-20020a05600c3b1200b0040e88ac9edfmr1921619wms.1.1705753378979; Sat, 20 Jan 2024 04:22:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705753378; cv=none; d=google.com; s=arc-20160816; b=FqZCVzr1kXRqMx51l0kfaX5M4Dce708HDlXflWSZHbPtAqKAS86cEhxnrWJTqlwfWm gW0uatqgPyfyGhu4wuBzHQw07BM/QghZRY3jpVG1GCgZOgRwTGqftLxq3F5hzXCLkq5S 2BdYK7UvgVPewR7PSJ5BrX19vwQge9CeSmmB7zy13y1uhLHiJNvefis7J9XhvleMOyHd 0benrnVZDT97qEM44r7cqpYMMmvqbQkf/DJxn+e48+K473JttejFpZmNkbh1uq1TL0oS slUKJfShNPVgqPpzl4Er4H7liCF87JxB+uY6Kf48U21V2oTNBZzJomBNTnm4FuwRoz9B +ZRg== 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=v9/c84ZGudcG/mNVHyN59IAD8FQZuX9dVVSDvkY+qL0=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=fqQRFNILNenqsli6Y8XUJqcjgSBcU7j/AMD506CroM9GZV//DGiRHUpovZZHIZmq5k ytfcDg0ERfulLgRx3ejPwiFfzByRbKxjKjNDcpLYeJWq/e//2jUGJlZITiFfK2x2ZTfE UB6s/YBtOjQiVeswv7aObwJTxrj8XdASoz09CRY18nE9fIFdX+e7UGRA7zt7wYQQpNI4 1aFbahrb52C/bExs4i3hfN94QVUQA4Q+md3ZLmj7vSFMDYF1XOUt7tsO6IqNWUQAFTKn 9FwPD7cxuwjOOHpD/D24ZwNJUnbo/QJN43/RpW2KelsAGu+8/Fjq8QVeIZguolLaCsyc uCnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=Q0jkcXRC; 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 j13-20020aa7c34d000000b00559b955c9besi4455543edr.520.2024.01.20.04.22.58; Sat, 20 Jan 2024 04:22:58 -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=Q0jkcXRC; 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 EE17968CC16; Sat, 20 Jan 2024 14:22:54 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D237068022B for ; Sat, 20 Jan 2024 14:22:47 +0200 (EET) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d70b0e521eso12540515ad.1 for ; Sat, 20 Jan 2024 04:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705753365; x=1706358165; 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=wjXHYFl18fm0nN9x4SF1ymY/3d88z44Oce9f7MC1qD0=; b=Q0jkcXRCRaHhxrWhUGHm6+rU7fVH69auYT3CPu2Zn4GunCsvLnxEUsML3tYeKAUpfR 4f8tEKMM8pwWDYA02eicCO3cTfbaacs5/9B34obXBxR/qjiTRVxwmTT54r/ITxc4RGHZ 16W4E+DYNn2Pk90ofZnFPYiPRLdeaOhL9WDySCHhCQ+RgQYLTmvi7DZ1ZfEeG0+YAsP3 ehgRSrLBo7DhX/+89LIAK15GEpP67do2BpoyjXLH8X4X//sAaQepk8qShunL+UEJvkaz G0emZusHuaCkaUnmpJ5WQTpmVU1QRBvnZ+Wk+KtqIxeh+abpD+j1UIVbvd/xKfIzjmP2 F1Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705753365; x=1706358165; 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=wjXHYFl18fm0nN9x4SF1ymY/3d88z44Oce9f7MC1qD0=; b=dTGHFaITdubOiGDsmG7hIOGQx00+TprJPyCer0tOlxkBYij28UX4kpL3CbV0ukpwfn WltrkRN2+lQOC7Hp3ptuTeggSHs1PCrs8RbXVV8FZm2KYv6WtvBw7Xj+cS0bcjfpkh0K U828NBBtBZg/bw0svnP2eIMKf3gFgnBO2yUC3MINBZ9owNJSnFPBiK/7w16Jrm52t/mn CLKIxUjA2n8vCNv8lcZJRbjoxZZLs1Md9hEwo0plNqaOLMVwIWOZRaUMJJK6x/LuBSmP 5ES7QVRPiAW0lm6lnkEw8C+jj4c/A5eUwhDrcy+yL7EGQa5dV+/FM+6b7zv7uPUveP7F WHLg== X-Gm-Message-State: AOJu0Yx8nZGZx8eCmuGo1WnJ+oeqLzREWacGzqh4qKXU4WK1lvcNdw/d 9q4uMsMrS2rdxB8WZihvSxuRPqrSDd3eZOmyxGHAnPTAnLe8U7QRYIXnmKw2 X-Received: by 2002:a17:902:b697:b0:1d7:2536:639a with SMTP id c23-20020a170902b69700b001d72536639amr1458367pls.134.1705753365080; Sat, 20 Jan 2024 04:22:45 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id kl5-20020a170903074500b001d72d445778sm1129365plb.204.2024.01.20.04.22.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 04:22:44 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 20 Jan 2024 09:22:26 -0300 Message-ID: <20240120122227.2382-1-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg_mux_init: remove whitespaces from input arguments when parsing stream groups 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: sz6dvJ8smTVp If the arguments are read from a file, things like line breaks could be present Signed-off-by: James Almer --- fftools/ffmpeg_mux_init.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index b527e1f118..15200c5a7d 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -2025,6 +2025,8 @@ static int of_parse_iamf_audio_element_layers(Muxer *mux, AVStreamGroup *stg, ch int demixing = 0, recon_gain = 0; int layer = 0; + if (ptr) + ptr += strspn(ptr, " \n\t\r"); if (av_strstart(token, "layer=", &token)) layer = 1; else if (av_strstart(token, "demixing=", &token)) @@ -2092,6 +2094,8 @@ static int of_parse_iamf_submixes(Muxer *mux, AVStreamGroup *stg, char *ptr) const char *subtoken; char *subptr = NULL; + if (ptr) + ptr += strspn(ptr, " \n\t\r"); if (!av_strstart(token, "submix=", &token)) { av_log(mux, AV_LOG_ERROR, "No submix in mix presentation specification \"%s\"\n", token); goto fail; @@ -2120,6 +2124,8 @@ static int of_parse_iamf_submixes(Muxer *mux, AVStreamGroup *stg, char *ptr) const AVDictionaryEntry *e; int element = 0, layout = 0; + if (subptr) + subptr += strspn(subptr, " \n\t\r"); if (av_strstart(subtoken, "element=", &subtoken)) element = 1; else if (av_strstart(subtoken, "layout=", &subtoken)) @@ -2331,8 +2337,11 @@ static int of_add_groups(Muxer *mux, const OptionsContext *o) return ret; token = av_strtok(str, ",", &ptr); - if (token) + if (token) { + if (ptr) + ptr += strspn(ptr, " \n\t\r"); ret = of_parse_group_token(mux, token, ptr); + } av_free(str); if (ret < 0) From patchwork Sat Jan 20 12:22:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 45673 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a402:b0:199:de12:6fa6 with SMTP id z2csp414875pzk; Sat, 20 Jan 2024 04:23:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbWc/9J4cSDxNxkxQsa4R2ubIj303cjaOurY3xeuxb7XFtR6dKFVDj5mQctTipHSpVxghU X-Received: by 2002:a17:906:53c5:b0:a2e:52ff:bc90 with SMTP id p5-20020a17090653c500b00a2e52ffbc90mr738055ejo.152.1705753387450; Sat, 20 Jan 2024 04:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705753387; cv=none; d=google.com; s=arc-20160816; b=tKDgSJ37/KWT7PTxx01SQY8Uiqoro9SciqvfrXqNi6W4aZBnzhyJTdo9qZq3y2ppM4 Cb20hiXLWw2amPRy+OW6GjDhjv9ZP4GmLx8QuAjIPgtv8zzJ6bsdjuJFRkSX9vLhpsus EDPPqT8AJv3R0HnFUp+nArBJAFmFHjuhHPZ5IJaVkWFiS/iS/0biERm1eedhJCFzQ8aO VoxQWUht119ux2u1kHQtkWVKOYdHeWXlOn4/NAXaAdxzFiTUJNOSKgsjvEWZV2xVxdSN BWmKGCex0b2wsCXUjXG+QE1q4IJHn05WGtv9KwvdLJkKI3Yc51MqMTSctLn8rRph5jjB t6BA== 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=ROa86pdt6qHjLDMUZT1DljR7rXDDTspdiBWQolbXoCU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=yZ8gWnXKUcZjM7Cle82wgswwtrEwB6ga/jy1zNgstEY5PxueHZIWzEe2PRUOcDcM0R T1ZI+zi294fChoRrN9MPOrYZlJ0JtfgW9hBpHaJCxehR6hoMtjAJmIfnulpQwsHodYoX PWAEJP8JP6NiSYv97dRWYUAmNZSYPfrZ3kPXTErxhDeqDfITQJmU5Vf9g3aIOAsWH9OI D7gM0PrHwkQbL3Im1Dw4g9pTMKvTS5SmqNndKQ05FNDMtUqG+x2SZ3TaE0p4tzYw0kH9 fj5T7jytlqn+7hGMKEvLAQysyzT1gkW14kLLGyLwF8G3+ib0oOpeyzm3l5QQlcGWRS0F 6FfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=lTrm6I15; 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 pv21-20020a170907209500b00a26db3465fasi8477174ejb.1028.2024.01.20.04.23.07; Sat, 20 Jan 2024 04:23:07 -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=lTrm6I15; 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 E030268D09A; Sat, 20 Jan 2024 14:22:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 850C068C832 for ; Sat, 20 Jan 2024 14:22:49 +0200 (EET) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6dbcc7647c9so346736b3a.0 for ; Sat, 20 Jan 2024 04:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705753367; x=1706358167; 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=VHjuAYXYan66+1f93c4DKM8oQguoREQQsmhmzZVkyNU=; b=lTrm6I15vUih6dPdcHWcRSiMztILOGmT1IPgPWwyQci0bVM5clR1/XOJk2yRkYEGzS LWoex2HptKxh4DvgqrPDc7VDAEG7+hsURX8R+UcY5RgU62+eBOcMlZkeaROgkmaYBYSZ Ss9EqVJDT43A5nlsgTwD8iOCGbBxXjiUqHhRivtp5x7b8p24N6sEfFg2cdE9Sm+xu+Z/ ro8N8ckPPQSmos2S1aE1MCTFMauHhDgcAYKCncIezVohAbWIMsKelNXipZFJ8gy1xKXv VCL1/9IE33cljGlVyA89QSy7nnX4cNoYFUUXWuzKjcAPLkUm1H+EB1nnvsWlH+hV/g6d amYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705753367; x=1706358167; 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=VHjuAYXYan66+1f93c4DKM8oQguoREQQsmhmzZVkyNU=; b=dJz7lk7+OhS6qEKPprdkE+P/1nQa0kMOdI0FvWjWdYO2RxyJu8TMs9XImPwNbleRgV eIeRt1NRrbMaw8FhwnThT7y18f7mJLzn3zjk6cftaSFzoOq+1cooBl+//6ShKVgVGKg6 I/eNhTbW62iA+APvVSafGHs5VDvT0RwFbVaTe8kdFkPyfiS59kbfPmnij8wzB6X9R6/b dQ2Mr1C9OXXx2SlTn/fKY527BkoloyghvPPj8RZLlmbIf+tFc7NLX4OVF32SHz794JMA ridzh79P+yjk1lIi03ZZFAtIU1qB6PW0NfiOxYdV9oUgJ70sNKmMq7GoYVvSlop5YILF jkMQ== X-Gm-Message-State: AOJu0Yx79BXMv+6EIHnq1/orjKFYPhCrU83xLWAbX9n2ST9gdFM15CE3 g73X3AlFMcGC8Mlq2feOCAyUYpQTYyUw3BUJyHJeaeGXFgnumYPfLL/6se5L X-Received: by 2002:a17:902:a616:b0:1d5:e8ef:bc63 with SMTP id u22-20020a170902a61600b001d5e8efbc63mr597531plq.115.1705753366551; Sat, 20 Jan 2024 04:22:46 -0800 (PST) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id kl5-20020a170903074500b001d72d445778sm1129365plb.204.2024.01.20.04.22.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 04:22:46 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 20 Jan 2024 09:22:27 -0300 Message-ID: <20240120122227.2382-2-jamrial@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240120122227.2382-1-jamrial@gmail.com> References: <20240120122227.2382-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] 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: sf7LDR3sx+vI 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..dabe3859c4 --- /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 $(TARGET_PATH)/tests/data/streamgroups/audio_element-stereo \ + -/stream_group $(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 $(TARGET_PATH)/tests/data/filtergraphs/iamf_5_1_4 \ + -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-5_1_4 \ + -/stream_group $(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 $(TARGET_PATH)/tests/data/filtergraphs/iamf_7_1_4 \ + -/stream_group $(TARGET_PATH)/tests/data/streamgroups/audio_element-7_1_4 \ + -/stream_group $(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,