From patchwork Sun Aug 29 21:17:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29853 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3397153iov; Sun, 29 Aug 2021 14:17:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwRqbDzssd+uWPzFoO1e+S7abN1Q4d9Fw89UxStBawFqmgHfd9DdUBfw4Uk5n/FvXCwY0l X-Received: by 2002:a17:906:f15:: with SMTP id z21mr21896871eji.177.1630271858796; Sun, 29 Aug 2021 14:17:38 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t21si12720391ejy.151.2021.08.29.14.17.37; Sun, 29 Aug 2021 14:17:38 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=eMDFZwXw; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 397EF68A1C3; Mon, 30 Aug 2021 00:17:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (unknown [40.92.71.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 05D34687F13 for ; Mon, 30 Aug 2021 00:17:27 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hu/v6ThKZitIdA1VO8k3gZ2FyqZ/W0nmgsOt7FXtSCA5txmaYVt/X/9hVVuwStA7+BKNoXViMDbW58FHueah7KF23LF82SZcabhGJO2mgbMYXrrxLfLHlx4D6rcBsyG/FTmfPHAwOT4YCmw0Ugs8v8RvWZJjp7b9dqMXYgb7HW9X3h9HQ5JoESszZgQWBhXH6D1TDK7i1WJRvoXvQeoVpPa7u6VtXoKjbSS9CVICkPNvkGX1V7OvabqZ+HP2yHqO2/bfxa75/2d+8dS1Hi9//dyTa6OuLiNjz8gq90t26Qx0sBb9/3tWCGpi9jnYDtqft1ciEK+FT/etYUyvPY0N2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fX0ibPM2kTdmmEWOltUTdrCX+ehNbTbV+aR1sd5WsFg=; b=jEPNaRe9ndIBcDw6GHLvoz87jO0eRQxatuxGY9Ba3Rz7ap85qWXoccWrXPhYcda8tjS/3ZbR7pVfqKyYYSEDr3tkqZDEAYA+x8mZmd7EvazekCOwcvEAUmQcDO+EOTcPtOiWvkKm0XnryFrb41dE/gTb2ZgLmJHoL7nXZ004hMTtLA5BB8Gm9VlS/czHRX7w9Fh7osa61GtQxG38RCs8+uO7rsby/APh4CGE0YbaxRfYYVVNdAEqFc20vir+e/48fHhiqvMXetZTpGm+OtgA8N2D43Sdv4KJMXwmZkcU+EQzDt4aLqn8JM2FdlK/8KvQHphxM+4PIBjNUuK0BqWjhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fX0ibPM2kTdmmEWOltUTdrCX+ehNbTbV+aR1sd5WsFg=; b=eMDFZwXwzx1QQw7JcS0LbaicG6Fv2LN7ddt3mta3pmSrSyRIg4+f141QRCsZchrzfCTzW3q3Q71n0UyAGwO+6Y/N/u/6mwhf2nkT3P8pcbIh9fV+6PU+teLg3ajmY1OCSNsjvd2AKzI1pUwbXfdSGBDr+LmeXjPpYjSfEMG2OZUYYDUc14kw1MYXo1eO9rmGBiMbGDKcYJjP/zsUvB4o7zC7sfK04HL7EjQNi6mQCIKat1kd9YH5SvCTuU8EWaS2lbVMrWPSaj+5eeeLpGCtvrAt8eRXf1ab6wUqNkzrdXidG+KB+kccFM72LwfUExWEOlDh3Z5ePO0HIVriibADxQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB6007.eurprd03.prod.outlook.com (2603:10a6:20b:e8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.24; Sun, 29 Aug 2021 21:17:26 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:17:26 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:17:07 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [yYuo0D1/Ts593zTDBKv4R8vmsmtTQd6I] X-ClientProxiedBy: AM4PR0101CA0055.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::23) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829211718.1505608-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0101CA0055.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.18 via Frontend Transport; Sun, 29 Aug 2021 21:17:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 01a7e122-1f27-457c-46e8-08d96b326657 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UJFV0D8eNjjrGtWNbxKTG+hBYxY3S7dUvkYooJ5uXBgc2fvs4pRHKdxLi0+8O2Os0ss/iFmfbbsLrfoz9anhNC1aavBY7BAzf+EdbxuA0jDCfnc+4pHuXsp6pML4AJF3rMeuzkPG/1TLRC9kC+yDH3oIt12kAWahWxBMf/11IVgkyqTlvBBFRzMklCUf2MGVvEssIo+mzUJjf/2RrhnhmdB76AUoV8AveQuAmV5PyMZz9vO9zY1BCojuZbqjvRTAhOM8ahSu/4+jwW3rePYwQc05fZmq+hP7mKdYHKOXw/pPsDY0/BVhvyiq0k7NU4ltBxDzipmvj9ONFwPkhXNk7U/m5GB7KJTwrkG2wdB8F17ytfKLcC3mae7vgWYd3xGv+hte1lbuEevj+yB91K/xPzsDvJtY3/ydbrljTFOB1zpaYAEUdm2lkF/dlGbTdzlVbBNo6+yKGJer+t5I3IyI7aoyorLD5Fvq4wLN1Yb8v+h5TQT8gTQrZNWL99qKg4qRf9MJ9rkxVxTyDins5kHBP5vo6VRbtVgrFNZyLRmC/7YgGEGE/ddNhmUnq/ZDz3k02Qv0zFZXVs2nucliCLOB7JENKiFGWXkiknkG8t0H8glalba/GUmkiwc9nnLumAS+9BvaaHCTTVuX97Qg8rhPVEemWAgMWQnZFDBJqPrHpVun1PmSNmmomuXqINE+Aa3V0G6cYql9if18A== X-MS-TrafficTypeDiagnostic: AM6PR03MB6007: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iXheMpPWQZPLrDnQBZezUHLzJZUfwFnxhkoX14giweIHW03bC1F5DDr2RMXTCS2NOSjWrsUe7Qcsszg4hNCauCbPaGbS5LqTjebthjyaQ7jmKopj++OYWrob9o2H0ccz3ix0hjLWvt37KoAhQ6EFU+Ya8KhVODRvFiPi2wWZY0DY05Bs33zQ0UYWAC5EWVtprr6pyHX90XwMr6sBva6ynwLLMUqIwuyLo3ibpmfAg3lGjHd/YwDCl3P8Fh5ditae1JZYBB8IDElYnixb838U0xZgQFL493D76PJOdIIGmrpmVKQ8yc0zVGceuVcMa3yFMdlFx5wedyVTvf7omz8dMK3oMMHPnvyz9g27GvaibgukOAdIdevXKaFdEZe/BIqurvDRKmN1zUeZmavMyj47GI7eFD1UCScLRpUHj3H9AwDpWaEtGG0tzqJdiROG3od6 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jBkgq/pZ9WHv0Cds20cp9yc2CRB3Z8/yWsqrAIl4V60f2hxVZEznJgXdU/gC0aAA0AbbAKhB1xNFxnXsT/j2YibEKxyzkMd9wQ9xXYoWwXM+3utoDuppvesO3v6ykbPKHjpsyNGdhMNxvGAxa6svjA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01a7e122-1f27-457c-46e8-08d96b326657 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:17:26.1747 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB6007 Subject: [FFmpeg-devel] [PATCH 01/11] tests/fate-run: Allow multiple inputs for transcode() 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Rv2T9bXrN3Cv This allows nicer tests by having a greater range of inputs available (without requiring adding further samples to the fate-suite). Signed-off-by: Andreas Rheinhardt --- tests/fate-run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index bc1efa22d7..4b21bab591 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -232,12 +232,13 @@ transcode(){ enc_opt=$4 final_decode=$5 ffprobe_opts=$7 + additional_inputs=$8 encfile="${outdir}/${test}.${enc_fmt}" test "$6" = -keep || cleanfiles="$cleanfiles $encfile" tsrcfile=$(target_path $srcfile) tencfile=$(target_path $encfile) - ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \ - -f $enc_fmt -y $tencfile || return + ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $additional_inputs \ + $ENC_OPTS $enc_opt $FLAGS -f $enc_fmt -y $tencfile || return do_md5sum $encfile echo $(wc -c $encfile) ffmpeg $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \ From patchwork Sun Aug 29 21:23:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29858 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3400372iov; Sun, 29 Aug 2021 14:24:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVo4vQkWC/vGw+eibO3MoLGNejFFDYF+BaLGM+4U2LuEIEDCW9eIjJqexDdIxEau6Mofkx X-Received: by 2002:a17:906:6009:: with SMTP id o9mr21758394ejj.266.1630272244280; Sun, 29 Aug 2021 14:24:04 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bv8si13126084ejb.87.2021.08.29.14.24.03; Sun, 29 Aug 2021 14:24:04 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=g9Fbn6R8; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C101A68A1EF; Mon, 30 Aug 2021 00:24:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (unknown [40.92.75.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 67BA268980E for ; Mon, 30 Aug 2021 00:23:54 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FfvFD758b3p9h33PXdw12EFnSaEDCXc5QA1DsFlislJQsIvODFqQLsKAB8/dZsLoNTvrWOJsBNird8lbzLrLRluL/FDtiJgmCl9TG6z65wVnkI+AhTQtxl48NyyZmLEJNqq28M+zCXaSrd4pdPl0qsMt9p6iUQyMm4cpI8oGJOtG7FI0TrNZPtDO6QWc+ZZEoIW1Y/xlHkgSLIKIvYCAXgiD2d+1yEXWP9t5p5VX+HBbwojqwcr0Nh2etiEfwRQI4pa+dY9W9Zs1xYWDUwC1MMmSGH7NcTsPfuLdNCslaUetNDi/V3SOXQ8vaTukr/fUjPyDFBnI01wMXidhSa08uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C0eH3u7O0SHxHsXGeUDge76ABSXuWBV+r89cxTsOvnc=; b=Uyw+j8PFOO8qTFzAk2nprzj8kpIreqtsESiJ/0MMquIt+xr9Q555b6rA9IJBmvfBoMRkfFAex6fzk+GaKYct5aXrRjnI8Re/6g7WLdRQfFrx1TMOyeTA1Ld0GyMRVC9EyNDZ8epK9LvnoUrQoEos/Ub/9LKY0JhiCo5s9i+flrRW/KiyTzUpgeweyJ58E/n0k/zX7MLpWWxCTVPEHX2TD8Z9AVYhGbpmApKzo76iRBDi5Y7S1i3U3l7u8zMafxMaD+26xDajkR5jtnfZnz4VZ4bgxiyVR/2yVX6ugeZ0PB/EoyebVeehVXzDRX36Wcxs/kAJTJBcKVYH1ePp7XjRbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C0eH3u7O0SHxHsXGeUDge76ABSXuWBV+r89cxTsOvnc=; b=g9Fbn6R8wrZE4Zhc/DkLc/tStv5PfYyjQwjU1NPYJht+wMpXVlyyXmhxukIGTYv3mukpe/r+MZMBjsiZ/6KAHF8PhH9uxtjxC3BKN+8CN0rQOsnX8gunhUQqnat9DX+U+EK6XEkisKxszGKhnoeHZzD8h4Ltg3MQWp5ILZO6JeDTfTCxK7H/NyA3VLnoPn9Llh0gSWaUuKROfMA9DHNigxORSYnSKlH0itsMPY3kEBS0+7Ox4+XMu41bxbBjfSeGLaWpwRKV59ON/KxLVWn8G4zsF4eQ5/hqcKuFUOGkWRQP3Uc6GOCXan3HpIKBzIS0Ds9C2uTsJvEqbV/h7Uz0Eg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:23:53 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:23:53 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:23:23 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [Ars6g4V7bYQy6iLKsjCudQng+HOAwTVH] X-ClientProxiedBy: FR3P281CA0042.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4a::13) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212332.1505676-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by FR3P281CA0042.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.6 via Frontend Transport; Sun, 29 Aug 2021 21:23:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 775066c9-7b31-475a-eb65-08d96b334cf9 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiQnUOrjuXD0ZUxXZpiaS0/7h4qpQ6owituG0lcXzi5lqrP2XPutbKkLpJpWEAKHfQKu9qFi5qj3JS2oWo6xcsIVWUckQdwO2It56PvcjiJ8tagBcCl4NNnVbu0XufT3hQHAxXzc+P9N1da47GFpqDbFwzjWaDQ4BV9f93cmk4B6q7VaI3dEHZEy5wIvIR1hMuWBFBXNFLYIYDJs00VHU0Hby2g1Mg+Y7ysPbtxmzYi+F289diZvD86lhCcP1IJyyyrSgB0yMcEgR775Yha7+8jbGuB6lst2wtLCktvJ9QOhboraYBUuBs/GOoJMYLgifrlzt5azk5Phep/zoPqNZ+MiwxmryqDvrR0Mm7ehPAl1Iw42j2FkwkAQR+g5y7mSr9vAbMcUSmBA+9sfGZxHtF1hDOOAQ7+AswybjCX2h8/yi0oC4cy6FM6snsN0mDpb3/WrPkDECSdfVNW8kWGOQInZvizVC+1SCLkgyOBtpXHuFGvcQwWetpAr0/u82Sp+8mOFjrUluzMqrSv9UBfQpcJJxektcem8bNPuoK7ApYddMBjQorWaOr8U+BqNiV+R5lPofuDbi2LWTiIrC5Z6p1+jzFLdJOPDi0ZnSiky2gKgnORkFE4RoqF5Zg9tOLtp8C3Yi7jW9olu/WkD29RQWjje3FpWGp65vzoOUTIFXwjD7QZYJJP74au9kQhfVvZk8fn96ryHDADSsDl85wxRd35uDPopM4OowQ04Y0+W78WfpNsKajqEdSExWYpXaRA9Dqk= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wN32jb2I2Uum3rYZOYvYS5CY8eFKZKXuc9N6NSzZA3s8iOresf7UdllkAQkmOIa5IvrBYgL+Zuu6HTxeT0Fub843FBSpzM4cdZ5u5Be/TKhAP9ABHFTrZlRsOGKg194qv8FgsGN+x39mLM1kD9MaGZ8BgXkr98gxNjGr4gj/TjsmYiDm+83YUnUDY6qBRO0mmXDa2DUu31qAM8op7mepfT1H30DuuJclb9T6L+9OC1fDk4wPWkgU3Nb3DwW+ON9KsMExHzWPRrafD7uStcenBKnU5Id3yGdrJs9oVaqk+ycJILXoCcOlhoGGaKitx4WcHSBaiEg3w4OcDJbWRl+yv9jXJ70MCZFpsP3F4imryxV9E2VH2fnkw6j0eXzMqjlvIEZmV9HPtRxB9y8WlB8s6H/tgmqu9PAuigfH43diGnS33FqWX73/Fj2ge7QFprn5 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rhXOEOVG7k+X5Ky5VKHBclBXmKkKmSaeWaceyZRhNlVNauEffNzEG4PNEBnhg70HfOe9KARZruDStxzX7VfaO+NmBCDC+LTx0rqe/vUn6k7GxqaLdIfISf66QlZ3n+7un9qCjfaPGcUSpNsK+OjQSQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 775066c9-7b31-475a-eb65-08d96b334cf9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:23:53.0916 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 02/11] avformat/flacdec: Also set channels when setting channel_layout 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: pd2CNc+yTaOP This brings the FLAC demuxer in line with all the other demuxers. Furthermore, if it is not done and the FLAC decoder is disabled, the FLAC parser will overwrite the channel layout with the standard channel layout for that number of channels. Signed-off-by: Andreas Rheinhardt --- One could actually set channels generically from channel_layout for all demuxers. libavformat/flacdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c index 2060b48c69..d52434d2f9 100644 --- a/libavformat/flacdec.c +++ b/libavformat/flacdec.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/channel_layout.h" #include "libavcodec/flac.h" #include "avformat.h" #include "flac_picture.h" @@ -192,6 +193,7 @@ static int flac_read_header(AVFormatContext *s) "Invalid value of WAVEFORMATEXTENSIBLE_CHANNEL_MASK\n"); } else { st->codecpar->channel_layout = mask; + st->codecpar->channels = av_get_channel_layout_nb_channels(mask); av_dict_set(&s->metadata, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", NULL, 0); } } From patchwork Sun Aug 29 21:27:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29856 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402131iov; Sun, 29 Aug 2021 14:28:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVT9+b90jl5pkbMBd/4UTvJ2NTP1+2dwC4c1VRIfyB3DEw62yeq2dkNIHn4l/iuVcSFcEz X-Received: by 2002:a17:906:34ca:: with SMTP id h10mr21684326ejb.137.1630272486011; Sun, 29 Aug 2021 14:28:06 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ho42si10426094ejc.342.2021.08.29.14.28.05; Sun, 29 Aug 2021 14:28:06 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=XJmdjvhS; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 35ABE68A1C3; Mon, 30 Aug 2021 00:28:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075083.outbound.protection.outlook.com [40.92.75.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C49976802B6 for ; Mon, 30 Aug 2021 00:27:55 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GfCuXhTljxI2GhpLFrooyxfZt5C1S62ZtRw5iAD+PZnAVgi6JsfPuby7rbVXDi3LMgxS7twLWwmz1tTYQxSJvmOJu3STzBn30pUIy7N2MmO99doROzaOI08iEL53YwaxgtXUAd7/cJZo4DqTcfQHCSn2d5qb3usN/Svdl4PSSlWODjLgJi56I6v//Q4XB8W30tQuyUWngeUJv7Bq+7HwdvbVaxN9m1zeF1+1QC3hNvTbF9W9JsQcQjfEzs+pXQz+ojdtVxdRCP0sUxXHexzGAoBjjJimsNneprgraLymQU6sROiDHtEOF4XWN9w43d7YBAQH4PK2wdDvvy2eJqeYsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/ATsKvBb5x9ryt47RjuTCK2wDdzSqICf5N3n21zrhDk=; b=fkauF5T/bSaVIMW+LnOSnVeayzh181DlmU6XsCE+5x2I9XYVVpFUpSaf31e3ulotbyT7wZu8mw04yQfrpceFMIEX96blpe6Lq488YFbuzEFZqmNMEKwf25+h0+mrguVWBk9B8d6TnjwKmAwM0tXVQAnzuZwGgiSl2vixC3sE/7ZwnEOF/PpeVrImkrKQlp3QR+XDG8OW4oTaNvqyxwbbkdLa418suq865QlFvc+ksTEt6Z2lO+e/wE6YSVHVmm0yzyWQymcHGxIwds6r2oeTBlThrvN3V6T7PN6mym31eylpsS2p/ubQYSmGS6eGAygLlNDuYNXlSVPpRrrexaoJLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/ATsKvBb5x9ryt47RjuTCK2wDdzSqICf5N3n21zrhDk=; b=XJmdjvhSezEHf8NeG3JT2vsDTdCoK04y1/az6dtq6mvXFTswYAmDtvrt9NzQB4ggo9W5n6Vt/TMBBjlg9gTv2e16XJsr+O2jLUf41oP5rBgE8eEcF407gaKFT2bImx+Ao3J3wMYdMmAhR/1akMcxQTcqqwIRfj+pBBfPt+HEYesBiEABuONnzU6ISjsAzxzwicIbbQUIjVOUxIriKpCr13FvHauqm0Dc6K5zGkmL95qq4HT6K1QOspRa2DRtKqTCfji4IKiWgDra4TYAuptG83Vdwpry5QLqdye2lhpa7VCevYwZ3iRlV7nq0wSw3wZDDQdU3qtJY/jcBa9XuK5G7A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:27:54 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:27:54 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:36 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [1cDEqvpDHsTsHYX48PHCIfkZ2eqmJGxZ] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:27:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 33b56194-67e0-4075-4b4f-08d96b33dcc4 X-MS-Exchange-SLBlob-MailProps: LhCMoOy5BnkzEw+GMKqQ98t8nW/0L9Hg11/qiiOz15nCIEt7k9+CzBLzCCZUONrZcuV/etR1gh/hV2jblybsy37h4VtWNVzpiaUdfPhLfUuF+azICcyvu9CgxSt+esGhIcHt1TJobYCi+EYeqTD+4t2TImD1gT/B0sL0aQMKyeZlJaqCaxFtKtLzfs6mGUA32eB2r0zT5jNO6eLQT3QqkZbUI0E+J9XrrbONT1kLv6D6YMVFxaVnMFSv433nU6qa3GgvAr6cGimgFjAd7KPYHw56vWwSKD6FL/oeBGnjzb4ppSFH55txIpQro42ebSMfgC+3JP4Ghen1h2PrGsUeSgO9YHy6hmiTWsAL+lRbv5tqRHtYHcJMvRUqGcSk/VF5LKcumYKwAuZEbvb2K0kKu21cFBqwW5nBEFrxruwpMwgwODSZvWhOaaZOnLN5XEPAI0jeiWlUjeItsWxkRUEKT0ST3SJ1zDXzxC5cx8U+9CNjAbDYOdHpO41NuGe75+z05nrxVgr2gu++7L+3grZK36ikM6cy4dsJ2fBhgwp6fsymPATmBeucMJoEOCrN7OT5FPonsaqzufDROAXrfGIf1XtyIu3qkIzgV9fisM1Sj1yjQryM7M08mW2hydIvPqJ+acvygxFHWX0NvLvUM/RhCbDcf06EvtdvZVkYCSlscl6HeWDLwOWH53Mt99B3DbaZp19slaGj3+kVacVrvxV1JPBe4htbpbkqczSnIMDDpmkcOCEPZxHbU+iRnLdftbDM3cYMFSNjkJJzgpOngTWAntXJ+BBlnOChS5V5a9AFicU+x0C8n7bbZX790sf4bCULbTeugOi8KuKxTmThfLBiioR2RSqecXkBVMG74qJYGY+cF5XTsoId1D1kOVvSNE5iEywZKqShe2iPn6wbbqzjs/HoZvAw7RoCnigx2seURkDltk3nb/lNLSedlI/VKjt/e6yazDDKg6obJTacZJOZIBFbgVsx076VUXrecTOWKKBHW7HIk/A8UpsSI3D3258tMAspWrE7oJuqHkw+UAdX2w== X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7i5XkY8nvXF5fRrn+kpGf9DVJBniMqZzZccxke5stse06Wsst/bseZugyWOO9+76qxJv6tPOi96PdTgy4DcI/Ac8D1I95O4KwHdEgN8lyMG/Wf9+ufjuBGG1HYTw/D+3xPpWrsux+hgym7ApK1QhBuV8WHMk1lqp/r481u1cei4/DPZDHnC/aQEzvgsQlTJs94z3kWPjiSG/aL72g9ojPW7S31oVuDgLAtHTe0NStBHw0+4DMctwhy9+PSZzYeUx/0LHEI5uP3wM+YeVL+8+nMmMQdGZYa2AqzTEFUZa+puyq8crb7ARmQxu8N5I3qFt2MOQp5/JZ9XKdtRHiUI5TnmXfnbhynlQip7Ad9MvIPQK0SksD64qD65r0k4WlqH9lRV8m9Bqd0yReDESHdyXPWfPsdc7KA5IxymiVwl46SBHkvoff96K5npoEfkywTbk X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FluYzyjDODe8fIZ72LuqKX0kVVAcTEV61+uOPFfTY9WU+/uIYFrsV1pAdl6wi/b7Pr945VazRHvg4FzSuqfVT9lSnVV7L+E0SAETakx6wlfWqIX8y/hWsCMj9LYrITA84vPeTRg5giA8NypsDC2yuA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33b56194-67e0-4075-4b4f-08d96b33dcc4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:27:54.3062 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 03/11] fate/cover-art: Add test for muxing cover arts to FLAC 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: wauGEcJvG0QD Also covers muxing and demuxing of nonstandard FLAC channel layouts and the multi-dim-quant option of the FLAC encoder (all of which was hitherto uncovered). Signed-off-by: Andreas Rheinhardt --- tests/fate/cover-art.mak | 10 +++ tests/ref/fate/cover-art-flac-remux | 111 ++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 tests/ref/fate/cover-art-flac-remux diff --git a/tests/fate/cover-art.mak b/tests/fate/cover-art.mak index c42a4bc499..cbcc03fabf 100644 --- a/tests/fate/cover-art.mak +++ b/tests/fate/cover-art.mak @@ -46,6 +46,16 @@ FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL MP3_DEMUXER MJPEG_DECODER \ += fate-cover-art-mp3-id3v2-remux fate-cover-art-mp3-id3v2-remux: CMD = transcode mp3 $(TARGET_SAMPLES)/exif/embedded_small.mp3 mp3 "-map 0 -map 0:v -map 0:v -c:a copy -filter:v:0 scale -filter:v:2 scale -c:v:0 bmp -c:v:1 copy -c:v:2 png -metadata:s:v:0 comment=Band/Orchestra" "-map 0 -c copy -t 0.1" "" "-show_entries stream_tags:stream_disposition=attached_pic:stream=index,codec_name" +# Also covers muxing and demuxing of nonstandard channel layouts into FLAC. +FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER OGG_DEMUXER \ + ALAC_DECODER MJPEG_DECODER SCALE_FILTER \ + CHANNELMAP_FILTER ARESAMPLE_FILTER \ + FLAC_ENCODER BMP_ENCODER PNG_ENCODER \ + FLAC_MUXER FLAC_DEMUXER FLAC_DECODER \ + FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-cover-art-flac-remux +fate-cover-art-flac-remux: CMD = transcode mov $(TARGET_SAMPLES)/lossless-audio/inside.m4a flac "-map 0 -map 1:v -map 1:v -af channelmap=channel_layout=FL+FC,aresample -c:a flac -multi_dim_quant 1 -c:v:0 copy -metadata:s:v:0 comment=Illustration -metadata:s:v:0 title=OpenMusic -filter:v:1 scale -c:v:1 png -metadata:s:v:1 title=landscape -c:v:2 copy -filter:v:3 scale -metadata:s:v:2 title=portrait -c:v:3 bmp -metadata:s:v:3 comment=Conductor -c:v:4 copy -t 0.5" "-map 0 -map 0:a -c:a:0 copy -c:v copy" "" "-show_entries format_tags:stream_tags:stream_disposition=attached_pic:stream=index,codec_name" "-f ogg -i $(TARGET_SAMPLES)/cover_art/ogg_vorbiscomment_cover.opus" + FCA_TEMP-$(call ALLYES, RAWVIDEO_MUXER FILE_PROTOCOL) = $(FATE_COVER_ART-yes) FATE_COVER_ART = $(FCA_TEMP-yes) $(FATE_COVER_ART): CMP = oneline diff --git a/tests/ref/fate/cover-art-flac-remux b/tests/ref/fate/cover-art-flac-remux new file mode 100644 index 0000000000..07a8400128 --- /dev/null +++ b/tests/ref/fate/cover-art-flac-remux @@ -0,0 +1,111 @@ +26a0d04dadbdd2703a78c603f7901bc9 *tests/data/fate/cover-art-flac-remux.flac +1103460 tests/data/fate/cover-art-flac-remux.flac +#extradata 0: 34, 0x92060af7 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: flac +#sample_rate 0: 44100 +#channel_layout 0: 5 +#channel_layout_name 0: 2 channels (FL+FC) +#tb 1: 1/90000 +#media_type 1: video +#codec_id 1: png +#dimensions 1: 200x200 +#sar 1: 2834/2834 +#tb 2: 1/90000 +#media_type 2: video +#codec_id 2: png +#dimensions 2: 485x359 +#sar 2: 1/1 +#tb 3: 1/90000 +#media_type 3: video +#codec_id 3: mjpeg +#dimensions 3: 199x300 +#sar 3: 72/72 +#tb 4: 1/90000 +#media_type 4: video +#codec_id 4: bmp +#dimensions 4: 485x359 +#sar 4: 0/1 +#tb 5: 1/90000 +#media_type 5: video +#codec_id 5: mjpeg +#dimensions 5: 199x300 +#sar 5: 72/72 +#tb 6: 1/44100 +#media_type 6: audio +#codec_id 6: pcm_s16le +#sample_rate 6: 44100 +#channel_layout 6: 5 +#channel_layout_name 6: 2 channels (FL+FC) +0, 0, 0, 4608, 14, 0x242b036d +1, 0, 0, 0, 66888, 0x1fd72743 +2, 0, 0, 0, 438706, 0x8bcb753b +3, 0, 0, 0, 21671, 0x7d1c6030 +4, 0, 0, 0, 522758, 0x7a63572f +5, 0, 0, 0, 21671, 0x7d1c6030 +6, 0, 0, 4608, 18432, 0x00000000 +0, 4608, 4608, 4608, 7636, 0xc3775d85 +6, 4608, 4608, 4608, 18432, 0xaaab4d62 +0, 9216, 9216, 4608, 5700, 0x8b9a3cc7 +6, 9216, 9216, 4608, 18432, 0x49410f52 +0, 13824, 13824, 4608, 5375, 0x1fa6c33b +6, 13824, 13824, 4608, 18432, 0x2d52e439 +0, 18432, 18432, 3618, 4060, 0x59fd7219 +6, 18432, 18432, 3618, 14472, 0xd2d47505 +[STREAM] +index=0 +codec_name=flac +DISPOSITION:attached_pic=0 +[/STREAM] +[STREAM] +index=1 +codec_name=png +DISPOSITION:attached_pic=1 +TAG:comment=Illustration +TAG:title=OpenMusic +[/STREAM] +[STREAM] +index=2 +codec_name=png +DISPOSITION:attached_pic=1 +TAG:comment=Cover (front) +TAG:title=landscape +[/STREAM] +[STREAM] +index=3 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +TAG:comment=Publisher/Studio logotype +TAG:title=portrait +[/STREAM] +[STREAM] +index=4 +codec_name=bmp +DISPOSITION:attached_pic=1 +TAG:comment=Conductor +TAG:title=White King Granulated Soap +[/STREAM] +[STREAM] +index=5 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +TAG:comment=Publisher/Studio logotype +TAG:title=White King Granulated Soap +[/STREAM] +[FORMAT] +TAG:major_brand=M4A +TAG:minor_version=0 +TAG:compatible_brands=M4A mp42isom +TAG:disc=1 +TAG:title=Inside +TAG:compilation=1 +TAG:gapless_playback=0 +TAG:track=5/13 +TAG:Encoding Params=vers +TAG:iTunNORM= 000004DF 000004C2 00001E64 00001AB3 00000FB9 00000FB9 00006480 00006480 00000FB9 00000B52 +TAG:artist=Maxwell Strait +TAG:album_artist=Maxwell Strait +TAG:album=OpenMusic +TAG:genre=Rock +[/FORMAT] From patchwork Sun Aug 29 21:27:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29855 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402205iov; Sun, 29 Aug 2021 14:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPmb0RqGjpOXA3rcGn/K97GQMslX3A0/TTggnZCDTZI/ntRMqxFF85UwyhTEToIsT/0sgU X-Received: by 2002:a17:907:b06:: with SMTP id h6mr20294278ejl.130.1630272496763; Sun, 29 Aug 2021 14:28:16 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t20si12241100eds.230.2021.08.29.14.28.16; Sun, 29 Aug 2021 14:28:16 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=iQQORtpH; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5B04468A24C; Mon, 30 Aug 2021 00:28:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D44E4680610 for ; Mon, 30 Aug 2021 00:28:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g4zCdSjHDQ3PATnTJrCjzSVSlJJF5x14v6fd/W8mcar/zushW+SQ2AnVwCxxOtKqh2hh3Lffoz7DMpKcekrOfZxeLfS3nm6w+L82NkwB7UAB076jdJLgk/bGFjVh/nNvXXBEtbJ/CFk/Ye5G73E129kOXKj2SiVR4qlkUi6G82gBRTEJ5Wk0nm1lCwICcbQeG+MahETQ2KW39fUHWmV2t6QryBuJtO7JliTJngk/EEEAQrGDlcdgKS7WjEPWLtTu4biTbWyB5kzofCVcaJGmTM7l9D/N6ct2DqjMVlWnnqiegrNuBzi5jvc+m0GGVI8QBrVd1RYVbT15aRDXnZ5Cww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4Cxw/MW1QprSE6gi6kIGMAphrUhbptRjSCrprnSratQ=; b=ieqtT4GEWIkwMRH/XxYNPllwkle5tB+83TxO7F7/r0hxyfXRBpgZj53LYJq/Fh1jYUpZns5EMtWrzbhy5yJjhYgWH+UzMzESuiLfqN3G8lyoHiQdjYD6mfXc3Xr7OXq4wyyaehRNd/IQ+/bloxN6+yFRH9jvi6tu9DnoGrsvE2eJG7xiBNhLMskxVy+WzAI6stuE9N0yks/q5zPgsxFugFg5tmgYF5Pimvydh5GHJCLHD1zdiClabRBmYHJAkpHnIGa1MHAPTRMz5v0nSLDkYTHZiud9c95J5BganZYAGqLP/ed5eaRJimjZfMFg+dAJnvX3vf49TrV4Y1JKLBkJyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4Cxw/MW1QprSE6gi6kIGMAphrUhbptRjSCrprnSratQ=; b=iQQORtpHDz5arSqDklirDVKfwivhgSLxXLjZAFEATn6XiRQoz11ONbrml18/Llyxyc9r7Enxs3r/ZZm1Fk9HtUdiHKOKRVJpJV0B8b3ivDR1RdZe07tUmNLins66tC9KqOC/iEMkkEO/AVXGDb1j9iW1uoGw4HodAUZRvGQXJJ5Ccj2pZdqmTqwTejfIrwVlCCLkHDwJNIgPH+Qdo/8s1Pl/nJvDQhyjAS/uPwBbJKwz0C1lKASgPJ5McGoyB/YmLtHii413NnPG+cYo6n+gydOA6L8/MFYSQax87psGuGcTgP9b/LAM1QDp/U3mP0YOd3W0OovgZnjZMGabJS2P0g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:02 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:02 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:37 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [Gj3+n6ZRTxSocXQXgWZGhTJx6kQ1fk6q] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0000a664-b76a-410c-99f1-08d96b33e192 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXOVIHST31EzKLNwg5cTLbyylOPiHNpp8um1vq+6WLygU5xkGrvgOzWoFtS8VbF7t3KE8AmVkbNVAwcY28dBtVFkWFRxb9+hUFjsnCLh8vmpjhZyC2UbJPVIYH6O7daSU8/p+Q5HXhPX2goeozJPeKKLDZS6OjRT2bhgtUpN1KZ43SMGjawVrKUEHYf0IVSnZIIehLihKFSJRKJMG85fqnvHmM5Qj3qJAtkr/lKCSv+sioQnsFxp03Z+tEpnc8zyljohtdLXhW+86dsZTnPzCdaVMUefYI5ue3te7LOifJMtLUTTsvqXYyhaf5oxouw4akTO8dtirv8Qem9i8/ukkmQ8iKCtQlcogQJneMh05RHAQ8Hg1Gs7nL7M4+DFf9sXf1v3mQbAkC8jikK0eSG55rPzFVsw+PwxPziHcQDARv1hZeDwI7wHtU+FqvWoOX0G02UK+YkjzVdwhjRpW5np2AuWGu5q5v3vh4t01pQP2tHcjpwgsW6ezSspOtzUvmdI/spRuWwHC5PFCFBvhqOtWXF5FYcBiSFu9UiHvVkCKgGj6gycGaSUlfuQShsvY0PULMEBImyn6jhw07nQEktUpMnYeMK5CbQe0TQJ5gCypZfuQxdiqE6bf1fh31ip674Kh9sBh2kDK/RguRwQPS4+VqcmfESRnoFIlNd38PzCirANtbCDcJ7zXEHO9IHnMwrlgkBXp7JCAVs9gN2L/FpVLU+yRoC/LXrb/A= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pa5NkhpMvf7c3q6QN54hZS1fhmaRBZPBabybIaqZPswoPwsJAGArEiTV8VsUmVBfISgqAgPbkC54yGPfn3zEXERG0RuOzIVezeTU9jPtwNhJrSN+rrTcactVo+AKF2RLCHB9UJVePfpFn8V8UlvOyXnnbuydMP757HmcK6JV6bWFMxbZSyQRuJbXmEnAQLNUQzVJ7Zjfwu35/tsAp9nzqWA5LMBzaffB5YO22juar/TX06uf25jDMqc0LH8+6YXtxVwLQoH/3iAnRQj64brNZrlHAnqNrPna1+K1cB+UymU9KpUWeJDenVWRM5Csc44xumVAEgsl9gFMxveLICdRPPg2uAxbABFWPi1HgATRGLTTb/wlCDlZY/nJtDpHxKXTT/M2AynuqTw9Qz5QXefeTb7VVVtrueSU1IyvwxApf9uZNic3j1SmuNAqLE08zSMH X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NCtdxjzYWjNGR2yIULHPPjx1LsBMUCmbzbl7TVxwTGS/K7rDpU/eex83Eyll8xz1b5oRX8IkBXjvkxDdyBE0DiBwWEVN/faOUuhkbIWBsUGKo0zb4PPkpy53emGSjvIW2t+rcOZn6bfd/i2Z+wU9zw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0000a664-b76a-410c-99f1-08d96b33e192 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:02.3214 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 04/11] tests/fate-run: Allow to set demuxer for generated file in transcode 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yKuYy1zWruBR Up until now, the transcode() function allowed (and required) to specify the input format as well as the format of the output format (i.e. the muxer) of the generated file. But for reading the generated file it relied on autodetection/probing. This does not always work, e.g. not for aptx_hd, and so this commit adds an option to specify this. (Notice that one can not just use the name of the muxer, because the corresponding demuxer might have a different name (e.g. mp4-mov).) Signed-off-by: Andreas Rheinhardt --- tests/fate-run.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 4b21bab591..b486c780ab 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -233,6 +233,8 @@ transcode(){ final_decode=$5 ffprobe_opts=$7 additional_inputs=$8 + demuxer_opts=$9 + test -z "$demuxer_opts" || demuxer_opts="-f $demuxer_opts" encfile="${outdir}/${test}.${enc_fmt}" test "$6" = -keep || cleanfiles="$cleanfiles $encfile" tsrcfile=$(target_path $srcfile) @@ -241,10 +243,10 @@ transcode(){ $ENC_OPTS $enc_opt $FLAGS -f $enc_fmt -y $tencfile || return do_md5sum $encfile echo $(wc -c $encfile) - ffmpeg $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \ + ffmpeg $demuxer_opts $DEC_OPTS -i $tencfile $ENC_OPTS $FLAGS $final_decode \ -f framecrc - || return test -z $ffprobe_opts || \ - run ffprobe${PROGSUF}${EXECSUF} $ffprobe_opts $tencfile || return + run ffprobe${PROGSUF}${EXECSUF} $demuxer_opts $ffprobe_opts $tencfile || return } stream_remux(){ From patchwork Sun Aug 29 21:27:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29859 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402322iov; Sun, 29 Aug 2021 14:28:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjoGD62+vRttWkOMlKbO7YLhY9RNLTHdUXmZ7aS3sDvGoEDpUUS60SXcv638Ey336hg5UA X-Received: by 2002:a17:906:ce24:: with SMTP id sd4mr21539647ejb.329.1630272508175; Sun, 29 Aug 2021 14:28:28 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i5si12257236ejd.224.2021.08.29.14.28.27; Sun, 29 Aug 2021 14:28:28 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=TDaWEl6q; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B93E68A2B9; Mon, 30 Aug 2021 00:28:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0217A687F49 for ; Mon, 30 Aug 2021 00:28:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NBpk25CWxKIkHF/G+p+oqlqXSdpk4a4SOBVa3qcMhTiufuQEyExNohJSG9w42LYnkii1YJfCXKcSDydqS3kyQ3kw2O7YOXvR6tXK6BwvbppFvDCeN2Lb02zKvPHAgTqpNg3rQnWEA257gv3mcJxCZiczo4n/UvME1hhjOL3ZPm5N7BVPpTddJiWlZiL5oQvQiEKilPle7FhnKL+STaidMRBzRGGoErCJjenoUurV+H6cmpmM3leyaCg1wpmM96o6RZuHGulSoZbQORIGS/4KgPiJSDxK0o3twbz3Kh70VBin1uepU4A0z5UVbt5cIGEecFAPsu3HmfRBBuXVnte3iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zSgfVMzptj7kuIDMt0GNaoQ4ez0ZGJ5qCBfBImZcaBc=; b=EPEDfLih3iegzchh3HwM0lD2g4uny4Awlkc7ovYAV+KjQqpjltxiTOoxarON0qEVttiMSMLRAmSGkh4fTInpAJOo3rPphEH0r1cnlHQX4k8qLglglm1WOScKyFCOjxuU1JWGG/iFvfrwUzMF8B2MAIqZ8DzVbgO0BRfbVtG536dkWKM8yO5RLD4v9xn5hEK59+wJodCHYqJ0VrHejJzn6B6NKx/5u32J3VWcGGYhaWRSwWwMdd8euO8sXYgD7LbW/q3HmK46gRTdBcVKz9gRmHuaZJD/NJYnAYQgHdA3LHyVAM7cKNRh4+Fnw6Tr+xDedVMQdq4CPwjeg/gbecDMpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zSgfVMzptj7kuIDMt0GNaoQ4ez0ZGJ5qCBfBImZcaBc=; b=TDaWEl6qxzS+GTkV717IRmz7vZQJSeX6sX6o35uieIFC1peJzntLUb4ecdt4nx00mbuRmQZPFxWtn+3rmhuE1ad9ftvvDoCY6oTTbY3JvIDrtcSBGtpJyFJMzUzT92+4LPv5HLk00g8KQu5vynRvvoSi9o9hKYkzz4aKvT89Zkypf0eVT/mTQ/Vslx13x97cBKJmfV3SZEzrxrHXtYBhSpOz/yx8dauSoWrB3Z9M2V0o6c6+ogblYnh+k5pdTlJwIFo0zacfasyShLGJmKeeVMwVTAvUkhAhLfRGGYc4aKwZ5AE1hsmCEBN3w/hYvFtwLGkXADRDZ8dRgfI+OF8bHQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:06 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:06 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:38 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [hxGV8/pu/Oi87nZyjUOW8XXVCa03QR31] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 021eb701-a1b5-4c78-d628-08d96b33e3d4 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXOVIHST31EzKLNwg5cTLbyrNM8d22MphDes3FX3Hzm84rsZMQepvC8F4oCdcyYe7c7RpkSROtjWDhU7UoRzxUNaFD9dohVso6Jp6ukA39+Hw9ilajXIKJlFB5mh1EVHFwd7FvZeVWp9xlRS3aADn4Hf7vnQZg4zrsTmHQiGtSd8aQP6uA10FCAbQmVLX1w6oteFXppcNGEp77HdleZ+UfUWqSvQOGvqhSCqNnohmVD6ukfGdVeUwr+YT/dFCyAiQrjx/1vFvMabS4Z4FxHbtNGMUypf3KvXMJKmTRE5ypLV0QHQ987hFH4UhGz7t9rHaN5DzegP1quAQ1ZTJQlJvY84zB2PJYS6mQdEv+OGWyg/RmJu/8fJDoPOZ0WV6WE4CDMaZKDR7whtmFmC9sVu73R6sTgmEaWDVpIi8I1Trug+21C0GIxvIru/4mmpQiYFWEIEWMjzbdniy2pLHrlvxMr1/4EPiAmVtXLMfz8g08NCrIqqavykuFYJYp5Z76W/vkc8bVlWa7AU5BMm0A7d2vsnSnGA8UcWs+wvDKDzbUbG8mMBxBu95Uw6S8d1QyhPT2hylVfBW/Zq/y3eWpWFtu5tYr4nLt/66TGb4Uq4tUJvzJG1kGiwXIK3hbWkRixRezZv9IQTIKWg7EDWzDj6S+YJkWhYp7SrH+AA/l6UWm7M6y4RFcAnWZ58h2m1R2X2MuTYASQ47ItUIX71qp0PhrShmQmE+AfamU= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 74yqW0jR2U2BLEJEItt+prYqrfyyCZZU0Vi5nX77QYwPqvDn6vrMfXHmxsmOX2xiVBpRBFWP3tFa26/Sd5n0q/O/mws6ORs5YeHb5qksu9Tp8gmYoK15LlCosY9Jdc58iJS3ZEzro4BZ2Q4X/PapvPual5COqS23eFsQCoIq1kYYuA7BjJrFXUE5RD1jjHMj2+4Flg1OmrtFsckisGIaUkr7lYMQgdnhIK5IbxENxA9TmyJtikH3w1GzGHPoknraC8gkKj8aqp8jYJrgez/i7U3Xkp8dXa+surEvU28FM+z2E+hvBfoidmA+k4vMnVnN4wWLepdoFBHh65YxCAlcTmOoeeFY6dll2W+jq1oF72UhbeMMLz0UdcvhfvIyinFUUJtxivsaYsr0hImVzWukn6EwwSoXdnmBKyH0bvXFbU3sUpd2t9wQCCMu1JLsQRFp X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K3TYxqbuOjhJd34ap3LzYFOvr+C18oOTMRI4jzxbJwavoT3a1hm5u9Tl+QGiu3CY3HARYUdDJJimk4LQk5EVBGWGaaE8SBvELjdLMMttYYo2bsJfACc9zNnT9Wfv1Y6ydABpnSfPgJLDNxf2fVdgfg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 021eb701-a1b5-4c78-d628-08d96b33e3d4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:06.1388 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 05/11] fate/audio: Add tests for APTX (HD) 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: /ApoIAN3JXTF We have de- and encoders for APTX and APTX HD, yet not FATE tests. This commit therefore adds a transcoding test to utilize them. Furthermore, during creating these tests it turned out that the duration is set incorrectly for APTX HD. This will be fixed in a future commit. Signed-off-by: Andreas Rheinhardt --- tests/fate/audio.mak | 14 ++++++++++++++ tests/ref/fate/aptx | 20 ++++++++++++++++++++ tests/ref/fate/aptx-hd | 16 ++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 tests/ref/fate/aptx create mode 100644 tests/ref/fate/aptx-hd diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index fd9905ca0a..dfa72288ae 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -1,3 +1,17 @@ +FATE_SAMPLES_AUDIO-$(call ALLYES, FILE_PROTOCOL WAV_DEMUXER PCM_S24LE_DECODER \ + ARESAMPLE_FILTER APTX_ENCODER APTX_MUXER \ + APTX_DEMUXER APTX_DECODER PCM_S16LE_ENCODER \ + FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-aptx +fate-aptx: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav aptx "-af aresample -c aptx" "-af aresample -c:a pcm_s16le -t 0.25" + +FATE_SAMPLES_AUDIO-$(call ALLYES, FILE_PROTOCOL WAV_DEMUXER PCM_S24LE_DECODER \ + ARESAMPLE_FILTER APTX_HD_ENCODER \ + APTX_HD_MUXER APTX_HD_DEMUXER APTX_HD_DECODER \ + PCM_S32LE_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-aptx-hd +fate-aptx-hd: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav aptx_hd "-af aresample -c aptx_hd" "-af aresample -c:a pcm_s32le -t 0.25" "" "" "" "aptx_hd" + FATE_BINKAUDIO-$(call DEMDEC, BINK, BINKAUDIO_DCT) += fate-binkaudio-dct fate-binkaudio-dct: CMD = pcm -i $(TARGET_SAMPLES)/bink/binkaudio_dct.bik fate-binkaudio-dct: REF = $(SAMPLES)/bink/binkaudio_dct.pcm diff --git a/tests/ref/fate/aptx b/tests/ref/fate/aptx new file mode 100644 index 0000000000..ff890f6943 --- /dev/null +++ b/tests/ref/fate/aptx @@ -0,0 +1,20 @@ +e36494e4eaa69dceb9746e784f928198 *tests/data/fate/aptx.aptx +480000 tests/data/fate/aptx.aptx +#tb 0: 1/48000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 48000 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 1024, 4096, 0x42e145b7 +0, 1024, 1024, 1024, 4096, 0xfe24da5f +0, 2048, 2048, 1024, 4096, 0x5c9d2323 +0, 3072, 3072, 1024, 4096, 0xc7e155cf +0, 4096, 4096, 1024, 4096, 0xff114281 +0, 5120, 5120, 1024, 4096, 0xd60bb6b0 +0, 6144, 6144, 1024, 4096, 0x2beaa892 +0, 7168, 7168, 1024, 4096, 0xc74c71ca +0, 8192, 8192, 1024, 4096, 0xf49880cc +0, 9216, 9216, 1024, 4096, 0x9eae2532 +0, 10240, 10240, 1024, 4096, 0x096863b2 +0, 11264, 11264, 736, 2944, 0x533118a3 diff --git a/tests/ref/fate/aptx-hd b/tests/ref/fate/aptx-hd new file mode 100644 index 0000000000..825d0439b1 --- /dev/null +++ b/tests/ref/fate/aptx-hd @@ -0,0 +1,16 @@ +5cfb39f6d059dd0a906feabc12b3ac24 *tests/data/fate/aptx-hd.aptx_hd +720000 tests/data/fate/aptx-hd.aptx_hd +#tb 0: 1/48000 +#media_type 0: audio +#codec_id 0: pcm_s32le +#sample_rate 0: 48000 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 1024, 8192, 0x85791bdb +0, 1536, 1536, 1024, 8192, 0x8db6dfa9 +0, 3072, 3072, 1024, 8192, 0x617b2190 +0, 4608, 4608, 1024, 8192, 0x733c4d71 +0, 6144, 6144, 1024, 8192, 0xb254420c +0, 7680, 7680, 1024, 8192, 0xc166b305 +0, 9216, 9216, 1024, 8192, 0x93e8a20e +0, 10752, 10752, 1024, 8192, 0xd91c6790 From patchwork Sun Aug 29 21:27:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29854 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402400iov; Sun, 29 Aug 2021 14:28:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYyEY5juBMXlOYTAlfG8ti4+TV8IliEsjxSAXyRNg4EtsliGEGW2U08H5RjbdElkDmdsFn X-Received: by 2002:aa7:da8c:: with SMTP id q12mr20753090eds.380.1630272519636; Sun, 29 Aug 2021 14:28:39 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id lv10si11681253ejb.316.2021.08.29.14.28.39; Sun, 29 Aug 2021 14:28:39 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=D5jQLnln; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 76AD268A360; Mon, 30 Aug 2021 00:28:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 19B1468A1EF for ; Mon, 30 Aug 2021 00:28:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VSPXTfTwMA0VaLTONVrXv7NloPw+yg9rQbE9VINVhVEtXWKzgsQiWQ3m+ysqMhrhc9sK7Jd3KBeBlc619vSakzH2UtH63q5bZLOyuZdUvSsAY//Q0jM46xZjuj7KEgC8d1CDPu2jCwueD63OZupNryKEnnKQ6Zg8TPhRtHs57s3pcMv6k1UZVx4Tb1d9e/i4XsNfsJkdMNS27iF8XTM2TZXu1N5UhM3zikwyRjYHx/AvJFyTHRIkJN+Cl3LThNaQAvGCs6F64u6pP/8MVBHWKuj2hc9K1aqfZ3VRkrgiAc4VlY09lUy02FaWZ+4tSDzS59d5i1p53uZB7Y5bui/e6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Upjm4wC9VyQsuP35oNrhB80PR3iYKxFH9VPPCEcpeTQ=; b=KVCrVG/ktF+b3O7JUlhrqt6gwurz+MIhNwDqZC2TKsb1XcwyYe4FpEwH1vb7GXoL1MoQPOpSz7LbgsUdPc4GKNNDkdzjFpUjJ/432KisVpemx6GEtRzd3qQoZ6mJFtj2GGh4Mw/T7KD1je7d5PGFQPC6LwcgXvBF5SsekqW+697VzHC36UB0QUas1g0wTWKTNHI/pebLvwa1qdVlxxydgOefc6mb6GGC/+UViJ3IjzsSUfC3LFplGeGiEEDmNZH5nJnckYr9ej3BcRrHl+zHzdKdOkwDAbVVXQoBn66VPKEDUiWg6V9lWFzkXk3gsIdJdZPWAUjWmyqvlBIQeBh66A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Upjm4wC9VyQsuP35oNrhB80PR3iYKxFH9VPPCEcpeTQ=; b=D5jQLnln3wQw60j4DOKV5hsnoLPRUuMbSSEm8xLeY0MZ5QGZswI4eXhHc7oG4zNMiXxUca9kI87ng2J/rVcgjlxsBMPcj1/f/kzxJIzfIbPMoYIbqmucmrwXNnQAPu+g9xlgLFtZKlZW2VF1eNiKxjP875+HIalyAKNjPSNcAXNA9AazZ+0x/ee48lOzgV9mqlYclSf5pXHKbcH8fCJZJTU7vsDmxX7Jb3FWSWltjmMnMH8gvBqDy8HrXZFwrtKtNFo7/3w//B+vN9vFYQIMspLw7/oHpFDp+5hgYWEPxmn31515koYIUGQaoRC/TgNpK1qU5FVA5aD3jTiMMAy0EA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:07 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:39 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [cedNoYqyPOteCkV4QBHpOm2eSK9W4GKK] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4cdcac92-e95e-4c59-d323-08d96b33e461 X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEtNCKoPT6rtVE5PzvjguT+v5L4D8usth2It83qDWLbgYiljIAdi09XIeo738ewXxN27Devr5PoyI6BLHc0ibL5uf5ZVgKP+U5KsiI6gzIVMJK9/EaK9b7fAB4bWdecIMgIvwg9D9+vcJg9OfTi+YWmcacNE/h0KyJ8G52wmkrHIOYe4SYxUK+FfgIEhMu+9G844QJnMKTXkEsezSJDmU97myGZErWkb/eb6ONKBBH3YeDS+TH25CQXxkWhDQBI7w91+PUSXWrEzX5YJDx0BghiW4rTI/dRsoVREYbX2pgA7mW9KuduoqNK/PXKHH4VmKbHxo8me1e9uscCmoQlzCtGLH9oBFj/cFFSmmQ4dFTh9JY/6fxn+r16fSA0DY5g3GkU3TYKYKk0A4FkaZhXeQKRAegcoZcwB5fFNMkp03gKicHNLPXBMRzyluouZSnfp0Tf18yFsF0PE3vYCaNtCDvl13Hgpeyb9KiQxaj4+RuwrduXhajXjSg6XEPHTELpjwi6KVykDQaWGs7qUpxiittcbeJaNbayVdUynDg5nFsYrMgLD65dsFPVNkEeb2vy0bHhFG4ngVpFBnpDVyG4ZBahlz+p18GwT8U+ol3uQzvnVMEETl5tMcCugYJbIEHTPp/6hk7qX9FmOtDHMf+IEiQowYdD1nIGx4fsc3JkRt/3wP2DNNdAm/PkOlRIwrpF+QG4N8pwWqmMpB68mGdQsMONdJF2sOXEOqkthzwnUVMYmE9NT4OvNbuzx9qbkzboXDK2TN9cD+3GGgyNImAqz9iJj X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uCc0eiuX+wLlubgUEgC2hDnedZlzLVVPc6V37egw8QKEV/zWDqlwtDt4tSnyUmh8g5IYtPDDFklt1OcBumdtubSNRa8RweHi44gwab34Qc2rUesMavORn/lIs1jp0l/Lbkw3Z6FwfpHnSGGRBzU8qHQmeJXAAX8DuNsA/iZlWNMasT6uz2HREB7Q59b1C30LSepRSI2fnFKuUC/CG/gkhIxiWTNot4TQxq5P/R0QFwdVBpV7fkXGrVhecbpry2EOP7fzKdO6kLF5b492Yksknvd5DxGDNiqJ7z7s2/5C3FbNSR/P//CU+gik5moyxeycH1A+Vl2CXGKpdxBtXn3WEIAUKRWjcWU40DyRCcSobD11QqPvEs0AG1xW9ulWg6qkBtVGy0bkKI+n+MCof7C3CB2Al3qXOsnyE49mxOSQDMgAAu5qj+8RQ/REWvQrZhqz X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rsm0iQrpRCLnlNoVOHFc5F6ZqHoMVmkUasW8hq1EEqi0FpwAS0ilbxIxtlIMIS1FOSr7kfgaiNlhhq7C8xg/RmrZ4QxEPtxdWhx3/8H5VNBVik60GIQSR+dTepx6epcmjDzSKt32zRiR4U9/tWFviA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cdcac92-e95e-4c59-d323-08d96b33e461 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:07.0538 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 06/11] avcodec/utils: Support APTX (HD) in av_get_audio_frame_duration() 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 2HZVJYuBiS2Q APTX decodes four bytes of input to four stereo samples; APTX HD does the same with six bytes of input. So it can be easily supported in av_get_audio_frame_duration(). This fixes invalid durations and (derived) timestamps of demuxed APTX HD packets and therefore fixed the timestamp in the aptx-hd FATE test. Signed-off-by: Andreas Rheinhardt --- libavcodec/utils.c | 4 ++++ tests/ref/fate/aptx-hd | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index cfc07cbcb8..9090638385 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -678,6 +678,10 @@ static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba, return 256 * (frame_bytes / 64); if (id == AV_CODEC_ID_RA_144) return 160 * (frame_bytes / 20); + if (id == AV_CODEC_ID_APTX) + return 4 * (frame_bytes / 4); + if (id == AV_CODEC_ID_APTX_HD) + return 4 * (frame_bytes / 6); if (bps > 0) { /* calc from frame_bytes and bits_per_coded_sample */ diff --git a/tests/ref/fate/aptx-hd b/tests/ref/fate/aptx-hd index 825d0439b1..c924186ef8 100644 --- a/tests/ref/fate/aptx-hd +++ b/tests/ref/fate/aptx-hd @@ -7,10 +7,14 @@ #channel_layout 0: 3 #channel_layout_name 0: stereo 0, 0, 0, 1024, 8192, 0x85791bdb -0, 1536, 1536, 1024, 8192, 0x8db6dfa9 -0, 3072, 3072, 1024, 8192, 0x617b2190 -0, 4608, 4608, 1024, 8192, 0x733c4d71 -0, 6144, 6144, 1024, 8192, 0xb254420c -0, 7680, 7680, 1024, 8192, 0xc166b305 -0, 9216, 9216, 1024, 8192, 0x93e8a20e -0, 10752, 10752, 1024, 8192, 0xd91c6790 +0, 1024, 1024, 1024, 8192, 0x8db6dfa9 +0, 2048, 2048, 1024, 8192, 0x617b2190 +0, 3072, 3072, 1024, 8192, 0x733c4d71 +0, 4096, 4096, 1024, 8192, 0xb254420c +0, 5120, 5120, 1024, 8192, 0xc166b305 +0, 6144, 6144, 1024, 8192, 0x93e8a20e +0, 7168, 7168, 1024, 8192, 0xd91c6790 +0, 8192, 8192, 1024, 8192, 0xee6584ae +0, 9216, 9216, 1024, 8192, 0x74a6246d +0, 10240, 10240, 1024, 8192, 0xa20e6fb6 +0, 11264, 11264, 736, 5888, 0x06a6f058 From patchwork Sun Aug 29 21:27:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29860 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402834iov; Sun, 29 Aug 2021 14:29:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqw36kK4+JpvQEla+MDM6h4psslggrs1JWCYmlNmiSwJRTqlx6SrNmtDd8kVtJIMqLJb3Z X-Received: by 2002:a50:fb08:: with SMTP id d8mr14618435edq.160.1630272578877; Sun, 29 Aug 2021 14:29:38 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w13si3187607edd.519.2021.08.29.14.29.38; Sun, 29 Aug 2021 14:29:38 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=BcGI4Z3E; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9907868A2D2; Mon, 30 Aug 2021 00:28:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075084.outbound.protection.outlook.com [40.92.75.84]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0AAEE68A3F4 for ; Mon, 30 Aug 2021 00:28:16 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OiHYQQfZDTQIbiAA4iyUAnX4jW+aziMtwfgFfCl0AudM66/W9aQaQMwlRVZKZYRigu61tluWUym7pjbLgfIunfYbsb3Q+WZx7pXl8tJYQqN9bS/60YKzBe6hmtpczFFY935lZ1PSt4UvvSpEab/8Aj1UiCf72FlWy8MxZWheAWVLwKlHqN27DdbeidCIhAp8u/X0KjFYsZmIyzvf0+45F7Wm9bjiTDCODE7Ie0Z3jh0tIg8078POwBR/OXqlpAWyugfwolka7GLp6GL1RaO8GimjliBK0+ZFEq2uwaWMJlzBuCXnNKzRHbshKY62IB9A5m9rAQQzELsP9HjwcCl6bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F16WiVY7aTY/15Pd8kcqCt5dl1NfbxKmltE9oyfnk8s=; b=QEI4HC7raQMVIHgT6ea2eo35ZNyb5HH7oEj8LvhQMZDDaHtl+RQdB6XrbZPMSq0ooeOEGvUgxJb21KURr4kYATezlWVadX0Jo+7ASpBYLkXOk4kNp2zCM43/1maxgDwSFBNcNkQuUC2XS8rDIkKWZO3hatChIgbQq3nYqQMpG+0bSvm0UjJ/9+3dm9POdqtT4gMttRHRBz12iiAGQnxtv/vnhe/ahd8THqshTII7QfQbWEeDqQBTvVOOtnkWKo+l1JKMVA+zRNgqsZTBvtKBmSaQ24eoIuK58uDD5ew308zBkagr8WNHHw3Ay7AwHVn300NnP5Dw+BrrWM942HYgRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F16WiVY7aTY/15Pd8kcqCt5dl1NfbxKmltE9oyfnk8s=; b=BcGI4Z3E+YjW86hQXqRhpkoGwBHVuxZiZ+iD7DKc5gipevf5XTUauY3mmnkKI3bFK0lCOsjZJJeicLl8Xjs00+1tdSp5xJcQdkG/Za8445rgd6WYR1NKCtosg+9q4PRtBaaznm9JEWQ86+C+pR6I5HtZGSZG5wfRZW//g0O0LIE56rG6lelciM6/t8wEoCZXpfmXJQYlIgspDMoP3YIY/XtCCMrh7PsSVo6+O9V2ebdE0cutkup1E8JNqfXOzZkogkgEUIzQO22Lw6a5yrVDVYZzKhou+HEHT8o9QKQQjRDCL8Lzf6P3N8AGoHzhPIS5do7114LtVyLEwUI3EqJS/A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:07 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:40 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [6we4fCZ+3g0ZOYdju76Z2JOcP5TlOCyr] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4602043b-31c9-4cf7-7b62-08d96b33e4e4 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXOVIHST31EzKLNwg5cTLbyDmEEvGuTh5DwV/V97tjxc1ZqGpwdf8zfTV/HACtWb9mL9J/nzRL/ODv/2O5KokeXOmz89CS90lZDUEOWUAESuoHTli8NEhZQMkKJ3iyugyvMiDUrmsrizbl5fbhkSiKnxVQCB3V7g0ypcjKtcdb4BDqsRnfkpgNiyaVZDzJPNs9ZktzDkv3R0Omj+Z/zK1qUHwzlt512kc3aIcT0rY0LgtZqtwVnRxJq3vHlb55+FiD6bm7AGTu9/YF933k/d2tJ/sHbljMw+gAkup6J0fspTDSCtMyhW8ie6BIHNrfisbUB4Mlk5TjDWkOW0n4uODqixSdxZkIEsstXgus8ojxQ7u7S0jddQWi6IlEH+UqaLTCLspQVJPzQF4ZVc4Kf497Pcaqtq3sAWXQgaRGF6IESK/VZIKPFdRnGY0lbTlWhMjCkW9tHeKSt6ROvrFEq5u5te6BxS0lyQBkj6b7w5BmBBEJne96ylxcdP+z2+z5s+deeKH1njJEjlzycyfpTeV1HYyEDUivsnt905pT9eoMBnAt9k+l9/jiYO3WR4zVHSZvY64sVeSI7HhTomLaiqayYu7pxN1VN9PzGV9xX2F46jSo8yLSI7TkZLy+XG9fzVc8i3BAHD0dZ5xCgLqYRF7AcvhS0jo5C4fHxM7GBQ9B4PJnbv7Iq3ih7QX+wxYugdBGs/SvY4ryse5tHUbWai5j0YRAimJ0dbxQ= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BXOEVK+bqchdx55ooFKmasWn40o8ke/9lGiLbB7XL6KQ1XVDVTBKOzJXgD4UiV/bdJW6foJ0hZHMkLGe+ZTmE/u3k4HrqiD0gAAnMoKn5MvQPYe+od/aKG8V3ERFbrcaKo3KdIwwdYCPV195fPvAiuopnJ/F1wyB0EMMsnGDO8mQtrCJJoppAZs/kpvTcyGwPwLtTKMc5yjmAcyrZHBG+MIDT1l8aFNdolF0c3ot+39tCYjIjHvQ3NUtYsGebXbQsdxmlQ4C9bFJJEpnba3b6KXUFIRtiSmKcWDtv7JPZ319onfZ5a0cSY9JvhVWwS9B5n7naDw1tLa1zLgkcJEF/x8/dpWhDpsIFSbsJsPXhvSiDPYtFRTN9HUAGXAquvrqjZZdF923d4sptwUxiT8Q8SbibhIKc4Gz2JAp1m2thGSuBcMqOXm4fXCHUnbooSBj X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VQccimcvuFzN4TjNb8BTB0j/KjoqMdhDKRDoix9KE+om8JvQVmjzbjtkHgka+n8cGcdJN/X3cSUMYS5kujCLSUiKCRfwHTQOaqaEHoLl3+41geroDm+WSsDjhW/f3F8hclt9m/HoUB1hfZPP0glV+g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4602043b-31c9-4cf7-7b62-08d96b33e4e4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:07.9061 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 07/11] avcodec/aptx: Use AVCodecContext.frame_size according to the API 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: MTfCgUrye1Y9 Currently the APTX (HD) codecs set frame_size if unset and check whether it is divisible by block_size (corresponding to block_align as used by other codecs). But this is based upon a misunderstanding of the API: frame_size is not in bytes, but in samples.* Said value is also not intended to be set by the user at all, but set by encoders and (possibly) decoders if the number of channels in a frame is constant. The latter condition is not fulfilled here, so only set it for encoders to the value that it already had for APTX: 1024 samples (per channel). *: If it were needed to check said value, one would need to check for it to be divisible by four (four samples correspond to one block of block_size bytes). Signed-off-by: Andreas Rheinhardt --- libavcodec/aptx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libavcodec/aptx.c b/libavcodec/aptx.c index 3aeee1907c..97397aca68 100644 --- a/libavcodec/aptx.c +++ b/libavcodec/aptx.c @@ -515,14 +515,8 @@ av_cold int ff_aptx_init(AVCodecContext *avctx) s->hd = avctx->codec->id == AV_CODEC_ID_APTX_HD; s->block_size = s->hd ? 6 : 4; - if (avctx->frame_size == 0) - avctx->frame_size = 256 * s->block_size; - - if (avctx->frame_size % s->block_size) { - av_log(avctx, AV_LOG_ERROR, - "Frame size must be a multiple of %d samples\n", s->block_size); - return AVERROR(EINVAL); - } + if (av_codec_is_encoder(avctx->codec)) + avctx->frame_size = 1024; for (chan = 0; chan < NB_CHANNELS; chan++) { Channel *channel = &s->channels[chan]; From patchwork Sun Aug 29 21:27:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29857 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402482iov; Sun, 29 Aug 2021 14:28:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaU3K5HCcraSIjBEtsFjUKZGMD2jMzMSCjS5sQ5DbwLD0SQcjSvVR6R8MAEbdsMdoXwa07 X-Received: by 2002:a17:906:da01:: with SMTP id fi1mr10300067ejb.149.1630272531177; Sun, 29 Aug 2021 14:28:51 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y5si3262857ejk.223.2021.08.29.14.28.50; Sun, 29 Aug 2021 14:28:51 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=S252yAlm; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 650F168A3F4; Mon, 30 Aug 2021 00:28:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4373168A2CE for ; Mon, 30 Aug 2021 00:28:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J8EbjqgotcfAw6KAJbPD9C2dBx5TR/+rwc7W/Fr6NHXa9UDVacJicD1tMEQX9R9VhRWH/sY1V87NhFs3eq/G7Dbk3cEJlAMrG300/WPMOK1LbKrWtsIp2PEpazQ4BOjCF6sU+rvNakMNONhskqpbf44DDnD0oMOQPHxFgFN+RLOG1Xi+dzFDhTOnI3icl/GJmqiaxkobDO3a/UG9hsMeet2G1qlgO9640VqyMYffJ4N+OAq8B18QVvZEanjwpVYRs/kwA6la6tTpPK9RWEzg31bUj5ilqxQYDSkvdJyIq8qPtiA499U9d9TneN3Oe1HMi3cqczI/9XmrAW2tb7niiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y6mCSztGra3nfl1T9gg1Z0eN4ObITbcTX47rG/m1/6A=; b=k05n3H73bVaZH8BJqiZpQUUCKrs/0/aWdpbZtCOtGz52KaoV4kALH/gdYhPFFZ+3ZUTp/fazXGjfpg1PSUf+CNKttEMALidBLYK+NZ0XUMiBgpBGI2CjrRfuWvU8nSw6Caw1qWfM3MCtVPwzcUcf1PFFMUM3Ac1cRslB3vBnLlQBRN424g0213UOa6SxVA0hmVh8Py/+xmWHcpghp2U7egqtCvjTb0OXjx4chr+ofFOkfwgA+qTTQvLJErkNqKeSec+PxprQTdKA5aG2ZpZUx/Zgi6GwAdPgvSCaxIebscOauaHReGxxYhTR4+r48byY6suWghPd40nO2Fz3s6uMEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y6mCSztGra3nfl1T9gg1Z0eN4ObITbcTX47rG/m1/6A=; b=S252yAlm0G7eskYvnsrQFTknuN06f8cP9JYkvoSDNa+faZfSK/Cs4umunVjS8ie4lOSRCwVZNEHjvIWCMYd5gM8iTFuWD20JMTbo9DkMvYCb89X9j0N9DXouIgTHQ4kRcPhQpVMa9zWFC76NfLXWfOC1Ij5nssZTh34ofG49SeQ4ZP5YH7kWb7UuRrx5sm0/nuQQQuXb9q7cOGO4/l7XWAYkDQNUMddnStmSEI++dmEcWTQEBrzo/MAwXK47JueXRwwUpgbQbGbytYN7PjotDMjps8ZWLl0SM2/Ed+vv7JwrCgiFC1qd7V1z7NCK90WFV5et0dkpt25LwSUZyM3/4w== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:08 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:41 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [/KRnIN4o+5P3dh/wSM+jFV69yTSzw/Kq] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b730a072-1b73-4a8e-915e-08d96b33e55d X-MS-Exchange-SLBlob-MailProps: +LiGfBxqLEtNCKoPT6rtVE5PzvjguT+vhh0Z5r28yhGsNSUj7fq2KQnjvqehDshe7iOwrUeLLnqqT3jPFYmQR1GhLwuQ/0I0TwgKXbpgvwrHmQpmfRQv+BCSdO6FZdYUxHJQ/xUUi6XuvDbIEMRd4zBO7zWjxOnWS1E7bSYm1SHp+WT5hlhcI6a3w+jErlt1vYDNugsfLJgZ+Gla6L5eeXH6tYnrOyTS1cFHkb5pgafAbnrl0bmhMCDlau4anSuFdXxQ7PUAaNZ8GYtnABLTSei8Ll2wM/x3ffdA0nqkF5puuOUOOB2j6Mvx11MjAIVcGAiFyf2YGvHYxNL3ZGIxzlEsWzbGT/Cvof9ME3hm4JnpSK5VscyyxD0G5cOeUBJS9/QQVl/Vt8eDHvafciqxacM17qm41+2pnLx7NEmWktW5x9up2IWkgj22UULxW8PI+6BsjoJU5XJPIo0JkwkUkBY8FklGqQKUrXpcg2nh5dZsjf07O+451gRh7rwckRxgUKv93gSBliHfT2u9n+XV8Vpl4dvmzJroBhdMQ2zrv7N/KzN3ZvCGJSmKLVO/tu7n7C1lLBkXaSHnePf3SPKu6NqpU/+sGN3irkZbDBSQKy71Uhd3z5+nMQfqcg7mLBFenm9Qi/zHp6qBvmmFH7EZvZL2J/0Gd3sCDsa9CyKe39a8V+zi37dyHnKe74ZdjlQFiqtroFwDcXhKuPSk5E4HWxFdqBPvFcd27rr6LH/vrqOj+82fKX14pNPYrQZWqdS/jzdyLUzk177ek4xoeur94RZeTwQEmwW6 X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lhOr3eQxDGaBX/7nfnNJxxun4by5gSDjjq3sklFXC907nvYEx5hHMw2Xwsviul3UrhtaM4U58c4tAPSb39+01aWBab5nUXFssnlmjxhCeiDnJcr1x6D3MqH/MpIJRlOqwzSuUppbLpDzjy5sp9c6+HrDvY3jXRguX2pmrZshAmWY/BrcMtx4cnZJSNZ5/FiuACpgqU5Ni73pBrv0oDN+pDUjBXt7fzLHPMgnGoMZcKRnYA31jSsEyuwEJaCJX8B2S6oWJp/TRIW5TMTy+p3n9N4rXEwIpfqIuyqXQ+yTiajRoKYujCwfUTakBnVdztxG3n+1CPG3+hSIjYSvnEu+2B4HYuBAOM8IVlw1SnKFBhX1EL3m9LqFR0nHiT7EMVoIKfUL/41L1VsxT0Ek6q4ojdZ/IcxLzqqJv7Stg0XMD6z/HTimehkHJv2SmjdPKwQ8 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c5iG0tgIEuJ/ql9NqY5NIr6xTh+mEIfTyT9PlQ3Toe6sHEsfWVvIU55qNZSa7KpIq0aNvUUkC/C90KZakeFe1KgGzh8XyWO6D/XstPUhwDCEWQbfpsOIp1tP/aaFf0elyM1GeXfNlBOkjSpPZMssEA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b730a072-1b73-4a8e-915e-08d96b33e55d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:08.7345 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 08/11] avformat/aptxdec: Don't set AVCodecParameters.frame_size 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: xKhP+dXsryTA This field was misunderstood: It gives the number of samples in a packet, not the number of bytes. Its usage was wrong for APTX HD. Signed-off-by: Andreas Rheinhardt --- libavformat/aptxdec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/aptxdec.c b/libavformat/aptxdec.c index 7153e262a1..a5ed921e2c 100644 --- a/libavformat/aptxdec.c +++ b/libavformat/aptxdec.c @@ -56,7 +56,6 @@ static int aptx_read_header(AVFormatContext *s) st->codecpar->codec_id = AV_CODEC_ID_APTX; st->codecpar->bits_per_coded_sample = 4; st->codecpar->block_align = APTX_BLOCK_SIZE; - st->codecpar->frame_size = APTX_PACKET_SIZE; return 0; } @@ -68,7 +67,6 @@ static int aptx_hd_read_header(AVFormatContext *s) st->codecpar->codec_id = AV_CODEC_ID_APTX_HD; st->codecpar->bits_per_coded_sample = 6; st->codecpar->block_align = APTX_HD_BLOCK_SIZE; - st->codecpar->frame_size = APTX_HD_PACKET_SIZE; return 0; } From patchwork Sun Aug 29 21:27:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29863 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402570iov; Sun, 29 Aug 2021 14:29:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdh4LMCirCUmJIrlLGbYH5AjOWw3dUxgQdfp71bWQDbsJt8wfmaX7a3wAODyjWwtgU97wp X-Received: by 2002:a05:6402:d66:: with SMTP id ec38mr21430730edb.234.1630272542443; Sun, 29 Aug 2021 14:29:02 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bl3si12638264ejb.204.2021.08.29.14.29.02; Sun, 29 Aug 2021 14:29:02 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=R7oPxEpo; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 61AA068A255; Mon, 30 Aug 2021 00:28:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5B1F9687F49 for ; Mon, 30 Aug 2021 00:28:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQXzkr3/c7+ZA7+lCEpBmzhf9pIcocuMOBvYqskA4/OmKr6yOA0RzV7qiLhOAUlCuITyjX32ewfqeChAFXvrdNU2I4kULVagRfKu2LVbG5PF9g5+ZXcCVF0elY11FcwbrJWsluiS2QPhnYL4wxarV9Yi0r15v34PTpPJ21dIQ5LxLMmHDZ4I4mcmaze9HtIal73MVgYuccXa3wuhCRhXNOdWDKjRWLsA/wiV6rDQe6vfxmB6WNcwyXE/GVxQk9t5o/QrFyqLvjawsKv6d9nlxJP18Y7qzl3AKDdZMlOBBZYLgQNDH17XCJDmI2d4MHBkOfOiEQ1L4vmbqQ8dgqFPmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xJ7PyjKF2UTZXoZQ3xFxpkMBI6cYuoGoQdBA0licNfQ=; b=SamVob8Rwkdrql6ndHoYwBppPgrcPGeewzTF8+2v/Ven5J8jlHko4d/4+P3JwoLP90IKFepfy01VOhEx5YNJHpzxIZytMQK1qVMpiB23X0bT6jfnChZCVQ48e+GOUJQzY7QGXeI9mMS+YKCLTNrBbUpJ+HFhWtL6Jr3ytaCr7+QXhSuXb+om4YdxJc8kMLWPN6suLNILZIfqq3eWaO7EuAs0JMhDWsLMOwEGzOIsnZPqbKLHKo8ZM79Rvt2KT4oS1Mbt2YKqL5kyE0cx3LjJdXq26wOfCcneoEILgJw6VCyvc9F7YBSz/ylL75+e8A8okO09DMNMSVVo/IC+7SzOLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xJ7PyjKF2UTZXoZQ3xFxpkMBI6cYuoGoQdBA0licNfQ=; b=R7oPxEpoZmA6KDeBiQ8qs4u5iZ3rpCOLM6Ji4vcni8So3oFrAQjTRRpHKse63CdgDutAuCAsDYdqEwWEX+a+6cu1yTgoyMZDFGZy05UxnL4CwpM8V7moFXriV+CfU7k0T5wlvhrdQLfb2efueFj+vcnLNehT9qf6ZwrqyvzWY3SllywrYd3byhR77BEnJm7E9EyG2I2pVpwC7+6prg6/RJCu47CKVNcIt+4ZCHZIR95300Oc64I4PnQfbQQ3xFKwwaqUmwAr0+/WWBJSm/I3bARQcepS1YA6+Q7sARi4CQvGePwiRicaZC8kkb6Y8w8MNta+66HnyxyPDPVwkEQc7A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:09 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:09 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:42 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [tfNHBRYEO3ybFiRqW+PmwBdm8dJL7pOk] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9fc01e3-9248-499a-32bf-08d96b33e5d6 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXOVIHST31EzKLNwg5cTLbyy99m4OYHHlsMWUm9Lf2fZcr/BoyUF0+KQdsOw6dAsBrpowl6fN/ZvGhgXLH0xi/sT6NUKX17Z/slu4OS62UeMzSrtunhPEqfOoOBtGhr2nTAC2dPgc3iME9IbuTl/gzAT2GZWZzGAJE4x3ZKsL5C+3UiWhs3wskVx99zpLldIxFAFZLmeFIgu3C8NEV18b1Cbc4tKHeZKnCKG51w9P3Byfq4GIqowYFsfAv72toEEf+6JsJceeIGlkh8CuJVbLjxZvmxy2jX4glQ6AW890Cewk3Lvq8K2oUAGOdiOxR12Q+Ik+y9VzA9kI7UOm9Q9k6d0QKM61rODFGugteRpIBjNPEswOUXn4rAE2BlxJ8Nv64damUMUcLWucVh9TYuSH5fs2RZ3ZdGQ1T7lZOcbkIcnWyiWg98c7QnyDLwk9zz60mdZKTjYXyHn1XOAI9mWblBhvpQcOw0uCJXq1LDIRvFJM1b2Wc1+j3bX4Xug06ZdJNoVYIIFOd4+wWD5eqpZDIES1fKLXu81wDIZgxLZm/6enNmisWcVRnZXDYsjGQDl0wLbluRss9r4fbNAxSIibAY8M/OX6kH0qH1LCZVHqqfOWFbc25tpuUmSc6RpVcxE2QfC9EABSenMq/kfvV28eSI8rMjsaBPajxb0g+m4MYRxsoNfn3hyqn0r7ZPaSWQ/39EeDlEFW8AlbIXfRbfi7dZVJRDFNBgkpU= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G3l9S6H9aB4c8GvR27QcJR060LsiQMTFveueCxlxd3+/0yyUeq4ukyd/0QxLmI0DqywBq0ANLXi1SkOjilitAbHZK8zklwfN3TZul8Pksa0wJF4juGmBAr/wsm/ya2ItDW+f1nHwgZ8zb/u+2b/ewP/EFZzYEcify6HWyzVJJsn/tOqmO1Hv0MV5nAGL73D5Y6W3QJnZpBySLyCpe1su8PRtmZ8Gy6bJGEI1qu+wHnbm0oR0oBnhtZFOqL2prwbeXxh0g5oU3cJf4Kr1Exh8/QgHIBxd7GqqZUjxA2wId0fQfgvvTX8QQy+06NZ8dhKqFEJa2Qf+dYL+5pmbuxMPZouUSYJHDcMInu34dDNrQAZ+PA4i3smYlcfVDm/YXNIzS6A9aQbxoJcN/AzIgrX5lPipeV+amw7Iq13oKvSAHc3SK6N/invRlR1FhMGP1pyB X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2e+AY5HhYaJIvcHAovp7h2BYCz4LXUo3p3ggPt1U0AQFjjXiKM+2Acvl+AwT9FPCyDFmMpLmnR7pTcgeqEUuifTVkGT4BX3DROHlWXHGQKVN8LEN+3wlUtEHlOtT8amLr+cdpka+SdNlWPCf3e4UOA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9fc01e3-9248-499a-32bf-08d96b33e5d6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:09.5290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 09/11] avformat/aptxdec: Use ff_pcm_read_packet 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: fm+ZEOMTX+No It automatically honours block_align and it clears the AV_PKT_FLAG_CORRUPT flag which up until now was always set for the last packet if the number of input blocks was not divisible by 256 (or equivalently: if the number of input samples was not divisible by 1024). It reads more data at once; this necessitated updates to FATE reference files. Signed-off-by: Andreas Rheinhardt --- One could easily implement seeking for this format via ff_pcm_read_seek; but it would fail miserably for damaged inputs. libavformat/Makefile | 4 ++-- libavformat/aptxdec.c | 15 +++------------ tests/ref/fate/aptx | 15 +++------------ tests/ref/fate/aptx-hd | 15 +++------------ 4 files changed, 11 insertions(+), 38 deletions(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index 7e0f587b41..becf07867d 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -99,9 +99,9 @@ OBJS-$(CONFIG_APM_DEMUXER) += apm.o OBJS-$(CONFIG_APM_MUXER) += apm.o rawenc.o OBJS-$(CONFIG_APNG_DEMUXER) += apngdec.o OBJS-$(CONFIG_APNG_MUXER) += apngenc.o -OBJS-$(CONFIG_APTX_DEMUXER) += aptxdec.o +OBJS-$(CONFIG_APTX_DEMUXER) += aptxdec.o pcm.o OBJS-$(CONFIG_APTX_MUXER) += rawenc.o -OBJS-$(CONFIG_APTX_HD_DEMUXER) += aptxdec.o +OBJS-$(CONFIG_APTX_HD_DEMUXER) += aptxdec.o pcm.o OBJS-$(CONFIG_APTX_HD_MUXER) += rawenc.o OBJS-$(CONFIG_AQTITLE_DEMUXER) += aqtitledec.o subtitles.o OBJS-$(CONFIG_ARGO_ASF_DEMUXER) += argo_asf.o diff --git a/libavformat/aptxdec.c b/libavformat/aptxdec.c index a5ed921e2c..2cbf9a2cb8 100644 --- a/libavformat/aptxdec.c +++ b/libavformat/aptxdec.c @@ -22,6 +22,7 @@ #include "libavutil/opt.h" #include "avformat.h" +#include "pcm.h" #define APTX_BLOCK_SIZE 4 #define APTX_PACKET_SIZE (256*APTX_BLOCK_SIZE) @@ -70,16 +71,6 @@ static int aptx_hd_read_header(AVFormatContext *s) return 0; } -static int aptx_read_packet(AVFormatContext *s, AVPacket *pkt) -{ - return av_get_packet(s->pb, pkt, APTX_PACKET_SIZE); -} - -static int aptx_hd_read_packet(AVFormatContext *s, AVPacket *pkt) -{ - return av_get_packet(s->pb, pkt, APTX_HD_PACKET_SIZE); -} - static const AVOption aptx_options[] = { { "sample_rate", "", offsetof(AptXDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, @@ -99,7 +90,7 @@ const AVInputFormat ff_aptx_demuxer = { .extensions = "aptx", .priv_data_size = sizeof(AptXDemuxerContext), .read_header = aptx_read_header, - .read_packet = aptx_read_packet, + .read_packet = ff_pcm_read_packet, .flags = AVFMT_GENERIC_INDEX, .priv_class = &aptx_demuxer_class, }; @@ -112,7 +103,7 @@ const AVInputFormat ff_aptx_hd_demuxer = { .extensions = "aptxhd", .priv_data_size = sizeof(AptXDemuxerContext), .read_header = aptx_hd_read_header, - .read_packet = aptx_hd_read_packet, + .read_packet = ff_pcm_read_packet, .flags = AVFMT_GENERIC_INDEX, .priv_class = &aptx_demuxer_class, }; diff --git a/tests/ref/fate/aptx b/tests/ref/fate/aptx index ff890f6943..bf43d7612a 100644 --- a/tests/ref/fate/aptx +++ b/tests/ref/fate/aptx @@ -6,15 +6,6 @@ e36494e4eaa69dceb9746e784f928198 *tests/data/fate/aptx.aptx #sample_rate 0: 48000 #channel_layout 0: 3 #channel_layout_name 0: stereo -0, 0, 0, 1024, 4096, 0x42e145b7 -0, 1024, 1024, 1024, 4096, 0xfe24da5f -0, 2048, 2048, 1024, 4096, 0x5c9d2323 -0, 3072, 3072, 1024, 4096, 0xc7e155cf -0, 4096, 4096, 1024, 4096, 0xff114281 -0, 5120, 5120, 1024, 4096, 0xd60bb6b0 -0, 6144, 6144, 1024, 4096, 0x2beaa892 -0, 7168, 7168, 1024, 4096, 0xc74c71ca -0, 8192, 8192, 1024, 4096, 0xf49880cc -0, 9216, 9216, 1024, 4096, 0x9eae2532 -0, 10240, 10240, 1024, 4096, 0x096863b2 -0, 11264, 11264, 736, 2944, 0x533118a3 +0, 0, 0, 4096, 16384, 0x443e9917 +0, 4096, 4096, 4096, 16384, 0xc83613ab +0, 8192, 8192, 3808, 15232, 0xbf702262 diff --git a/tests/ref/fate/aptx-hd b/tests/ref/fate/aptx-hd index c924186ef8..bbb1bc090b 100644 --- a/tests/ref/fate/aptx-hd +++ b/tests/ref/fate/aptx-hd @@ -6,15 +6,6 @@ #sample_rate 0: 48000 #channel_layout 0: 3 #channel_layout_name 0: stereo -0, 0, 0, 1024, 8192, 0x85791bdb -0, 1024, 1024, 1024, 8192, 0x8db6dfa9 -0, 2048, 2048, 1024, 8192, 0x617b2190 -0, 3072, 3072, 1024, 8192, 0x733c4d71 -0, 4096, 4096, 1024, 8192, 0xb254420c -0, 5120, 5120, 1024, 8192, 0xc166b305 -0, 6144, 6144, 1024, 8192, 0x93e8a20e -0, 7168, 7168, 1024, 8192, 0xd91c6790 -0, 8192, 8192, 1024, 8192, 0xee6584ae -0, 9216, 9216, 1024, 8192, 0x74a6246d -0, 10240, 10240, 1024, 8192, 0xa20e6fb6 -0, 11264, 11264, 736, 5888, 0x06a6f058 +0, 0, 0, 4096, 32768, 0x6a926a94 +0, 4096, 4096, 4096, 32768, 0xa3dffebe +0, 8192, 8192, 3808, 30464, 0xa3560947 From patchwork Sun Aug 29 21:27:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29862 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402654iov; Sun, 29 Aug 2021 14:29:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyavFi1VPQQUOAgFysLR/sVh5xDh7dT9K10IRUggTyst3RxGiM224G5pFG/K+FYAW1I8QcY X-Received: by 2002:a17:907:362:: with SMTP id rs2mr22012326ejb.17.1630272553919; Sun, 29 Aug 2021 14:29:13 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h24si13659299ejt.408.2021.08.29.14.29.13; Sun, 29 Aug 2021 14:29:13 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=rroZuGUC; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 62DA868A417; Mon, 30 Aug 2021 00:28:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 72FED68A2CE for ; Mon, 30 Aug 2021 00:28:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9Bwc1+eBvlvpxi7mVAWPLKXoQNosjqG06xHpYaKtwbyj39YNOkckucV2dKDidMmf9vh3L5dY/r0vK29iMhm+LRMdBMpqJ+Mmb2IZmrypm8/6tlv8uVpKq4ZUSQASP3JTJ/AfH+TrQXX0//iF/0KRye/wqhLitGV+VHKmkoXBHuHB1qA9Jpp/95T0A19F8egrL7ffgU362veRTtE9/gsY/I9RjzkStZ2cx1X3TMJkcE2evwhjKOQT3cZuLw/BzKIzVdUpY1cqs/60mrZgPp1gdTkIOK3YYBuryA/SJIo2VGaIXTatYiEqf/UFUcmYwsbg49KvvFD3Ii44WuyM4Iodg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nG4u8jh2gWoxUVClOFE0OZ6gmJIiu0aCPpxgK/vKOCA=; b=l9Z5zBxV4PZ9yj3bGmvbTLA1wEARUSnVUdR+QUtbB/dJPxXsAb5QNX0xBN0KXvEIyrTmMAImTz6PTdpLSJmVEm2PGam9PMdWZbJcjoaduRMS9JsL+jOYZlynn6a6HpPd88pr7ubsx/E2jXyfIjTWvOuA+4x4WdPO/wtPrWNzYm/6jvWc9cEFIJa7SWKMG7tumDeFWU0k1Xrg4ARhGRExlbNqKVoCFQsKZC8nN6wo63Vb4cqIJU5GJdqExRXPx6KvM5Fx+djpYLjPicBccs8uzf/lVCrvESVLHevagGppA7Bs7MWJw0AIyGCcwpl2qRWyF0OfTRFU4VC8t6C52k9KZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nG4u8jh2gWoxUVClOFE0OZ6gmJIiu0aCPpxgK/vKOCA=; b=rroZuGUCpR892aBNW4Zlbv29FvxyxrrOojR8NY51u07n8DIa39cIs2KWP9HBQtqvFu2TgYkHNF064cWXqQGP+nNOYvh+mS3e1CW/p6dEC30RVsOL7ujZ2zSuP6sXewqJLKmQDriwvlxgDaYY6B7ryfX5q6+2WsvoBFTcsD+00KgMHlkzCUG2hmvEz9FR6fYDMIikobHOb1mddMwGbRQ90PN5V0UAvG6DWQJU9MUKENQ01tqOIrE6Rq9Fgu0gcwPa0R2nQvqgXqpU64GTdx+nRKq94qx2fboSDb6gdulckpB2d49ctx6juFqf6shaThRg5fE3RplgA3narcC+aNeN/g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:10 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:43 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [h/K2ts4nQTHy0ZUvR9a5mmersdXj2KM8] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8a9beb3-b5d6-4124-3ebb-08d96b33e68f X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXOVIHST31EzKLNwg5cTLbyK9k5/al5Y5IJ0DbCyXh3eLQfoGwKMK1QTJB5YWTvWzV/PbedcCSM5AfsIyFa6/fw3zw3djiyPLijF4s1JUw9cv3T0Uk7Evvq+ElkLeY0QWTG93OxCAGdALyg1EN3kyHFekNrq7DtDOc6p+Shyxd0jdW7ghUYxZSSRzbekJyv+OM4/DiYjahTWX2DS1pzs+NDVnHGR22nDsOI6zXNlCPFUAexTs8Gj8huciAF0iGBOJUB0mPIvY2/TG3vigy+Sqvp39nhaRCf2g5ztA8PG3rwzFLRFaE8Iqkul1dp6w/tlfXUhrGRkC+Oe0X4iwmpaOhPrpCU0jHELz9NTHIUuzbR0mA7LKsgQdfDgBPFvBTtGQywrM1lPe/3jmT7vZvIfNHmd+kB1v+9zVRZ2C8WSzCr8MIXFSK/G3YnjPE62jpuGO8VsX2L3ZLJ/KH+uwqY46C00ZAg95kBoXLyRgSg7ibL+opHeiXT6EbAmKhUC+DgIETXiI9mIQWDCvbzyEZKkUvxedSUzxWmBpf+XoHXCUtco4rXE+Xi0iRA4pNzUe2zYdMPyQ7uD4Kl6YokN9fjmDPGxo5x5QhZv6OxZPO2FupliurX8yuKh5cjYvGUrzY+SvXc9Io8eFbawWZWNLqwCHwCsoiATyR1Fq5CoGgg1J3H4WTiqVrFuSYlDVCRYmCiKicHuBNmuYKfgjhTWb3O0MJiZkT6ZX5yVh8= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K2VyReEXUidoVa8vQuJ/bARWgxeffBeISydEJ8JvCFtg/LStBp4OLHwa7Vw5qHRxZh8towg1Udfvb1iJ5TSi/P9V8GwZdPzA3xsx9veE91l4Lfw7z5UcmoihPDc9jnNTDa+n8gLNXeTR0KI6vZ1sNku3Isom8rFHpMSYpY2ngAMunhuKKva0qzziwdw8kHC8QMa1oJMM1EHbrT5vT41oqtu2yvyFQVegMUxGBTmvzF3Hez9Jnepzxec1CMZ0XLgNWZKA8URYOA1e7gtFmU8tU2330M1jNcSbrkUDMtJaQHbpYIZoeY7I0fewBuwRf3Un60NoABf0eSK9JBMjBY1LMqoEMeLIZUfUfivLJ7bzCSJuu8k2HEUXkKRExwR2pguKYXKPeqA+cf5KOqSY1uJONBigz1wfcvZClB96VkMcSRgHEbl4DE/5x0Xy3Lu6cvmH X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2w+50ClmzEhr5O2FWqI3KQ+RJ1ELfeqRIbzJgT1JxfNEgXQiOqLEJsvNcpjliVQxrJ4AxrCqG/pCAJY29ji+OWEqmglfLW06L74TtJ4eQ6BNM3RanCX3jx2opCpAYk04hiGfGUlQfjxadeTrSlJpPw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8a9beb3-b5d6-4124-3ebb-08d96b33e68f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:10.7447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 10/11] avcodec/aptxdec: Process data in complete blocks only 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: z/msqiaripDi The APTX (HD) decoder decodes blocks of four (six) bytes to four output samples. It makes no sense to handle incomplete blocks: They would just lead to synchronization errors, in which case the complete frame is discarded. So only handle complete blocks. This also avoids reading from the packet's padding. Signed-off-by: Andreas Rheinhardt --- libavcodec/aptxdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aptxdec.c b/libavcodec/aptxdec.c index bdcc076c41..de661476b7 100644 --- a/libavcodec/aptxdec.c +++ b/libavcodec/aptxdec.c @@ -148,7 +148,7 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data, /* get output buffer */ frame->channels = NB_CHANNELS; frame->format = AV_SAMPLE_FMT_S32P; - frame->nb_samples = 4 * avpkt->size / s->block_size; + frame->nb_samples = 4 * (avpkt->size / s->block_size); if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; From patchwork Sun Aug 29 21:27:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29861 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp3402746iov; Sun, 29 Aug 2021 14:29:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/zTQP9XT5v5GboogR47SX8591UFrRVuyBAhf+DGMB9gGN69TxJ0FSbrHZDWlqFpzimY2a X-Received: by 2002:a17:906:6cc:: with SMTP id v12mr21995975ejb.153.1630272566700; Sun, 29 Aug 2021 14:29:26 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q2si9481805eds.540.2021.08.29.14.29.26; Sun, 29 Aug 2021 14:29:26 -0700 (PDT) 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=@outlook.com header.s=selector1 header.b=tP1Hp80O; arc=fail (body hash mismatch); 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=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E1E168A40E; Mon, 30 Aug 2021 00:28:24 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075055.outbound.protection.outlook.com [40.92.75.55]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8AF0F687F49 for ; Mon, 30 Aug 2021 00:28:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LjB1TamSDBmbYi2dH6y1mkoSAjXW/QhfhoEIshwnTM1Dyr4kwWEGsUcZ/gQbm03QnC7H5R3fGlZm3ZzkHJjbe5qkunBCEKPNQ1Ck16AMW6PAufSfYh/gDik//GeSenxshtTfR7ZSsv0gVj0Ve5YmyPYi7XqrPUFsA84l9/5zDuFCFZodCU1Fo+h2PJdEkwqhIaWVWGvjJYP4xsilEC4MuzyJgMaiVScoq6TTZ+8n3SAChrxFZfmIXka9dHc6YSqNig4cWdj7uQVB2Yf/YD5M1mssxkAvFdhvw+RVcTIfmD8EFYx4wgSwCQEqjk7PbW4QKNc37u83LS5VcdVkpeADFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fl4mfs+V8+SLTMvNdHAYXPd6DoEYQm8llkzwIFcd3oI=; b=KmkhywZV/xNtRgyd3ROF2JdjuY3UMX0jHQ0UfalaSPYki8iVWAihTZhUuLWzChDGHcbD7851kZtSAuMipNpDdUt8MiJNG2C/cT+qpdgL0orVyVR2QORJ28P/4mhXWaxiqTnviH6QbbNzW5kQy3c+3v3X/ITayssB+oDMi9TTUoWP2YUdo6QYYzk4praMcW8yWWGq3+ZA+IGJBHVsXOAW0VD9ezJHetLKXKYVus6x9gxOwBL0vB9zmiRqlC+K3Pyon06qTeJfd+WH2ioOHptLYBI5niERCBgaNDIQyARTT/+s3+JDiehhHvjch6k8qEiVu/f4L+YYYfR7DKegIT4cpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Fl4mfs+V8+SLTMvNdHAYXPd6DoEYQm8llkzwIFcd3oI=; b=tP1Hp80OKr7kH+vRobTlEz4TOZ1ooAMfcDlQKCwWsAw4bU+Gmh1kRdSqmkI5ey1+vRnP+tSRnBJXcWEbiytqueuQi+3NkQ025Wq/O3PfbcrmysbTAPiYjUxBmuU/+cTGVMD0mDOEHsSqh0ecQYBmj8dhnZTWX+wQNtKoGb1ItUhjwXoeVFEKyYmKw6SziSTBEb3AxrXeisX7FwYzHMoLIlkHCODkdXC4tnRHe1loOCQZ0Q/lMpml6udsEVrVccmBH9RQ91Y8MlpOBVgPu/0QzvtrJgznmGbbyZoXtdmtSGAM/jPa+f0lXQDz1Y3cos7Cr3yvSXFIE+89P4XySr1g3Q== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5927.eurprd03.prod.outlook.com (2603:10a6:20b:e3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.23; Sun, 29 Aug 2021 21:28:12 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f8b5:1ef2:89b2:f8c5%7]) with mapi id 15.20.4457.024; Sun, 29 Aug 2021 21:28:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Aug 2021 23:27:44 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [ZHPlBmlPV+K+J/vaRu5xzxGzITAdYxei] X-ClientProxiedBy: PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210829212744.1505779-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR0P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.19 via Frontend Transport; Sun, 29 Aug 2021 21:28:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15616e91-ca65-4d52-cfc7-08d96b33e749 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXOVIHST31EzKLNwg5cTLbyqQa5NobdPK07fRNdwA68YHFWvSu8Ac0FaQdHmMGbRlvm59syeUNrpjXcT5hq79YpGDMSBZJCvBmGDda/EskI8ZJi0ByLK9iq7ojUrEZREYB492B9p/277MKJm1jf3u151zNPzpJFLfPA/E7VQexR3seaGNObLqFkEG84ETa7VRXctmdFCu6jgwu6DYbrxzUf0dQgRcEVw2/rk9/8DdSkMjtkBySwJt009GwTE8Q4FMh33wh0BMBsvw/J0L9k3iAO/vqapjXOCh+qTOF0yrx2c0wXCNUyZtshpba9Dyu1NtMcsAM2d3zY3wzmhXyAj7E52uakgtihgBHH9CoTqt0tfiFNFGNUgL/IUcOMD44nzVdCwnQxlqbLeyppBIJEfUKW4SkUwkj8tjhlrl9X4Cne2DfLMg8k3fciiGgigdaPyxoWRbirrhQ+VR9YGcL03p+vGUvsu5A9ejf80Jt7x/Uen8Jx9DLYYZqXrUXF5Nv/g+TnfKJAvmVNYTqYWShG86fSsxr0vU3G1r36ccZlBIXEkPBQMmIHB07tx1tsMLGBlXQIy7S8PkPHZ9OJejerF1gC1C8W3nF4wr+u1k6K4ba1Gzyt4fsxQsItwr7isswHVjsRHDpYODLndLLIq9+CFBeBDGgbgGnhl13Tw5kxIolOzUV2966UtnbVJcvumeivCfeQAAD8vCQdroLacx2ByY0eKoJnX5UNOFI= X-MS-TrafficTypeDiagnostic: AM6PR03MB5927: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hmpJvqM8c/acVOiiSUXD6fo7nBbTEnmxgyLZVapOB9o9XGFA8tmz+oUEs1dmdsCgsnCwPOYSwSuYgSXvjM2pzj6jiPyeGsvqOOfh+Y2fUiMsz5z/EkeuFS+AejD/HyoUx/V62mk8w9U8NztJSJOhHQZMq4WJT8tVxhZL22vxsCKv83zky8ZWA/AhFDif0BuZ35aC/9JvmHhJgz2VBqfRCQa3JE6Rh2Lx+5zAGQ1y0ysGsI0DTf2Kd8LFiFmteXqkRvE7AarUpjWmDyVTafGox41BB+dstBbaRQuBl2ZKZPrvMvttmY+rtglxhCENIssbLSeE4KFWucBL0kbIq4+UDtUv8wNJW9okWC7L989vm7Fu9R1tIx22fb7qg8lWAiaHWDE87Yz7f+2X7kd+GpOTYHIkZoe53NZfNo945m4DIkopWgGtNEg6g7H1G8+mSfAm X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5N3bpyf2b7TU/uZcwVWP78WEOdDKwjZIAF3zGx/im6czlrXWYQ4sChqW3pHplFonIbKrSefnUo1oahzmaNab3gCh5LW2bV0rlesJuEQOWRs3eJ92yzdZsjLfKElVRJrtUSQ54PA8hYHHX5MEXV9wRw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15616e91-ca65-4d52-cfc7-08d96b33e749 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2021 21:28:11.9804 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB5927 Subject: [FFmpeg-devel] [PATCH 11/11] avcodec/aptxenc: Process data in complete blocks of four samples only 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: imVT1Q+tJgkk Otherwise one could read into the frame's padding when one encounters the small last frame. Signed-off-by: Andreas Rheinhardt --- With this patch the last few samples of the last frame will be ignored. It would be possible to avoid that by padding the frame to a multiple of four samples. This could be done with a new codec cap/flag; the existing padding code could be reused for this. libavcodec/aptxenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aptxenc.c b/libavcodec/aptxenc.c index 5ea6053c26..effab86b61 100644 --- a/libavcodec/aptxenc.c +++ b/libavcodec/aptxenc.c @@ -215,7 +215,7 @@ static int aptx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) return ret; - output_size = s->block_size * frame->nb_samples/4; + output_size = s->block_size * (frame->nb_samples/4); if ((ret = ff_get_encode_buffer(avctx, avpkt, output_size, 0)) < 0) return ret;