From patchwork Thu Nov 9 08:01:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "pkv.stream" X-Patchwork-Id: 5932 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp1736937jah; Thu, 9 Nov 2017 00:01:30 -0800 (PST) X-Google-Smtp-Source: ABhQp+S05n/WySxU9hS0gcylKwa3HRBJn/kYl+m68boahbQ0/XBoQFmeQu2C4Vhta3ZEXVAu845K X-Received: by 10.28.230.140 with SMTP id e12mr2119295wmi.118.1510214489977; Thu, 09 Nov 2017 00:01:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510214489; cv=none; d=google.com; s=arc-20160816; b=m/NV7ttqF+G0nllf1vK5u32FlIp1GPa8lSqp0ygtb0jEBiVmtMQAJ3Rf4sCHB7QZCz BRj+RLyXxxLP5/WCtF10CwbJ6O7dxXBa2dWq4X9K4mzfMFyrQlI3k7gxQSPllH2OCIoU TgqxX/CwEeKBLfnxuskfYxDANgOf1KM6SWKh2LJhNT2r6Z/KiT4PI0PcvX3n7oenAF9S v1q7n6jP4KZ7+rTI3NKi8HXPWDtt1tfzXHZVcZ8nb9vFwMX4bKiRxC+HEen+yS3/NZr1 me4JreaKVgET5QEXszjKJlZl8O6ft+XwoFXvNnEbJduRwlS/fBhVLr9+a4zA0Yvx+VSe kFlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:dkim-signature:delivered-to :arc-authentication-results; bh=leKISVVqLQRy1h0c1CYCRSgii5ZoGHp9aixucae2bfw=; b=BgiKHPhsLFDw/wUu28WLsjOhNclfKybDIzDET6tJPSAKn/O635zsgpicpx9W58bGyb 40UK2oMAx8jz3Yl7/d+NbmqUHb6gNst+B/pz9n4z5i8AbOLPCLoSufLlk9BMAJC7WXvj HxzyFpBFHsnLDjoE2/sgnwS3rXb+61srVFBf1TEmufEImhpUKEKRYVPScD/iORsgNZV/ lxf88rJaWkUx3oUgEzHZkUmHS3o4hDB7rcryKZSMdUyljw4XaFLQcTY0N1SX4AQZPG3l L8MMgI7zH77vYNN39JBSwfQ/7UQbLDkrB6IYSkS0ewr2RnxjEAamOjD7qXYsfpq1F0Np tcnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=XlviNVDl; 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=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w73si4831930wmw.131.2017.11.09.00.01.29; Thu, 09 Nov 2017 00:01:29 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=XlviNVDl; 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=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5B4E4689C96; Thu, 9 Nov 2017 10:01:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A3BB68064F for ; Thu, 9 Nov 2017 10:01:09 +0200 (EET) Received: by mail-wm0-f54.google.com with SMTP id r68so15158545wmr.1 for ; Thu, 09 Nov 2017 00:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=quIL+c/+Xun3Sk3/4HGJB+NXBfq5YF+xll8n69P+Gmk=; b=XlviNVDlNlnxiBMlKXzRpIvbiDvYECyfsiYyzRLDZ1EhN9d/oA/w10QKDSWJ3Kbig+ i+GYNySdthUZYIwsDrbpKtR3rFCXVY240vWyho+444rs1OyljPGQxV5e2919EBOgWUKP 6jz7YaPAqVTEKEaeYHhmF08AlzXWz24oxMguCEs2MAvv7lT9cpkNfb+rho4E9aximov8 HAAYWS/NVwTR/L+iyHgvG0KnslHlFbY0tKLdKpUbAKGHdKFN3eIzIme/w1WvGavJDZGH xLlgGGpUb6LbDPf14BJQB/Fq2KT67vg2jv6eD+4nErCB8A/Vg5ayWhlnSbevvM/VVOav /KSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=quIL+c/+Xun3Sk3/4HGJB+NXBfq5YF+xll8n69P+Gmk=; b=ZMy6yDZUclbnCN0qLfWX0qwqCQp7/JOriEwcvMtZfNbRUlNHgQEkbjZd2EEUk17jUc u6pU0jZcOdy/BPGiEopAHXMkTDOI7zKaer8cdxmtxYfN27njmROMxbMNxiI+Z9CFfo6F 0CsfFFXjnwm9qQZftVUsSZEDugzIig/VZ4w3Paior2GFhzx/QOdz0we3W2SJbxNfLGxe tK/e4nre4GRgtOCqqVdpQAzRzUvQNBLHZqNj5/eIO6VSsdFnoWTqI6H9T03SFk0ibpSq jPzBGw9TKYpo5Nlowk2wIuZ93cV8gN0y36tqTc+OM9r7LEikDb5jr3oXklooAfaOdwpY +d+Q== X-Gm-Message-State: AJaThX4R52Uzj1TWg69Z4JB+MmsSO0oJBEfFptykudq9iu0Pd33ZBV93 2Z7xJ08TS3/YT/PXtFOe3tBzZQ== X-Received: by 10.80.204.154 with SMTP id q26mr4275240edi.108.1510214481547; Thu, 09 Nov 2017 00:01:21 -0800 (PST) Received: from [192.168.0.3] ([176.159.7.188]) by smtp.googlemail.com with ESMTPSA id e24sm5194342edc.9.2017.11.09.00.01.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2017 00:01:21 -0800 (PST) To: ffmpeg-devel@ffmpeg.org References: <68150eab-1ce5-49c7-171e-996ef572fb86@gmail.com> <9bb7d16c-124b-21ef-3006-68f812623145@gmail.com> <20171002172335.GS30840@nb4> <36a23e9b-ce2d-bc62-3c35-1199a40a69e2@gmail.com> <1e8709b2-396e-6427-94ef-ca79def3831a@gmail.com> From: "pkv.stream" Message-ID: <73537ed2-5482-0303-0a1f-1c21d4ff24a2@gmail.com> Date: Thu, 9 Nov 2017 09:01:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: fr Subject: Re: [FFmpeg-devel] [PATCH] aacenc: WIP support for PCEs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Le 09/11/2017 à 4:43 AM, Rostislav Pehlivanov a écrit : > On 18 October 2017 at 11:05, pkv.stream wrote: > >> Le 02/10/2017 à 8:39 PM, Rostislav Pehlivanov a écrit : >> >>> On 2 October 2017 at 18:43, pkv.stream wrote: >>> >>> Le 02/10/2017 à 7:23 PM, Michael Niedermayer a écrit : >>>> On Mon, Oct 02, 2017 at 12:52:53AM +0200, pkv.stream wrote: >>>>> Le 02/10/2017 à 12:43 AM, Carl Eugen Hoyos a écrit : >>>>>> 2017-10-02 0:40 GMT+02:00 pkv.stream : >>>>>>> Hi atomnuker, >>>>>>>> got your PCE working; >>>>>>>> >>>>>>>> the patch you attached contains tabs, they cannot be committed >>>>>>> to the FFmpeg repository, please remove them. >>>>>>> (Or one tab.) >>>>>>> >>>>>>> thanks for pointing out. >>>>>> Removed the offending tab. >>>>>> >>>>>> Thank you, Carl Eugen >>>>>> >>>>>>> _______________________________________________ >>>>>>> ffmpeg-devel mailing list >>>>>>> ffmpeg-devel@ffmpeg.org >>>>>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>>>>>> >>>>>>> aacenc.h | 239 ++++++++++++++++++++++++++++++ >>>>>> +++++++++++++++++++++++++++++++-- >>>>>> 1 file changed, 233 insertions(+), 6 deletions(-) >>>>>> 929275fe34af4d0048bac2be928957288cb75ddd >>>>>> 0001-avcodec-aacenc-PCE-for-al >>>>>> l-ffmpeg-usual-layouts.patch >>>>>> From 647fb61708bc1279f9dc17c679052a778dce5fbb Mon Sep 17 00:00:00 >>>>>> 2001 >>>>>> From: pkviet >>>>>> Date: Sun, 24 Sep 2017 16:11:17 +0200 >>>>>> Subject: [PATCH] avcodec/aacenc: PCE for all ffmpeg usual layouts >>>>>> >>>>>> this seems not to apply cleanly here, did i miss something ? >>>>> Hi Michael >>>> this needs to be applied after the initial patch by atomnuker which he >>>> did >>>> not apply since this required work. >>>> What i submitted was not aimed at being pushed since there is probably >>>> still work to do. >>>> Depending on what he wants to do with his patch, I'll resubmit a working >>>> patch later, properly rebased. >>>> Sorry about the mess. >>>> regards >>>> >>>> >>>> Applying: avcodec/aacenc: PCE for all ffmpeg usual layouts >>>>> error: sha1 information is lacking or useless (libavcodec/aacenc.h). >>>>> error: could not build fake ancestor >>>>> Patch failed at 0001 avcodec/aacenc: PCE for all ffmpeg usual layouts >>>>> The copy of the patch that failed is found in: .git/rebase-apply/patch >>>>> >>>>> >>>>> [...] >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> ffmpeg-devel mailing list >>>>> ffmpeg-devel@ffmpeg.org >>>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>>>> >>>>> >>>> _______________________________________________ >>>> ffmpeg-devel mailing list >>>> ffmpeg-devel@ffmpeg.org >>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>>> >>>> >>> Give me a few hours and I'll test it and submit a v2 of my patch with your >>> improvements. >>> _______________________________________________ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >> Hi >> >> any updates ? >> >> regards >> >> >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > Hi, > Very sorry it took me this long but I finally got motivated and got around > to checking your patch > > I have to say I'm impressed, everything works perfectly, decodes fine and > the mappings were all fine. This is a big feature which many people have > requested and complained the encoder lacks support for. > > I've done some minor changes to the code on the encoder side (an INFO print > instead of a warning), to the comments (just alignment) and for the > ambisonic layouts (made them use the defines) and I've pushed it. > > Thanks a lot > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Hi atomnuker, that's wonderful; there are two things also: 1) there are changes to make to the list of channel layouts not requiring PCE ==> AV_CH_LAYOUT_5POINT0 to AV_CH_LAYOUT_5POINT0_BACK since the previous is 5.0(side) while the latter is 5.0 which is what is in spec (table 1.19 ISO/IEC 14496-3:200X(E) or table 42 ISO/IEC 13818-7:2004(E) ) see patch in attachment (can't be applied directly due to rebasing issues from your initial patch) 2) for everything to work I had to also apply the patch from here: http://ffmpeg.org/pipermail/ffmpeg-devel/2017-October/217357.html If you ffmpeg -loglevel debug , you will see that on non-default channel layouts, there is an auto insertion of a resampler filter : the channel_layout option is not passed correctly in the chain. for instance: ffmpeg -channel_layout octagonal -i input.wav -c:a aac -channel_layout octagonal out.mkv will matrix the input from octagonal to 7.1 before the encoding. Check ticket 6706 for details of the issue. I am not knowledgeable enough to be sure my fix is correct; it's working for sure, but I've had very few feedback (only Michael and Moritz about styling issues). Maybe you could have a look. Regards pkv From 847334071ff13a00d54b9f55ccf29c7553ab83f1 Mon Sep 17 00:00:00 2001 From: pkviet Date: Mon, 6 Nov 2017 10:03:47 +0100 Subject: [PATCH] avcodec/aacenc: fix default channels Fix default channels not requiring PCE. Replaces 5.0 and 5.1 definitions; 7.1 should be AV_CH_LAYOUT_7POINT1_WIDE_BACK acording to spec but this is not used in practice, so keep AV_CH_LAYOUT_7POINT1 which is what is used widely. --- libavcodec/aacenctab.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/aacenctab.h b/libavcodec/aacenctab.h index c852a29..ab1023c 100644 --- a/libavcodec/aacenctab.h +++ b/libavcodec/aacenctab.h @@ -45,13 +45,13 @@ extern const int ff_aac_swb_size_128_len; /* Supported layouts without using a PCE */ static const int64_t aac_normal_chan_layouts[7] = { - AV_CH_LAYOUT_MONO, - AV_CH_LAYOUT_STEREO, - AV_CH_LAYOUT_SURROUND, - AV_CH_LAYOUT_4POINT0, - AV_CH_LAYOUT_5POINT0, - AV_CH_LAYOUT_5POINT1, - AV_CH_LAYOUT_7POINT1, + AV_CH_LAYOUT_MONO, + AV_CH_LAYOUT_STEREO, + AV_CH_LAYOUT_SURROUND, + AV_CH_LAYOUT_4POINT0, + AV_CH_LAYOUT_5POINT0_BACK, // -channel_layout 5.0 + AV_CH_LAYOUT_5POINT1_BACK, // -channel_layout 5.1 + AV_CH_LAYOUT_7POINT1, // should be AV_CH_LAYOUT_7POINT1_WIDE_BACK acording to spec but unpractical }; /** default channel configurations */